Skip to main content

Module device

Module device 

Source
Expand description

The device type of each runtime. The device type of each runtime, named without naming the runtime crate.

Each one is a value and nothing more — which GPU, which index — so they live here rather than in the runtime crates that act on them. That is what lets a caller hold one, and lets cubecl put a single enum over them all, without depending on any runtime.

Structs§

AmdDevice
A device of the HIP runtime, named by its index.
CpuDevice
The device of the CPU runtime. There is only one.
CudaDevice
A device of the CUDA runtime, named by its index.
DeviceId
The device id.
WgpuDevice
The device struct when using the wgpu backend.

Enums§

MetalDevice
A device of the native Metal runtime.
WgpuBackend
The graphics API a WgpuDevice comes up on, which also settles the shader compiler it is fed: SPIR-V on Vulkan, MSL on Metal, WGSL elsewhere.
WgpuDeviceKind
Which of a machine’s wgpu devices, leaving the graphics API aside.