Skip to main content

CpuI8MatmulSquare

Struct CpuI8MatmulSquare 

Source
pub struct CpuI8MatmulSquare<const DIM: usize>;
Expand description

Parametric square DIM × DIM i8 × i8i16 matmul.

Determinism: per ADR-030’s per-axis substitution-determinism note, the integer-arithmetic CPU impl preserves bit-identity across targets. DIM is the square dimension; for non-square / non-integer / variable-shape tensor compute the wiki’s pattern is to compose this axis kernel through verbs over partition_product! (per ADR-033/044) — the axis layer fixes the atom shape.

§HostBounds discipline

DIM is unconstrained at the axis level. Per Wiki ADR-060 the foundation removed the AXIS_OUTPUT_BYTES_MAX cap: a CpuI8MatmulSquare<DIM> kernel’s 2 * DIM * DIM-byte output flows through the source-polymorphic TermValue carrier, whose widths derive from the application’s HostBounds structural-count primitives via foundation const fns — never a pinned byte-width literal. Specific DIM values (4, 8, 16, 32, 64, …) are picked by the application; this crate imposes no ceiling.

Trait Implementations§

Source§

impl<const INLINE_BYTES: usize, const DIM: usize> AxisExtension<INLINE_BYTES> for CpuI8MatmulSquare<DIM>

Source§

const AXIS_ADDRESS: &'static str = <CpuI8MatmulSquare<DIM> as TensorAxis>::AXIS_ADDRESS

ADR-017 content address of this axis trait. The SDK macro derives this from the trait name and method signatures.
Source§

const MAX_OUTPUT_BYTES: usize = <CpuI8MatmulSquare<DIM> as TensorAxis>::MAX_OUTPUT_BYTES

Maximum bytes any kernel of this axis returns.
Source§

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

Dispatch the kernel identified by kernel_id against the evaluated input bytes. The implementation copies the kernel’s output into out and returns the written length. Read more
Source§

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

Source§

fn clone(&self) -> CpuI8MatmulSquare<DIM>

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

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

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

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

Source§

fn default() -> CpuI8MatmulSquare<DIM>

Returns the “default value” for a type. Read more
Source§

impl<const INLINE_BYTES: usize, const DIM: usize> SubstrateTermBody<INLINE_BYTES> for CpuI8MatmulSquare<DIM>

Source§

fn body_arena() -> &'static [Term<'static, INLINE_BYTES>]

The Term arena the kernel decomposes to. Empty slice signals a primitive-fast-path axis whose body the implementation may evaluate through dispatch_kernel directly per ADR-055’s optional fast-path.
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

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.
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. Read more
Source§

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

Auto Trait Implementations§

§

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

§

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

§

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

§

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

§

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

§

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

§

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

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.