Skip to main content

TensorAxis

Trait TensorAxis 

Source
pub trait TensorAxis {
    const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/TensorAxis";
    const MAX_OUTPUT_BYTES: usize = 32;

    // Required method
    fn matmul(input: &[u8], out: &mut [u8]) -> Result<usize, ShapeViolation>;
}
Expand description

Wiki ADR-031 tensor-compute axis.

The reference impl CpuI8MatmulSquare<DIM> is parametric in DIM for square DIM × DIM i8 matrices, emitting a DIM × DIM i16 product (saturating) per ADR-030’s bit-determinism commitment.

Provided Associated Constants§

Source

const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/TensorAxis"

Source

const MAX_OUTPUT_BYTES: usize = 32

Per-impl structural output-byte hint (<Impl as TensorAxis>::MAX_OUTPUT_BYTES). Per ADR-060 the foundation derives carrier widths from the application’s HostBounds structural-count primitives; the axis impl carries no substrate-arbitrary byte-width cap.

Required Methods§

Source

fn matmul(input: &[u8], out: &mut [u8]) -> Result<usize, ShapeViolation>

Multiply two row-major DIM × DIM i8 matrices into a DIM × DIM i16 product (saturating). Input is A || B (2 * DIM * DIM bytes); output is 2 * DIM * DIM bytes.

§Errors

Returns ShapeViolation on input/output byte-length mismatch.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<const DIM: usize> TensorAxis for CpuI8MatmulSquare<DIM>

Source§

const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/TensorAxis/CpuI8MatmulSquare"

Source§

const MAX_OUTPUT_BYTES: usize