diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-06-21 21:37:54 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-21 21:37:54 +0100 |
commit | db35b310504ab97044b2c3826de72f9bccf86415 (patch) | |
tree | 710596156a4c026d4dd2ba804fab79b6cdafae3b /examples/basics.rs | |
parent | 7c317f9611c263f10d661b44151d3655a2fa3b90 (diff) | |
parent | 7c46de9584fd4315b84d3bc4c28cf1b2bad7785d (diff) | |
download | candle-db35b310504ab97044b2c3826de72f9bccf86415.tar.gz candle-db35b310504ab97044b2c3826de72f9bccf86415.tar.bz2 candle-db35b310504ab97044b2c3826de72f9bccf86415.zip |
Merge pull request #3 from LaurentMazare/cuda
Add Cuda support.
Diffstat (limited to 'examples/basics.rs')
-rw-r--r-- | examples/basics.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/basics.rs b/examples/basics.rs index f01f7871..d5d4f72b 100644 --- a/examples/basics.rs +++ b/examples/basics.rs @@ -2,7 +2,7 @@ use anyhow::Result; use candle::{Device, Tensor}; fn main() -> Result<()> { - let x = Tensor::var(&[3f32, 1., 4.], Device::Cpu)?; + let x = Tensor::var(&[3f32, 1., 4.], &Device::Cpu)?; let y = (((&x * &x)? + &x * 5f64)? + 4f64)?; println!("{:?}", y.to_vec1::<f32>()?); Ok(()) |