pub struct Link<'a> {
pub g: &'a TensorGraph,
pub constants: &'a BTreeMap<String, Placement>,
pub shim: &'a LaneShim,
pub io: &'a StepIo,
}Expand description
What the link reads beside an op: the optimized graph, where each constant lives, the lane’s shim, and the names the step carries across steps.
Fields§
§g: &'a TensorGraph§constants: &'a BTreeMap<String, Placement>§shim: &'a LaneShim§io: &'a StepIoImplementations§
Source§impl Link<'_>
impl Link<'_>
Sourcepub fn op(&self, op: &Op) -> Result<Vec<(Launch, Vec<usize>)>, String>
pub fn op(&self, op: &Op) -> Result<Vec<(Launch, Vec<usize>)>, String>
The launches op runs as, in order, each with the lifted ops it computes.
Sourcepub fn whole(&self, op: &Op) -> Result<Vec<(Launch, Vec<usize>)>, String>
pub fn whole(&self, op: &Op) -> Result<Vec<(Launch, Vec<usize>)>, String>
The launches a fused op runs as when the lane links its class whole, whatever the shim answers for the class: an
error where the lane has no launch for the class, or where the op is one its kernels cannot run
(LaneShim::fits).
Auto Trait Implementations§
impl<'a> Freeze for Link<'a>
impl<'a> RefUnwindSafe for Link<'a>
impl<'a> Send for Link<'a>
impl<'a> Sync for Link<'a>
impl<'a> Unpin for Link<'a>
impl<'a> UnsafeUnpin for Link<'a>
impl<'a> UnwindSafe for Link<'a>
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
§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.