pub struct ViewOutput {
pub input_index: usize,
pub shape: Vec<usize>,
pub strides: Vec<i64>,
pub byte_offset: usize,
}Expand description
A zero-copy view output: a kernel’s declaration that one of its outputs
is a strided view aliasing one of its inputs’ buffers, rather than freshly
computed bytes (docs/ORT2.md §5.4, lazy PyTorch-style views).
The shape / strides / byte_offset describe the output tensor relative
to the same base pointer as the referenced input view (i.e. relative to
the input’s backing allocation, honoring any offset that input itself
already carried). Strides are in elements and may be negative (DLPack).
The executor records this metadata against the output value and does not
allocate a buffer or invoke the compute path for that slot; the source
buffer is kept alive until the view’s consumers have run.
Fields§
§input_index: usizePositional index (into the kernel’s inputs) of the aliased input.
shape: Vec<usize>Output shape.
strides: Vec<i64>Output element strides relative to the aliased input’s base pointer.
byte_offset: usizeByte offset of the output element origin from the aliased input’s base.
Trait Implementations§
Source§impl Clone for ViewOutput
impl Clone for ViewOutput
Source§fn clone(&self) -> ViewOutput
fn clone(&self) -> ViewOutput
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more