Skip to content

Commit

Permalink
chore: remove arc
Browse files Browse the repository at this point in the history
  • Loading branch information
FL33TW00D committed Jan 22, 2024
1 parent a762bf5 commit 5691f47
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/ratchet-core/src/tensor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,15 @@ def matmul(a, b):
});
println!("Successfully created ground truth");
println!("{:?}", ground);

let device = Device::request_device(DeviceRequest::GPU)?;
let a_gpu = a.to(device.clone())?;
let b_gpu = b.to(device.clone())?;
let c_gpu = a_gpu.matmul(&b_gpu)?;
c_gpu.resolve()?;
let d_gpu = c_gpu.to(Device::CPU)?;
println!("Successfully resolved GPU tensor");
println!("{:?}", d_gpu);
Ok(())
}
}

0 comments on commit 5691f47

Please sign in to comment.