summaryrefslogtreecommitdiff
path: root/candle-metal-kernels
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2024-04-10 12:49:25 +0200
committerGitHub <noreply@github.com>2024-04-10 12:49:25 +0200
commita4d5a414e3ae79642ecfd6b7bb410c26a8a62a06 (patch)
treeb43f5eabd83c6a97909b965058a3d88c06bfc926 /candle-metal-kernels
parent798e0335cd2c4661f0fd0429cdf06abe3b45f4ea (diff)
downloadcandle-a4d5a414e3ae79642ecfd6b7bb410c26a8a62a06.tar.gz
candle-a4d5a414e3ae79642ecfd6b7bb410c26a8a62a06.tar.bz2
candle-a4d5a414e3ae79642ecfd6b7bb410c26a8a62a06.zip
Support gather on bf16 for metal. (#2035)
Diffstat (limited to 'candle-metal-kernels')
-rw-r--r--candle-metal-kernels/src/indexing.metal3
1 files changed, 3 insertions, 0 deletions
diff --git a/candle-metal-kernels/src/indexing.metal b/candle-metal-kernels/src/indexing.metal
index 762b42be..9eee97ca 100644
--- a/candle-metal-kernels/src/indexing.metal
+++ b/candle-metal-kernels/src/indexing.metal
@@ -207,6 +207,9 @@ INDEX_OP(is_u8_bf16, uint8_t, bfloat)
GATHER_OP(gather_u32_f32, uint, float)
GATHER_OP(gather_u32_f16, uint, half)
+#if defined(__HAVE_BFLOAT__)
+GATHER_OP(gather_u32_bf16, uint, bfloat)
+#endif
SCATTER_ADD_OP(sa_u32_f32, uint32_t, float)
SCATTER_ADD_OP(sa_u8_f32, uint8_t, float)