From ab86cd37c8fd944df351d8c7ca0e93376634a332 Mon Sep 17 00:00:00 2001 From: Laurent Mazare Date: Wed, 27 Mar 2024 16:30:07 +0100 Subject: Support i64 in index-select on metal. (#1951) * Support i64 in index-select on metal. * Add some testing of index-select for all dtypes. --- candle-metal-kernels/src/indexing.metal | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'candle-metal-kernels') diff --git a/candle-metal-kernels/src/indexing.metal b/candle-metal-kernels/src/indexing.metal index ad4a8605..762b42be 100644 --- a/candle-metal-kernels/src/indexing.metal +++ b/candle-metal-kernels/src/indexing.metal @@ -187,6 +187,12 @@ kernel void NAME( \ } +INDEX_OP(is_i64_f32, int64_t, float) +INDEX_OP(is_i64_f16, int64_t, half) +#if defined(__HAVE_BFLOAT__) +INDEX_OP(is_i64_bf16, int64_t, bfloat) +#endif + INDEX_OP(is_u32_f32, uint32_t, float) INDEX_OP(is_u32_f16, uint32_t, half) #if defined(__HAVE_BFLOAT__) @@ -242,4 +248,4 @@ INDEX_ADD_OP(ia_u8_u32, uint8_t, uint32_t) INDEX_ADD_OP(ia_u8_u8, uint8_t, uint8_t) #if defined(__HAVE_BFLOAT__) INDEX_ADD_OP(ia_u8_bf16, uint8_t, bfloat) -#endif \ No newline at end of file +#endif -- cgit v1.2.3