Skip to main content

Crate prism_tensor

Crate prism_tensor 

Source
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

§ConstrainedTypeShape declarations

Per ADR-031’s Tensor<Element, Shape> shape commitment:

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
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).

Constants§

STANDARD_LIBRARY_VERSION
Wiki ADR-031 standard-library version banner.