pub struct CpuI8VectorActivation<const N: usize>;Expand description
Parametric element-wise activation kernels over an N-element i8
vector.
N is the vector length. The same kernels (ReLU, Q1.7 sigmoid) are
applied to every element independently; per-element determinism
composes to per-vector determinism per ADR-030.
Trait Implementations§
Source§impl<const N: usize> ActivationAxis for CpuI8VectorActivation<N>
impl<const N: usize> ActivationAxis for CpuI8VectorActivation<N>
Source§impl<const N: usize> AxisExtension for CpuI8VectorActivation<N>
impl<const N: usize> AxisExtension for CpuI8VectorActivation<N>
Source§const AXIS_ADDRESS: &'static str = <CpuI8VectorActivation<N> as ActivationAxis>::AXIS_ADDRESS
const AXIS_ADDRESS: &'static str = <CpuI8VectorActivation<N> as ActivationAxis>::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 = <CpuI8VectorActivation<N> as ActivationAxis>::MAX_OUTPUT_BYTES
const MAX_OUTPUT_BYTES: usize = <CpuI8VectorActivation<N> as ActivationAxis>::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>
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 moreSource§impl<const N: usize> Clone for CpuI8VectorActivation<N>
impl<const N: usize> Clone for CpuI8VectorActivation<N>
Source§fn clone(&self) -> CpuI8VectorActivation<N>
fn clone(&self) -> CpuI8VectorActivation<N>
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl<const N: usize> Debug for CpuI8VectorActivation<N>
impl<const N: usize> Debug for CpuI8VectorActivation<N>
Source§impl<const N: usize> Default for CpuI8VectorActivation<N>
impl<const N: usize> Default for CpuI8VectorActivation<N>
Source§fn default() -> CpuI8VectorActivation<N>
fn default() -> CpuI8VectorActivation<N>
Returns the “default value” for a type. Read more
Source§impl<const N: usize> SubstrateTermBody for CpuI8VectorActivation<N>
impl<const N: usize> SubstrateTermBody for CpuI8VectorActivation<N>
Source§fn body_arena() -> &'static [Term]
fn body_arena() -> &'static [Term]
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.impl<const N: usize> Copy for CpuI8VectorActivation<N>
Auto Trait Implementations§
impl<const N: usize> Freeze for CpuI8VectorActivation<N>
impl<const N: usize> RefUnwindSafe for CpuI8VectorActivation<N>
impl<const N: usize> Send for CpuI8VectorActivation<N>
impl<const N: usize> Sync for CpuI8VectorActivation<N>
impl<const N: usize> Unpin for CpuI8VectorActivation<N>
impl<const N: usize> UnsafeUnpin for CpuI8VectorActivation<N>
impl<const N: usize> UnwindSafe for CpuI8VectorActivation<N>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more