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>

source

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>

§

type Args = Box<dyn AutotuneOperation<Out>>

Benchmark arguments.
source§

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

Number of samples per run required to have a statistical significance.
source§

fn execute(&self, operation: Self::Args)

Execute the benchmark and returns the time it took to complete.
source§

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 sync(&self)

Wait for computed to be over
source§

fn options(&self) -> Option<String>

The options passed to the benchmark.
source§

fn shapes(&self) -> Vec<Vec<usize>>

Shapes dimensions
source§

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> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V