Struct cubecl_runtime::tune::TuneBenchmark
source · pub struct TuneBenchmark<S: ComputeServer, C> { /* private fields */ }
Expand description
A benchmark that runs on server handles
Implementations§
source§impl<S: ComputeServer, C> TuneBenchmark<S, C>
impl<S: ComputeServer, C> TuneBenchmark<S, C>
sourcepub fn new(
operation: Box<dyn AutotuneOperation>,
client: ComputeClient<S, C>,
) -> Self
pub fn new( operation: Box<dyn AutotuneOperation>, client: ComputeClient<S, C>, ) -> Self
Constructs a new TuneBenchmark
.
Trait Implementations§
source§impl<S: ComputeServer, C: ComputeChannel<S>> Benchmark for TuneBenchmark<S, C>
impl<S: ComputeServer, C: ComputeChannel<S>> Benchmark for TuneBenchmark<S, C>
§type Args = Box<dyn AutotuneOperation>
type Args = Box<dyn AutotuneOperation>
Benchmark arguments.
source§fn prepare(&self) -> Self::Args
fn prepare(&self) -> Self::Args
Prepare the benchmark, run anything that is essential for the benchmark, but shouldn’t
count as included in the duration. Read more
source§fn num_samples(&self) -> usize
fn num_samples(&self) -> usize
Number of samples per run required to have a statistical significance.
source§fn execute(&self, operation: Self::Args)
fn execute(&self, operation: Self::Args)
Execute the benchmark and returns the time it took to complete.
source§fn name(&self) -> String
fn name(&self) -> String
Name of the benchmark, should be short and it should match the name
defined in the crate Cargo.toml
source§fn run(&self) -> BenchmarkDurations
fn run(&self) -> BenchmarkDurations
Run the benchmark a number of times.
Auto Trait Implementations§
impl<S, C> Freeze for TuneBenchmark<S, C>where
C: Freeze,
impl<S, C> !RefUnwindSafe for TuneBenchmark<S, C>
impl<S, C> !Send for TuneBenchmark<S, C>
impl<S, C> !Sync for TuneBenchmark<S, C>
impl<S, C> Unpin for TuneBenchmark<S, C>where
C: Unpin,
impl<S, C> !UnwindSafe for TuneBenchmark<S, C>
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