Skip to content

Commit

Permalink
adapt to new metal device enum
Browse files Browse the repository at this point in the history
  • Loading branch information
grzuy committed Nov 13, 2023
1 parent 2a905cd commit 3f00264
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion native/candlex/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
mod atoms {
rustler::atoms! {
cpu,
cuda
cuda,
metal
}
}

Expand Down
1 change: 1 addition & 0 deletions native/candlex/src/tensors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ impl ExTensor {
let dev_string = match tensor.device() {
Device::Cpu => atoms::cpu(),
Device::Cuda(_) => atoms::cuda(),
Device::Metal(_) => atoms::metal(),
};

Self {
Expand Down

0 comments on commit 3f00264

Please sign in to comment.