pub struct Op {
pub sym: Sym,
pub ins: Vec<String>,
pub access: Vec<Access>,
pub out: String,
pub dst: Dst,
pub keeps: Vec<String>,
pub covers: Vec<usize>,
}Expand description
One op of the graph: its symbol, its operands and how it reads each, its result and where that lands, the further results it writes whole, and the lifted ops it computes.
Fields§
§sym: Sym§ins: Vec<String>§access: Vec<Access>§out: String§dst: Dst§keeps: Vec<String>§covers: Vec<usize>Implementations§
Source§impl Op
impl Op
Sourcepub fn prim(&self) -> Option<&TensorOpSpec>
pub fn prim(&self) -> Option<&TensorOpSpec>
The primitive a lifted op is.
Sourcepub fn kind(&self) -> &str
pub fn kind(&self) -> &str
The op’s kind: a primitive’s, a fused symbol’s class, View or Quantize.
Sourcepub fn result(&self) -> Option<&str>
pub fn result(&self) -> Option<&str>
The tensor the op computes whole into a buffer of its own: not one it lands rows or units of another in, nor one it updates in place (a row written into a table, an activation’s quantized form).
Sourcepub fn state_inputs(&self) -> Vec<usize>
pub fn state_inputs(&self) -> Vec<usize>
The positions in ins of the operands the op writes in place: a primitive’s state, or any part’s.
Sourcepub fn writes(&self) -> Vec<&str>
pub fn writes(&self) -> Vec<&str>
Every tensor the op writes: its destination’s buffer, what it writes in place, what it keeps, and — for a fused op — every table or wider tensor a part lands its result in.
Sourcepub fn row_params(&self) -> Vec<&str>
pub fn row_params(&self) -> Vec<&str>
The parameters that name the rows the op’s result, or any part’s, lands in.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Op
impl RefUnwindSafe for Op
impl Send for Op
impl Sync for Op
impl Unpin for Op
impl UnsafeUnpin for Op
impl UnwindSafe for Op
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.