pub struct AcceleratorInfo {
pub kind: AcceleratorKind,
pub gpu_layers: u32,
}Expand description
Snapshot of the active hardware-acceleration configuration.
kind is the compile-time GGML backend this engine was built with;
gpu_layers is the runtime configuration the adapter was
constructed with. A backend that compiled with cuda but was
configured with n_gpu_layers = 0 reports kind = Cuda, gpu_layers = 0 — i.e. CUDA-capable but currently CPU-bound. The
distinction is useful: it tells consumers the daemon could
accelerate if reconfigured, vs. it can never accelerate without a
rebuild.
Fields§
§kind: AcceleratorKindCompile-time GGML backend.
gpu_layers: u32Layers offloaded to the accelerator at construction time. 0
means CPU-only at runtime regardless of kind.
Trait Implementations§
Source§impl Clone for AcceleratorInfo
impl Clone for AcceleratorInfo
Source§fn clone(&self) -> AcceleratorInfo
fn clone(&self) -> AcceleratorInfo
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 AcceleratorInfo
impl Debug for AcceleratorInfo
Source§impl Default for AcceleratorInfo
impl Default for AcceleratorInfo
Source§fn default() -> AcceleratorInfo
fn default() -> AcceleratorInfo
Returns the “default value” for a type. Read more
Source§impl PartialEq for AcceleratorInfo
impl PartialEq for AcceleratorInfo
Source§fn eq(&self, other: &AcceleratorInfo) -> bool
fn eq(&self, other: &AcceleratorInfo) -> bool
Tests for
self and other values to be equal, and is used by ==.impl Copy for AcceleratorInfo
impl Eq for AcceleratorInfo
impl StructuralPartialEq for AcceleratorInfo
Auto Trait Implementations§
impl Freeze for AcceleratorInfo
impl RefUnwindSafe for AcceleratorInfo
impl Send for AcceleratorInfo
impl Sync for AcceleratorInfo
impl Unpin for AcceleratorInfo
impl UnsafeUnpin for AcceleratorInfo
impl UnwindSafe for AcceleratorInfo
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