pub struct ComputeGraph {
pub nodes: Vec<TensorNode>,
pub n_leafs: usize,
}Expand description
Compute graph: topologically sorted list of tensor operations.
Built once per model architecture, reused every decode step. Only the data pointers and parameters change between steps.
Fields§
§nodes: Vec<TensorNode>Nodes in topological order (leafs first, output last)
n_leafs: usizeNumber of leaf nodes (inputs, no operation)
Implementations§
Source§impl ComputeGraph
impl ComputeGraph
Trait Implementations§
Source§impl Clone for ComputeGraph
impl Clone for ComputeGraph
Source§fn clone(&self) -> ComputeGraph
fn clone(&self) -> ComputeGraph
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ComputeGraph
impl Debug for ComputeGraph
Auto Trait Implementations§
impl Freeze for ComputeGraph
impl RefUnwindSafe for ComputeGraph
impl Send for ComputeGraph
impl Sync for ComputeGraph
impl Unpin for ComputeGraph
impl UnsafeUnpin for ComputeGraph
impl UnwindSafe for ComputeGraph
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