Struct cubecl_runtime::tune::TuneBenchmark
source · pub struct TuneBenchmark<S: ComputeServer, C, Out = ()> { /* private fields */ }
Expand description
A benchmark that runs on server handles
Implementations§
source§impl<S: ComputeServer, C, Out> TuneBenchmark<S, C, Out>
impl<S: ComputeServer, C, Out> TuneBenchmark<S, C, Out>
sourcepub fn new(
operation: Box<dyn AutotuneOperation<Out>>,
client: ComputeClient<S, C>,
) -> Self
pub fn new( operation: Box<dyn AutotuneOperation<Out>>, client: ComputeClient<S, C>, ) -> Self
Constructs a new TuneBenchmark
.
Trait Implementations§
source§impl<S: ComputeServer, C: ComputeChannel<S>, Out> Benchmark for TuneBenchmark<S, C, Out>
impl<S: ComputeServer, C: ComputeChannel<S>, Out> Benchmark for TuneBenchmark<S, C, Out>
§type Args = Box<dyn AutotuneOperation<Out>>
type Args = Box<dyn AutotuneOperation<Out>>
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, Out> Freeze for TuneBenchmark<S, C, Out>where
C: Freeze,
impl<S, C, Out = ()> !RefUnwindSafe for TuneBenchmark<S, C, Out>
impl<S, C, Out = ()> !Send for TuneBenchmark<S, C, Out>
impl<S, C, Out = ()> !Sync for TuneBenchmark<S, C, Out>
impl<S, C, Out> Unpin for TuneBenchmark<S, C, Out>where
C: Unpin,
impl<S, C, Out = ()> !UnwindSafe for TuneBenchmark<S, C, Out>
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