mirror of
https://github.com/huggingface/candle.git
synced 2025-06-16 10:38:54 +00:00
add u32 - U32 gather (#2653)
This commit is contained in:
@ -1244,6 +1244,7 @@ impl BackendStorage for MetalStorage {
|
|||||||
(DType::U32, DType::F32) => "gather_u32_f32",
|
(DType::U32, DType::F32) => "gather_u32_f32",
|
||||||
(DType::U32, DType::F16) => "gather_u32_f16",
|
(DType::U32, DType::F16) => "gather_u32_f16",
|
||||||
(DType::U32, DType::BF16) => "gather_u32_bf16",
|
(DType::U32, DType::BF16) => "gather_u32_bf16",
|
||||||
|
(DType::U32, DType::U32) => "gather_u32_u32",
|
||||||
(left, right) => crate::bail!("Metal gather {left:?} {right:?} not implemented"),
|
(left, right) => crate::bail!("Metal gather {left:?} {right:?} not implemented"),
|
||||||
};
|
};
|
||||||
let command_buffer = self.device.command_buffer()?;
|
let command_buffer = self.device.command_buffer()?;
|
||||||
|
@ -214,6 +214,7 @@ GATHER_OP(gather_u32_f16, uint, half)
|
|||||||
#if defined(__HAVE_BFLOAT__)
|
#if defined(__HAVE_BFLOAT__)
|
||||||
GATHER_OP(gather_u32_bf16, uint, bfloat)
|
GATHER_OP(gather_u32_bf16, uint, bfloat)
|
||||||
#endif
|
#endif
|
||||||
|
GATHER_OP(gather_u32_u32, uint, uint)
|
||||||
|
|
||||||
SCATTER_ADD_OP(sa_u32_f32, uint32_t, float)
|
SCATTER_ADD_OP(sa_u32_f32, uint32_t, float)
|
||||||
SCATTER_ADD_OP(sa_u8_f32, uint8_t, float)
|
SCATTER_ADD_OP(sa_u8_f32, uint8_t, float)
|
||||||
|
Reference in New Issue
Block a user