Eager Tensor Operations #
PyTorch-style tensor operations backed by the eager CPU/CUDA tapes. These wrappers record runtime
nodes, dispatch CUDA kernels when requested, and preserve the typed TensorRef surface.
Indexing operations #
Gather a scalar from a 1D vector with a Fin n index. PyTorch: x[i].
Instances For
Gather a row from a 2D tensor with a Fin rows index. PyTorch: x[i] for 2D tensors.
Instances For
Gather a scalar from a 1D vector with a raw Nat index (totalized by the tape op).
Instances For
Dynamic gather scalar using an index stored in NatRef.
Instances For
Dynamic gather row using an index stored in NatRef (out-of-range gives a zero row).
Instances For
Gather k scalars using an explicit index tensor. PyTorch analogue: gather / advanced
indexing.
Instances For
Gather k rows using an explicit index tensor. PyTorch: index_select(dim=0, index=...).
Instances For
Gather k scalars using indices stored in the nat-environment (NatVecRef).
Instances For
Gather k rows using indices stored in the nat-environment (NatVecRef).
Instances For
Scatter-add into a vector: return a copy of x with x[i] += v.
Instances For
Scatter-add into a matrix row: return a copy of x with x[i,:] += v.