pub struct ModuleCall<'a, M: ?Sized + Module> { /* private fields */ }Expand description
Fluent call-site for inlining a sub-Module’s body. Inlining
rather than FunctionProto calls so independent branches inside
the sub-Module run as soon as their inputs are ready (not
blocked on a single CALL barrier).
Implementations§
Source§impl<M: ?Sized + Module> ModuleCall<'_, M>
impl<M: ?Sized + Module> ModuleCall<'_, M>
Sourcepub fn input(self, name: &'static str, handle: Output) -> Self
pub fn input(self, name: &'static str, handle: Output) -> Self
Bind a named input to a value the caller already produced.
Sourcepub fn build(self, g: &mut Graph) -> ModuleOutputs<'_>
pub fn build(self, g: &mut Graph) -> ModuleOutputs<'_>
Record the sub-Module’s body into g. Pull named outputs
from the returned ModuleOutputs.
ⓘ
let coord_out = self.coordinator.call().input("incoming", q).build(g);
let grad = coord_out.output("aggregated_grad");Sourcepub fn bootstrap(self, g: &mut Graph) -> ModuleOutputs<'_>
pub fn bootstrap(self, g: &mut Graph) -> ModuleOutputs<'_>
Compose a child Module’s bootstrap into the parent’s
bootstrap. Emits a CALL to "<name>__bootstrap"; body-phase
ops gate until the child’s CallContext drops.
Auto Trait Implementations§
impl<'a, M> Freeze for ModuleCall<'a, M>where
M: ?Sized,
impl<'a, M> RefUnwindSafe for ModuleCall<'a, M>where
M: RefUnwindSafe + ?Sized,
impl<'a, M> Send for ModuleCall<'a, M>
impl<'a, M> Sync for ModuleCall<'a, M>
impl<'a, M> Unpin for ModuleCall<'a, M>where
M: ?Sized,
impl<'a, M> UnsafeUnpin for ModuleCall<'a, M>where
M: ?Sized,
impl<'a, M> UnwindSafe for ModuleCall<'a, M>where
M: RefUnwindSafe + ?Sized,
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