pub struct DispatchConfig {
pub format: Format,
pub device: DevicePreference,
pub sparse_threshold: f32,
pub gpu_threshold: usize,
pub cache_conversions: bool,
}Expand description
Configuration for kernel dispatch.
Fields§
§format: FormatPreferred format for operations
device: DevicePreferenceDevice preference
sparse_threshold: f32Sparsity threshold for automatic sparse selection (default: 0.90)
gpu_threshold: usizeMinimum dimensions for GPU dispatch (default: 4096)
cache_conversions: boolEnable format caching for repeated operations
Implementations§
Source§impl DispatchConfig
impl DispatchConfig
Sourcepub fn with_format(self, format: Format) -> Self
pub fn with_format(self, format: Format) -> Self
Set preferred format.
Sourcepub fn with_device(self, device: DevicePreference) -> Self
pub fn with_device(self, device: DevicePreference) -> Self
Set device preference.
Sourcepub fn with_sparse_threshold(self, threshold: f32) -> Self
pub fn with_sparse_threshold(self, threshold: f32) -> Self
Set sparsity threshold for automatic sparse format selection.
Sourcepub fn with_gpu_threshold(self, threshold: usize) -> Self
pub fn with_gpu_threshold(self, threshold: usize) -> Self
Set minimum dimensions for GPU dispatch.
Trait Implementations§
Source§impl Clone for DispatchConfig
impl Clone for DispatchConfig
Source§fn clone(&self) -> DispatchConfig
fn clone(&self) -> DispatchConfig
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 DispatchConfig
impl Debug for DispatchConfig
Auto Trait Implementations§
impl Freeze for DispatchConfig
impl RefUnwindSafe for DispatchConfig
impl Send for DispatchConfig
impl Sync for DispatchConfig
impl Unpin for DispatchConfig
impl UnwindSafe for DispatchConfig
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