pub struct ThroughputBenchmarker { /* private fields */ }Expand description
A marker for measuring throughput of compute kernels.
Implementations§
Source§impl ThroughputBenchmarker
impl ThroughputBenchmarker
Sourcepub fn new(cache: Arc<Mutex<ThroughputCache>>) -> ThroughputBenchmarker
pub fn new(cache: Arc<Mutex<ThroughputCache>>) -> ThroughputBenchmarker
Creates a new ThroughputBenchmarker with the given cache.
Sourcepub fn measure<R>(
&mut self,
client: &ComputeClient<R>,
key: ThroughputKey,
kernel_config: KernelConfig,
) -> ThroughputValuewhere
R: Runtime,
pub fn measure<R>(
&mut self,
client: &ComputeClient<R>,
key: ThroughputKey,
kernel_config: KernelConfig,
) -> ThroughputValuewhere
R: Runtime,
Measure the maximum compute throughput of the given kernel on the given client. Warms up the kernel until it plateaus, then measures the throughput over multiple iterations taking the minimum time per iteration (peak attained).
Auto Trait Implementations§
impl !RefUnwindSafe for ThroughputBenchmarker
impl !UnwindSafe for ThroughputBenchmarker
impl Freeze for ThroughputBenchmarker
impl Send for ThroughputBenchmarker
impl Sync for ThroughputBenchmarker
impl Unpin for ThroughputBenchmarker
impl UnsafeUnpin for ThroughputBenchmarker
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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