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
ActivationAxisdeclaration + parametric element-wise i8 nonlinearity reference impls.- tensor
TensorAxisdeclaration + 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
AxisExtensionfor a concrete struct implementing this axis trait. The macro emits animpl AxisExtension for <StructIdent>block that delegatesdispatch_kernelto the axis-trait methods perKERNEL_*id. The orphan-rule-conformant per-struct impl mechanism replacing the blanketimpl<T: <axis>> AxisExtension for T(which would violate Rust’s orphan rule from any crate that does not defineAxisExtension). - axis_
extension_ impl_ for_ tensor_ axis - Wiki ADR-030 companion macro: instantiate
AxisExtensionfor a concrete struct implementing this axis trait. The macro emits animpl AxisExtension for <StructIdent>block that delegatesdispatch_kernelto the axis-trait methods perKERNEL_*id. The orphan-rule-conformant per-struct impl mechanism replacing the blanketimpl<T: <axis>> AxisExtension for T(which would violate Rust’s orphan rule from any crate that does not defineAxisExtension).
Structs§
- CpuI8
Matmul Square - Parametric square
DIM × DIMi8×i8→i16matmul. - CpuI8
Vector Activation - Parametric element-wise activation kernels over an
N-elementi8vector. - Matrix
Shape - Parametric ConstrainedTypeShape for a row-major
ROWS × COLSmatrix ofELEM_BYTES-byte elements. Per ADR-031’sTensor<Element, Shape>shape commitment, restricted to matrix rank-2 here; higher ranks compose throughpartition_product!per ADR-033/044. - Vector
Shape - Parametric ConstrainedTypeShape for a length-
Nvector ofELEM_BYTES-byte elements. Per ADR-031’sTensor<Element, Shape>for rank-1.
Constants§
- MAX_
ACTIVATION_ LEN - Maximum vector length any
CpuI8VectorActivationinstantiation supports. - MAX_
TENSOR_ DIM - Maximum square dimension any
CpuI8MatmulSquareinstantiation 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§
- Activation
Axis - Wiki ADR-031 element-wise nonlinearity axis.
- Tensor
Axis - Wiki ADR-031 tensor-compute axis.
Type Aliases§
- CpuI8
Tensor4x4 Matmul - 4×4
i8matmul — the canonical small-tensor reference. - CpuI8
Tensor8x8 Matmul - 8×8
i8matmul. - CpuI8
Tensor16x16 Matmul - 16×16
i8matmul (theMAX_TENSOR_DIMceiling). - CpuI8
Vector Activation16 - 16-element
i8vector activation (the canonical small-vector reference). - CpuI8
Vector Activation32 - 32-element
i8vector activation. - CpuI8
Vector Activation64 - 64-element
i8vector activation. - CpuI8
Vector Activation128 - 128-element
i8vector activation. - CpuI8
Vector Activation256 - 256-element
i8vector activation (theMAX_ACTIVATION_LENceiling).