mirror of
https://github.com/huggingface/candle.git
synced 2025-06-15 02:16:37 +00:00
Add a few metal gather ops. (#2740)
* Add a few metal gather ops. * Fix some compilation issues. * Adjust the tolerance.
This commit is contained in:
@ -1245,6 +1245,12 @@ impl BackendStorage for MetalStorage {
|
||||
(DType::U32, DType::F16) => "gather_u32_f16",
|
||||
(DType::U32, DType::BF16) => "gather_u32_bf16",
|
||||
(DType::U32, DType::U32) => "gather_u32_u32",
|
||||
(DType::U32, DType::I64) => "gather_u32_i64",
|
||||
(DType::I64, DType::F32) => "gather_i64_f32",
|
||||
(DType::I64, DType::F16) => "gather_i64_f16",
|
||||
(DType::I64, DType::BF16) => "gather_i64_bf16",
|
||||
(DType::I64, DType::U32) => "gather_i64_u32",
|
||||
(DType::I64, DType::I64) => "gather_i64_i64",
|
||||
(left, right) => crate::bail!("Metal gather {left:?} {right:?} not implemented"),
|
||||
};
|
||||
let command_buffer = self.device.command_buffer()?;
|
||||
|
Reference in New Issue
Block a user