Struct cubecl_core::tune::TuneBenchmark
source · pub struct TuneBenchmark<S, C, Out = ()>where
S: ComputeServer,{ /* private fields */ }
Expand description
A benchmark that runs on server handles
Implementations§
source§impl<S, C, Out> TuneBenchmark<S, C, Out>where
S: ComputeServer,
impl<S, C, Out> TuneBenchmark<S, C, Out>where
S: ComputeServer,
sourcepub fn new(
operation: Box<dyn AutotuneOperation<Out>>,
client: ComputeClient<S, C>,
) -> TuneBenchmark<S, C, Out>
pub fn new( operation: Box<dyn AutotuneOperation<Out>>, client: ComputeClient<S, C>, ) -> TuneBenchmark<S, C, Out>
Constructs a new TuneBenchmark
.
Trait Implementations§
source§impl<S, C, Out> Benchmark for TuneBenchmark<S, C, Out>where
S: ComputeServer,
C: ComputeChannel<S>,
impl<S, C, Out> Benchmark for TuneBenchmark<S, C, Out>where
S: ComputeServer,
C: ComputeChannel<S>,
§type Args = Box<dyn AutotuneOperation<Out>>
type Args = Box<dyn AutotuneOperation<Out>>
Benchmark arguments.
source§fn prepare(&self) -> <TuneBenchmark<S, C, Out> as Benchmark>::Args
fn prepare(&self) -> <TuneBenchmark<S, C, Out> as Benchmark>::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: <TuneBenchmark<S, C, Out> as Benchmark>::Args)
fn execute(&self, operation: <TuneBenchmark<S, C, Out> as Benchmark>::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