pub struct CpuCostModel(/* private fields */);Expand description
BackendCostModel impl backed by rlx_cpu::cost::HwModel.
Implementations§
Source§impl CpuCostModel
impl CpuCostModel
Trait Implementations§
Source§impl BackendCostModel for CpuCostModel
Available on crate feature cpu only.
impl BackendCostModel for CpuCostModel
Available on crate feature
cpu 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 CpuCostModel
impl RefUnwindSafe for CpuCostModel
impl Send for CpuCostModel
impl Sync for CpuCostModel
impl Unpin for CpuCostModel
impl UnsafeUnpin for CpuCostModel
impl UnwindSafe for CpuCostModel
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