pub struct BackendCapabilities {Show 16 fields
pub supported_dtypes: Vec<DataType>,
pub supported_devices: Vec<Device>,
pub max_tensor_dims: usize,
pub supports_fp16: bool,
pub supports_bf16: bool,
pub supports_int8: bool,
pub supports_flash_attention: bool,
pub supports_paged_attention: bool,
pub supports_tensor_parallelism: bool,
pub supports_pipeline_parallelism: bool,
pub max_batch_size: usize,
pub max_sequence_length: usize,
pub memory_alignment: usize,
pub supports_custom_kernels: bool,
pub supports_cuda_graphs: bool,
pub extra_capabilities: HashMap<String, Value>,
}Expand description
Backend capabilities description
Fields§
§supported_dtypes: Vec<DataType>Supported data types
supported_devices: Vec<Device>Supported devices
max_tensor_dims: usizeMaximum tensor dimensions supported
supports_fp16: boolWhether backend supports FP16 operations
supports_bf16: boolWhether backend supports BF16 operations
supports_int8: boolWhether backend supports INT8 quantization
supports_flash_attention: boolWhether backend supports flash attention
supports_paged_attention: boolWhether backend supports paged attention
supports_tensor_parallelism: boolWhether backend supports tensor parallelism
supports_pipeline_parallelism: boolWhether backend supports pipeline parallelism
max_batch_size: usizeMaximum batch size supported
max_sequence_length: usizeMaximum sequence length supported
memory_alignment: usizeMemory alignment requirements
supports_custom_kernels: boolWhether backend supports custom kernels
supports_cuda_graphs: boolWhether backend supports CUDA graphs
extra_capabilities: HashMap<String, Value>Additional capabilities
Implementations§
Source§impl BackendCapabilities
impl BackendCapabilities
Sourcepub fn meets_requirements(&self, requirements: &BackendRequirements) -> bool
pub fn meets_requirements(&self, requirements: &BackendRequirements) -> bool
Check if capabilities meet requirements
Trait Implementations§
Source§impl Clone for BackendCapabilities
impl Clone for BackendCapabilities
Source§fn clone(&self) -> BackendCapabilities
fn clone(&self) -> BackendCapabilities
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 moreSource§impl Debug for BackendCapabilities
impl Debug for BackendCapabilities
Source§impl<'de> Deserialize<'de> for BackendCapabilities
impl<'de> Deserialize<'de> for BackendCapabilities
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BackendCapabilities
impl RefUnwindSafe for BackendCapabilities
impl Send for BackendCapabilities
impl Sync for BackendCapabilities
impl Unpin for BackendCapabilities
impl UnsafeUnpin for BackendCapabilities
impl UnwindSafe for BackendCapabilities
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