Operation-Polymorphic Tensor Programs #
Program is model code abstract over a tensor-operation interpreter. Supplying the eager
interpreter executes operations immediately and records a dynamic tape; supplying the typed-graph
interpreter records reusable shape-indexed SSA data.
The execution-polymorphic surface shared by eager and typed-graph execution.
Operation-reference notation #
A tensor reference under the currently selected operation interpreter.
Instances For
Apply a single-sample operation independently along a leading axis.
Instances For
Prefix-polymorphic derived operations #
Apply a single-sample operation independently over an arbitrary prefix shape.
Instances For
Affine transformation of the final axis, independently over any prefix shape.
Instances For
Rank-polymorphic convolution over channels-first inputs with any prefix shape.
Instances For
Rank-polymorphic transpose convolution over channels-first inputs with any prefix shape.
Instances For
Rank-polymorphic max pooling over channels-first inputs with any prefix shape.
Instances For
Rank-polymorphic average pooling over channels-first inputs with any prefix shape.
Instances For
Batched rank-polymorphic smooth maximum pooling over channels-first inputs.
Instances For
Layer normalization over the final axis of an arbitrary tensor.
Backends expose a matrix-shaped fused primitive. This wrapper gives that primitive its rank-polymorphic TorchLean interface by flattening the leading axes once and restoring them after the operation. Empty leading axes produce the unique empty tensor without invoking a backend kernel that requires a positive row count.
Instances For
Multi-head self-attention over any prefix shape.
Instances For
Multi-head attention followed by a trainable output-feature bias.
Instances For
An execution-polymorphic differentiable tensor program.
Instances For
An execution-polymorphic program with differentiable tensors followed by non-differentiable data
tensors. The data element type is explicit; for example, token models may use Fin vocab so an
out-of-range token is unrepresentable.