Expand description
Prism standard-library tensor-compute sub-crate.
prism-tensor realizes the tensor Layer-3 of the standard library
named in Wiki ADR-031: declares TensorAxis and
ActivationAxis through the axis! SDK macro and
supplies parametric CPU integer-precision reference impls
preserving bit-determinism per fixed (HostTypes, HostBounds, AxisTuple) selection (per ADR-030’s per-axis
substitution-determinism note).
§Scope
TensorAxis— fixed-shape matmul. Parametric:CpuI8MatmulSquare<DIM>forDIM × DIMi8×i8→i16matrices withDIM ≤ MAX_TENSOR_DIM(16). Aliases:CpuI8Tensor4x4Matmul,CpuI8Tensor8x8Matmul,CpuI8Tensor16x16Matmul.ActivationAxis— element-wise nonlinearity. Parametric:CpuI8VectorActivation<N>for length-Ni8vectors withN ≤ MAX_ACTIVATION_LEN(256). Aliases:CpuI8VectorActivation16,CpuI8VectorActivation32,CpuI8VectorActivation64,CpuI8VectorActivation128,CpuI8VectorActivation256.
§ConstrainedTypeShape declarations
Per ADR-031’s Tensor<Element, Shape> shape commitment:
MatrixShape<ROWS, COLS, ELEM_BYTES>— rank-2 tensor shape.VectorShape<N, ELEM_BYTES>— rank-1 tensor shape.
Higher-rank tensors compose through partition_product! per
ADR-033/044; the axis layer fixes the atom shape.
§Closure under uor-foundation (ADR-013)
Every axis trait declared here has
::uor_foundation::pipeline::AxisExtension as a supertrait;
parametric impls hand-write their AxisExtension impl since the
axis!-emitted companion macro takes :ident.
§See also
Re-exports§
pub use activation::ActivationAxis;pub use activation::CpuI8VectorActivation;pub use activation::CpuI8VectorActivation128;pub use activation::CpuI8VectorActivation16;pub use activation::CpuI8VectorActivation256;pub use activation::CpuI8VectorActivation32;pub use activation::CpuI8VectorActivation64;pub use activation::MAX_ACTIVATION_LEN;pub use tensor::CpuI8MatmulSquare;pub use tensor::CpuI8Tensor16x16Matmul;pub use tensor::CpuI8Tensor4x4Matmul;pub use tensor::CpuI8Tensor8x8Matmul;pub use tensor::MatrixShape;pub use tensor::TensorAxis;pub use tensor::VectorShape;pub use tensor::MAX_TENSOR_DIM;
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).
Constants§
- STANDARD_
LIBRARY_ VERSION - Wiki ADR-031 standard-library version banner.