mirror of
https://github.com/huggingface/candle.git
synced 2025-06-20 20:09:50 +00:00
Add support for i64 (#563)
* Add the i64 dtype. * Adapt the cuda kernels.
This commit is contained in:
@ -33,21 +33,31 @@ extern "C" __global__ void FN_NAME( \
|
||||
} \
|
||||
|
||||
#if __CUDA_ARCH__ >= 800
|
||||
WHERE_OP(__nv_bfloat16, int64_t, where_i64_bf16)
|
||||
WHERE_OP(__nv_bfloat16, uint32_t, where_u32_bf16)
|
||||
WHERE_OP(__nv_bfloat16, uint8_t, where_u8_bf16)
|
||||
#endif
|
||||
|
||||
#if __CUDA_ARCH__ >= 530
|
||||
WHERE_OP(__half, int64_t, where_i64_f16)
|
||||
WHERE_OP(__half, uint32_t, where_u32_f16)
|
||||
WHERE_OP(__half, uint8_t, where_u8_f16)
|
||||
#endif
|
||||
|
||||
WHERE_OP(float, int64_t, where_i64_f32)
|
||||
WHERE_OP(double, int64_t, where_i64_f64)
|
||||
WHERE_OP(uint8_t, int64_t, where_i64_u8)
|
||||
WHERE_OP(uint32_t, int64_t, where_i64_u32)
|
||||
WHERE_OP(int64_t, int64_t, where_i64_i64)
|
||||
|
||||
WHERE_OP(float, uint32_t, where_u32_f32)
|
||||
WHERE_OP(double, uint32_t, where_u32_f64)
|
||||
WHERE_OP(uint8_t, uint32_t, where_u32_u8)
|
||||
WHERE_OP(uint32_t, uint32_t, where_u32_u32)
|
||||
WHERE_OP(int64_t, uint32_t, where_u32_i64)
|
||||
|
||||
WHERE_OP(float, uint8_t, where_u8_f32)
|
||||
WHERE_OP(double, uint8_t, where_u8_f64)
|
||||
WHERE_OP(uint8_t, uint8_t, where_u8_u8)
|
||||
WHERE_OP(uint8_t, uint32_t, where_u8_u32)
|
||||
WHERE_OP(uint32_t, uint8_t, where_u8_u32)
|
||||
WHERE_OP(int64_t, uint8_t, where_u8_i64)
|
||||
|
Reference in New Issue
Block a user