pub enum BackendKind {
Cuda,
Rocm,
LevelZero,
Vulkan,
Metal,
WebGpu,
Cpu,
}Expand description
One of the concrete compute backends OxiCUDA targets.
Variants are ordered from most- to least-preferred for a typical
discrete-GPU workstation; see BackendKind::default_priority.
Variants§
Cuda
NVIDIA CUDA (oxicuda).
Rocm
AMD ROCm / HIP (oxicuda-rocm).
LevelZero
Intel oneAPI Level Zero (oxicuda-levelzero).
Vulkan
Khronos Vulkan compute (oxicuda-vulkan).
Metal
Apple Metal (oxicuda-metal).
WebGpu
W3C WebGPU (oxicuda-webgpu).
Cpu
Pure-Rust host fallback (the CPU reference backend).
Implementations§
Source§impl BackendKind
impl BackendKind
Sourcepub const ALL: [BackendKind; 7]
pub const ALL: [BackendKind; 7]
Every backend kind, in declaration order.
Sourcepub const fn as_str(self) -> &'static str
pub const fn as_str(self) -> &'static str
Short lowercase identifier matching the backend’s name()
("cuda", "rocm", "level_zero", "vulkan", "metal",
"webgpu", "cpu").
Sourcepub const fn default_priority(self) -> u32
pub const fn default_priority(self) -> u32
Default selection priority — higher wins.
Native vendor stacks (CUDA, ROCm, Level Zero, Metal) outrank the portable APIs (Vulkan, WebGPU), which in turn outrank the CPU fallback. The CPU backend is deliberately the global minimum so it is only ever chosen when nothing else is available.
Sourcepub const fn is_gpu(self) -> bool
pub const fn is_gpu(self) -> bool
true for every backend that targets a real GPU (i.e. everything
except BackendKind::Cpu).
Trait Implementations§
Source§impl Clone for BackendKind
impl Clone for BackendKind
Source§fn clone(&self) -> BackendKind
fn clone(&self) -> BackendKind
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more