pub enum AcceleratorKind {
Cpu,
Cuda,
Metal,
Vulkan,
Rocm,
}Expand description
Hardware-acceleration backend the engine adapter is built and
running with. Reflects compile-time GGML feature flags. Pure CPU
builds (no cuda / metal / vulkan / rocm features) report
Cpu. A build with support but where n_gpu_layers == 0 also
effectively uses CPU at runtime — see AcceleratorInfo::gpu_layers.
New variants may be added in future patch releases (NPU, etc.);
older subscribers should treat unknown variants as Cpu (the
fallback that’s always safe).
Variants§
Cpu
Built without any GPU/accelerator support.
Cuda
Built with CUDA — NVIDIA GPU offload available.
Metal
Built with Metal — Apple GPU offload available.
Vulkan
Built with Vulkan — cross-vendor GPU offload available.
Rocm
Built with HIP/ROCm — AMD GPU offload available.
Implementations§
Trait Implementations§
Source§impl Clone for AcceleratorKind
impl Clone for AcceleratorKind
Source§fn clone(&self) -> AcceleratorKind
fn clone(&self) -> AcceleratorKind
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 moreSource§impl Debug for AcceleratorKind
impl Debug for AcceleratorKind
Source§impl Default for AcceleratorKind
impl Default for AcceleratorKind
Source§fn default() -> AcceleratorKind
fn default() -> AcceleratorKind
Returns the “default value” for a type. Read more
Source§impl PartialEq for AcceleratorKind
impl PartialEq for AcceleratorKind
Source§fn eq(&self, other: &AcceleratorKind) -> bool
fn eq(&self, other: &AcceleratorKind) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AcceleratorKind
impl Eq for AcceleratorKind
impl StructuralPartialEq for AcceleratorKind
Auto Trait Implementations§
impl Freeze for AcceleratorKind
impl RefUnwindSafe for AcceleratorKind
impl Send for AcceleratorKind
impl Sync for AcceleratorKind
impl Unpin for AcceleratorKind
impl UnsafeUnpin for AcceleratorKind
impl UnwindSafe for AcceleratorKind
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