pub struct LlamaBackendDevice {
pub index: usize,
pub name: String,
pub description: String,
pub backend: String,
pub memory_total: usize,
pub memory_free: usize,
pub device_type: LlamaBackendDeviceType,
}Expand description
A ggml backend device
The index is can be used from LlamaModelParams::with_devices to select specific devices.
Fields§
§index: usizeThe index of the device
The index is can be used from LlamaModelParams::with_devices to select specific devices.
name: StringThe name of the device (e.g. “Vulkan0”)
description: StringA description of the device (e.g. “NVIDIA GeForce RTX 3080”)
backend: StringThe backend of the device (e.g. “Vulkan”, “CUDA”, “CPU”)
memory_total: usizeTotal memory of the device in bytes
memory_free: usizeFree memory of the device in bytes
device_type: LlamaBackendDeviceTypeDevice type
Trait Implementations§
Source§impl Clone for LlamaBackendDevice
impl Clone for LlamaBackendDevice
Source§fn clone(&self) -> LlamaBackendDevice
fn clone(&self) -> LlamaBackendDevice
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LlamaBackendDevice
impl RefUnwindSafe for LlamaBackendDevice
impl Send for LlamaBackendDevice
impl Sync for LlamaBackendDevice
impl Unpin for LlamaBackendDevice
impl UnwindSafe for LlamaBackendDevice
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