Skip to main content

Module device

Module device 

Source
Expand description

The device type of each runtime, and which hardware a device is. The device type of each runtime, named without naming the runtime crate, and which hardware a device is.

Each one is a value and nothing more: which GPU, which index, which kind of card. So they live here rather than in the runtime crates that act on them, which lets a caller hold one, and lets cubecl put a single enum over the devices, 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.
HardwareIdentity
Which hardware a device is: its DeviceIdentity without the card it sits in, so what is measured on one device holds for every device of the same hardware.
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.