pub struct WgpuCostModel { /* private fields */ }Expand description
Heuristic wgpu (Device::Gpu) cost model.
Implementations§
Source§impl WgpuCostModel
impl WgpuCostModel
Trait Implementations§
Source§impl BackendCostModel for WgpuCostModel
Available on crate feature gpu only.
impl BackendCostModel for WgpuCostModel
Available on crate feature
gpu only.Source§fn sgemm_gflops(&self, _m: usize, _k: usize, _n: usize) -> f64
fn sgemm_gflops(&self, _m: usize, _k: usize, _n: usize) -> f64
Effective f32 sgemm throughput in GFLOP/s for the most-used kernel
path at the given dimensions. Backends should return their best
sustained rate (not peak).
Source§fn dispatch_overhead_ns(&self) -> f64
fn dispatch_overhead_ns(&self) -> f64
Cost to dispatch one kernel (function call, BLAS setup, etc.) in ns.
Source§fn roundtrip_overhead_ns(&self) -> f64
fn roundtrip_overhead_ns(&self) -> f64
Cost to commit + wait for a command buffer / forward pass in ns.
Roughly amortized per-forward overhead independent of kernel count.
Source§fn num_threads(&self) -> usize
fn num_threads(&self) -> usize
Number of compute threads available.
Auto Trait Implementations§
impl Freeze for WgpuCostModel
impl RefUnwindSafe for WgpuCostModel
impl Send for WgpuCostModel
impl Sync for WgpuCostModel
impl Unpin for WgpuCostModel
impl UnsafeUnpin for WgpuCostModel
impl UnwindSafe for WgpuCostModel
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
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