#[repr(u32)]pub enum DLDeviceType {
Show 15 variants
Cpu = 1,
Cuda = 2,
CudaHost = 3,
OpenCL = 4,
Vulkan = 7,
Metal = 8,
Vpi = 9,
Rocm = 10,
RocmHost = 11,
ExtDev = 12,
CudaManaged = 13,
OneApi = 14,
WebGpu = 15,
Hexagon = 16,
Maia = 17,
}Expand description
Device type codes as defined by DLPack.
These correspond to DLDeviceType in the DLPack specification.
Variants§
Cpu = 1
CPU device
Cuda = 2
CUDA GPU device
CudaHost = 3
Pinned CUDA CPU memory (allocated with cudaMallocHost)
OpenCL = 4
OpenCL device
Vulkan = 7
Vulkan device
Metal = 8
Metal device (Apple)
Vpi = 9
VPI device
Rocm = 10
ROCm device (AMD)
RocmHost = 11
ROCm host pinned memory
ExtDev = 12
External DMA buffer
CudaManaged = 13
CUDA managed/unified memory
OneApi = 14
Intel OneAPI device
WebGpu = 15
WebGPU device
Hexagon = 16
Hexagon DSP device
Maia = 17
MAIA accelerator
Implementations§
Trait Implementations§
Source§impl Clone for DLDeviceType
impl Clone for DLDeviceType
Source§fn clone(&self) -> DLDeviceType
fn clone(&self) -> DLDeviceType
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DLDeviceType
impl Debug for DLDeviceType
Source§impl Hash for DLDeviceType
impl Hash for DLDeviceType
Source§impl PartialEq for DLDeviceType
impl PartialEq for DLDeviceType
impl Copy for DLDeviceType
impl Eq for DLDeviceType
impl StructuralPartialEq for DLDeviceType
Auto Trait Implementations§
impl Freeze for DLDeviceType
impl RefUnwindSafe for DLDeviceType
impl Send for DLDeviceType
impl Sync for DLDeviceType
impl Unpin for DLDeviceType
impl UnwindSafe for DLDeviceType
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