pub struct KernelTuner { /* private fields */ }Expand description
Automatic kernel tuner
Implementations§
Source§impl KernelTuner
impl KernelTuner
Sourcepub fn new(config: TuningConfig) -> Result<Self>
pub fn new(config: TuningConfig) -> Result<Self>
Create a new kernel tuner
Sourcepub fn for_backend(backend: Backend, config: TuningConfig) -> Result<Self>
pub fn for_backend(backend: Backend, config: TuningConfig) -> Result<Self>
Create tuner for specific backend
Sourcepub fn tune_matmul(
&mut self,
m: usize,
n: usize,
k: usize,
) -> Result<KernelParams>
pub fn tune_matmul( &mut self, m: usize, n: usize, k: usize, ) -> Result<KernelParams>
Get or tune parameters for matrix multiplication
Sourcepub fn tune_operation(
&mut self,
operation: Operation,
input_shape: &[usize],
) -> Result<KernelParams>
pub fn tune_operation( &mut self, operation: Operation, input_shape: &[usize], ) -> Result<KernelParams>
Tune parameters for a generic operation
Sourcepub fn save_cache(&mut self) -> Result<()>
pub fn save_cache(&mut self) -> Result<()>
Save tuning cache to disk
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear all cached tuning results
Sourcepub fn platform_info(&self) -> &PlatformInfo
pub fn platform_info(&self) -> &PlatformInfo
Get platform information
Sourcepub fn get_statistics(&self) -> TuningStatistics
pub fn get_statistics(&self) -> TuningStatistics
Get tuning statistics
Trait Implementations§
Auto Trait Implementations§
impl Freeze for KernelTuner
impl RefUnwindSafe for KernelTuner
impl Send for KernelTuner
impl Sync for KernelTuner
impl Unpin for KernelTuner
impl UnsafeUnpin for KernelTuner
impl UnwindSafe for KernelTuner
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more