pub trait TensorAxis: AxisExtension {
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§
const AXIS_ADDRESS: &'static str = "https://uor.foundation/axis/TensorAxis"
Sourceconst MAX_OUTPUT_BYTES: usize = 32
const MAX_OUTPUT_BYTES: usize = 32
2 * MAX_TENSOR_DIM * MAX_TENSOR_DIM = 512 bytes for
16×16. Overridden per impl.
Required Methods§
Sourcefn matmul(input: &[u8], out: &mut [u8]) -> Result<usize, ShapeViolation>
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", so this trait is not object safe.