pub struct Rates {
pub dram: Option<LaneRate>,
pub link: Option<LaneRate>,
pub matrix: Option<MatrixRate>,
pub arithmetic_per_issue: f64,
pub elements_per_tile: f64,
}Expand description
The per-cycle rates a target’s roofs give for a program whose operands are one element type: what a roofline divides the work by. A resource without a roof has no rate.
Fields§
§dram: Option<LaneRate>§link: Option<LaneRate>§matrix: Option<MatrixRate>§arithmetic_per_issue: f64Operations of the program’s arithmetic one counted issue stands for, priced or not.
elements_per_tile: f64Elements in one of the target’s tiles: what a tile moved is worth to a lane counted in elements.
Implementations§
Source§impl Rates
impl Rates
Sourcepub fn of(t: &SpatialTarget, element: Precision) -> Rates
pub fn of(t: &SpatialTarget, element: Precision) -> Rates
The rates of t’s roofs for a program whose operands are elements.
The work model counts arithmetic as MVMUL_PER_TILE_MATMUL_PER_PASS issues per tile-matmul pass; one
pass of a tile-matmul is 2 · rows · cols · cols operations on the target’s tile.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Rates
impl<'de> Deserialize<'de> for Rates
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Copy for Rates
impl StructuralPartialEq for Rates
Auto Trait Implementations§
impl Freeze for Rates
impl RefUnwindSafe for Rates
impl Send for Rates
impl Sync for Rates
impl Unpin for Rates
impl UnsafeUnpin for Rates
impl UnwindSafe for Rates
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.