pub struct TensorNode {
pub op: TensorOp,
pub data_ptr: u64,
pub shape: [u32; 4],
pub inputs: Vec<usize>,
pub params: OpParams,
}Expand description
A node in the compute graph.
Each node represents a tensor operation with device-memory pointers to its data and references to input nodes (by index).
Fields§
§op: TensorOpOperation to perform
data_ptr: u64Device pointer to output data
shape: [u32; 4]Output dimensions [rows, cols, batch, unused]
inputs: Vec<usize>Indices of input nodes in the graph (max 3: src0, src1, src2)
params: OpParamsOperation-specific parameters (e.g., epsilon for RmsNorm, position for RoPE)
Trait Implementations§
Source§impl Clone for TensorNode
impl Clone for TensorNode
Source§fn clone(&self) -> TensorNode
fn clone(&self) -> TensorNode
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 moreAuto Trait Implementations§
impl Freeze for TensorNode
impl RefUnwindSafe for TensorNode
impl Send for TensorNode
impl Sync for TensorNode
impl Unpin for TensorNode
impl UnsafeUnpin for TensorNode
impl UnwindSafe for TensorNode
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