Enum DLDeviceType
#[non_exhaustive]#[repr(u32)]pub enum DLDeviceType {
Show 16 variants
kDLCPU = 1,
kDLCUDA = 2,
kDLCUDAHost = 3,
kDLOpenCL = 4,
kDLVulkan = 7,
kDLMetal = 8,
kDLVPI = 9,
kDLROCM = 10,
kDLROCMHost = 11,
kDLExtDev = 12,
kDLCUDAManaged = 13,
kDLOneAPI = 14,
kDLWebGPU = 15,
kDLHexagon = 16,
kDLMAIA = 17,
kDLTrn = 18,
}Expand description
The device type in DLDevice.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
kDLCPU = 1
CPU device
kDLCUDA = 2
CUDA GPU device
kDLCUDAHost = 3
Pinned CUDA CPU memory by cudaMallocHost
kDLOpenCL = 4
OpenCL devices.
kDLVulkan = 7
Vulkan buffer for next generation graphics.
kDLMetal = 8
Metal for Apple GPU.
kDLVPI = 9
Verilog simulator buffer
kDLROCM = 10
ROCm GPUs for AMD GPUs
kDLROCMHost = 11
Pinned ROCm CPU memory allocated by hipMallocHost
kDLExtDev = 12
Reserved extension device type, used for quickly test extension device. The semantics can differ depending on the implementation.
kDLCUDAManaged = 13
CUDA managed/unified memory allocated by cudaMallocManaged
kDLOneAPI = 14
Unified shared memory allocated on a oneAPI non-partitioned device. Call to oneAPI runtime is required to determine the device type, the USM allocation type and the sycl context it is bound to.
kDLWebGPU = 15
GPU support for next generation WebGPU standard.
kDLHexagon = 16
Qualcomm Hexagon DSP
kDLMAIA = 17
Microsoft MAIA devices
kDLTrn = 18
AWS Trainium
Trait Implementations§
§impl Clone for DLDeviceType
impl Clone for DLDeviceType
§fn clone(&self) -> DLDeviceType
fn clone(&self) -> DLDeviceType
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for DLDeviceType
§impl Debug for DLDeviceType
impl Debug for DLDeviceType
§impl Display for DLDeviceType
impl Display for DLDeviceType
impl Eq for DLDeviceType
§impl PartialEq for DLDeviceType
impl PartialEq 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 UnsafeUnpin 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