pub struct ComputeFacts {
pub stages: usize,
pub reductions: usize,
pub per_column_operands: usize,
pub per_row_operands: usize,
pub sfpu: BTreeSet<SfpuKind>,
}Expand description
What a program’s compute stages do, in the vocabulary of the algebra rather than of a backend.
Fields§
§stages: usizeCompute stages in the program.
reductions: usizeStages that fold an axis away — the row reductions.
per_column_operands: usizeStages applying a value that is constant DOWN THE ROWS: a per-COLUMN vector, which is what a normalization’s weight and bias are. The access map omits the row axis.
per_row_operands: usizeStages applying a value that is constant ACROSS A ROW: a per-ROW scalar, which is what a reduction’s result is when it is broadcast back. The access map omits the column axis.
sfpu: BTreeSet<SfpuKind>Every SFPU transform the program applies, anywhere in a body (including nested inside arithmetic, which is where fusion puts them).
Implementations§
Source§impl ComputeFacts
impl ComputeFacts
Sourcepub fn applies_a_per_column_operand(&self) -> bool
pub fn applies_a_per_column_operand(&self) -> bool
Whether the program applies a per-column vector — a weight or a bias.
Sourcepub fn rescales_by_a_per_row_scalar(&self) -> bool
pub fn rescales_by_a_per_row_scalar(&self) -> bool
Whether the program broadcasts a per-row scalar back across its row — a rescale.
Trait Implementations§
Source§impl Clone for ComputeFacts
impl Clone for ComputeFacts
Source§fn clone(&self) -> ComputeFacts
fn clone(&self) -> ComputeFacts
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ComputeFacts
impl Debug for ComputeFacts
Source§impl Default for ComputeFacts
impl Default for ComputeFacts
Source§fn default() -> ComputeFacts
fn default() -> ComputeFacts
Source§impl PartialEq for ComputeFacts
impl PartialEq for ComputeFacts
impl Eq for ComputeFacts
impl StructuralPartialEq for ComputeFacts
Auto Trait Implementations§
impl Freeze for ComputeFacts
impl RefUnwindSafe for ComputeFacts
impl Send for ComputeFacts
impl Sync for ComputeFacts
impl Unpin for ComputeFacts
impl UnsafeUnpin for ComputeFacts
impl UnwindSafe for ComputeFacts
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
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.