pub enum Device {
Cpu,
Cuda(usize),
Mps,
Vulkan,
}
Expand description
A torch device.
Variants§
Cpu
The main CPU device.
Cuda(usize)
The main GPU device.
Mps
The main MPS device.
Vulkan
The main Vulkan device.
Implementations§
Trait Implementations§
source§impl PartialEq<Device> for Device
impl PartialEq<Device> for Device
impl Copy for Device
impl Eq for Device
impl StructuralEq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnwindSafe for Device
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more