Skip to main content

Module tensor

Module tensor 

Source
Expand description

Tensor-compute axes per Wiki ADR-031 (re-export of uor-prism-tensor).

Provides TensorAxis and ActivationAxis with fixed-shape CPU integer-precision reference impls. Variable-rank tensor compute composes through verbs over partition_product!-declared shapes (ADR-033/044).

Modules§

activation
ActivationAxis declaration + parametric element-wise i8 nonlinearity reference impls.
tensor
TensorAxis declaration + parametric square-matmul impl + shape.
verbs
Layer-3 substrate-Term verbs per Wiki ADR-024 + Wiki ADR-055 + Wiki ADR-056 (ψ-residuals discipline scope refined to route bodies only — verb bodies admit comparison + concat + hash composition).

Macros§

axis_extension_impl_for_activation_axis
Wiki ADR-030 companion macro: instantiate AxisExtension for a concrete struct implementing this axis trait. The macro emits an impl AxisExtension for <StructIdent> block that delegates dispatch_kernel to the axis-trait methods per KERNEL_* id. The orphan-rule-conformant per-struct impl mechanism replacing the blanket impl<T: <axis>> AxisExtension for T (which would violate Rust’s orphan rule from any crate that does not define AxisExtension).
axis_extension_impl_for_tensor_axis
Wiki ADR-030 companion macro: instantiate AxisExtension for a concrete struct implementing this axis trait. The macro emits an impl AxisExtension for <StructIdent> block that delegates dispatch_kernel to the axis-trait methods per KERNEL_* id. The orphan-rule-conformant per-struct impl mechanism replacing the blanket impl<T: <axis>> AxisExtension for T (which would violate Rust’s orphan rule from any crate that does not define AxisExtension).

Structs§

CpuI8MatmulSquare
Parametric square DIM × DIM i8 × i8i16 matmul.
CpuI8VectorActivation
Parametric element-wise activation kernels over an N-element i8 vector.
MatrixShape
Parametric ConstrainedTypeShape for a row-major ROWS × COLS matrix of ELEM_BYTES-byte elements. Per ADR-031’s Tensor<Element, Shape> shape commitment, restricted to matrix rank-2 here; higher ranks compose through partition_product! per ADR-033/044.
VectorShape
Parametric ConstrainedTypeShape for a length-N vector of ELEM_BYTES-byte elements. Per ADR-031’s Tensor<Element, Shape> for rank-1.

Constants§

MAX_ACTIVATION_LEN
Maximum vector length any CpuI8VectorActivation instantiation supports.
MAX_TENSOR_DIM
Maximum square dimension any CpuI8MatmulSquare instantiation supports. Cap at 16: output buffer = 2 * 16 * 16 = 512 bytes, inputs = 256 bytes each, total kernel byte budget bounded.
STANDARD_LIBRARY_VERSION
Wiki ADR-031 standard-library version banner.

Traits§

ActivationAxis
Wiki ADR-031 element-wise nonlinearity axis.
TensorAxis
Wiki ADR-031 tensor-compute axis.

Type Aliases§

CpuI8Tensor4x4Matmul
4×4 i8 matmul — the canonical small-tensor reference.
CpuI8Tensor8x8Matmul
8×8 i8 matmul.
CpuI8Tensor16x16Matmul
16×16 i8 matmul (the MAX_TENSOR_DIM ceiling).
CpuI8VectorActivation16
16-element i8 vector activation (the canonical small-vector reference).
CpuI8VectorActivation32
32-element i8 vector activation.
CpuI8VectorActivation64
64-element i8 vector activation.
CpuI8VectorActivation128
128-element i8 vector activation.
CpuI8VectorActivation256
256-element i8 vector activation (the MAX_ACTIVATION_LEN ceiling).