diff options
Diffstat (limited to 'src/device.rs')
-rw-r--r-- | src/device.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/device.rs b/src/device.rs index d7b724d1..c092a347 100644 --- a/src/device.rs +++ b/src/device.rs @@ -6,6 +6,7 @@ use crate::{ #[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)] pub enum Device { Cpu, + Cuda { gpu_id: usize }, } // TODO: Should we back the cpu implementation using the NdArray crate or similar? @@ -72,6 +73,9 @@ impl Device { }; Storage::Cpu(storage) } + Device::Cuda { gpu_id: _ } => { + todo!() + } } } @@ -91,12 +95,18 @@ impl Device { }; Storage::Cpu(storage) } + Device::Cuda { gpu_id: _ } => { + todo!() + } } } pub(crate) fn tensor<A: NdArray>(&self, array: A) -> Storage { match self { Device::Cpu => Storage::Cpu(array.to_cpu_storage()), + Device::Cuda { gpu_id: _ } => { + todo!() + } } } } |