pub enum Device {
Cpu,
Metal,
Mlx,
Ane,
Cuda,
Rocm,
Tpu,
Gpu,
Vulkan,
OpenGl,
DirectX,
WebGpu,
}Expand description
Target device for graph execution.
Each variant maps to a backend crate gated by a Cargo feature.
Use Device::is_available() to check if the feature is enabled.
Variants§
Cpu
CPU with SIMD (NEON/AVX) + optional BLAS.
Metal
GPU via Apple Metal (Metal Performance Shaders).
Mlx
Apple MLX framework (unified memory GPU).
Ane
Apple Neural Engine.
Cuda
NVIDIA GPU via native CUDA (cuBLAS, cuDNN).
Rocm
AMD GPU via ROCm/HIP.
Tpu
Google TPU via libtpu’s PJRT plugin (no Python).
Gpu
Portable GPU via wgpu (Metal/Vulkan/DX12/WebGPU).
Vulkan
Vulkan compute shaders.
OpenGl
OpenGL compute shaders (legacy).
DirectX
DirectX 12 compute (Windows).
WebGpu
WebGPU (WASM target).
Implementations§
Trait Implementations§
impl Copy for Device
impl Eq for Device
impl StructuralPartialEq for Device
Auto Trait Implementations§
impl Freeze for Device
impl RefUnwindSafe for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
impl UnwindSafe for Device
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more