CUDA Tape Operations: Shape and Reduction Nodes #
Reductions / views #
Reduce-sum of all entries, producing a scalar.
Instances For
Flatten s into a 1D vector of length Shape.size s.
Instances For
Swap adjacent axes at a given depth in an N-D buffer.
If depth is out of range, this is treated as the identity (matches the spec-layer helper).
Instances For
def
Runtime.Autograd.Cuda.Tape.broadcastTo
{s₁ s₂ : Spec.Shape}
(t : Tape)
(cb : s₁.CanBroadcastTo s₂)
(xId : ℕ)
:
Broadcast x : s₁ to s₂.
Forward: broadcastTo.
Backward: sum-reduce broadcasted axes (reduceFromBroadcastTo).
Instances For
def
Runtime.Autograd.Cuda.Tape.reduceSum
{s : Spec.Shape}
(axis : ℕ)
[valid : Spec.Shape.valid_axis_inst axis s]
[wf : s.WellFormed]
(t : Tape)
(xId : ℕ)
:
Reduce-sum along axis.
Instances For
def
Runtime.Autograd.Cuda.Tape.reduceMean
{s : Spec.Shape}
(axis : ℕ)
[valid : Spec.Shape.valid_axis_inst axis s]
[wf : s.WellFormed]
(t : Tape)
(xId : ℕ)
:
Reduce-mean along axis.