Skip to main content

TensorExtTestArgs

Struct TensorExtTestArgs 

Source
#[repr(C)]
pub struct TensorExtTestArgs { pub output: u64, pub a_fp16: u64, pub b_fp16: u64, pub a_int8: u64, pub b_int8: u64, pub n_shires: u64, }
Expand description

Arguments for the tensor-extension instruction test kernel (tensor-ext-test).

All Minions read the same shared input buffers and write their results to per-Minion sections of output for independent host verification.

§Output buffer layout (per Minion, stride TENSOR_EXT_TEST_OUT_STRIDE)

Minion shire * 32 + m writes at byte offset (shire * 32 + m) * TENSOR_EXT_TEST_OUT_STRIDE:

  • [0..64): TensorFMA16A32 result: 4 x f32, expected [5.0, 0.0, 0.0, 0.0].
  • [64..128): TensorIMA8A32 result: 4 x i32 stored as f32 bit patterns, expected [4, 0, 0, 0].
  • [128..192): TensorStoreFromScp passthrough: 64 bytes copied verbatim from L1 scratchpad line 0, expected to equal the a_fp16 buffer contents.

§Input data

Inputs encode the simplest non-trivial tile (AROWS=0, ACOLS=0, BCOLS=0):

  • a_fp16: [2.0_f16, 3.0_f16, 0..0] (64 bytes; first 4 bytes used).
  • b_fp16: TenB-interleaved fp16 pairs: [1.0, 1.0, 0.0, ...] (64 bytes; first 4 bytes = b[0,0]=1.0 and b[1,0]=1.0 for output col 0).
  • a_int8: [1, 1, 1, 1, 0..0] (64 bytes; first 4 bytes used).
  • b_int8: IMA8A32-interleaved int8 groups: col 0 = [1,1,1,1], cols 1-3 = 0 (64 bytes; first 16 bytes used).

Fields§

§output: u64

Base address of the output buffer: n_shires * 32 * TENSOR_EXT_TEST_OUT_STRIDE bytes, 64-byte aligned.

§a_fp16: u64

64-byte-aligned device address of the fp16 A input (64 bytes).

§b_fp16: u64

64-byte-aligned device address of the fp16 B input in TenB interleaved format (64 bytes). (PRM TensorFMA16A32: TenB[k].h[j*2+0] = b[2k,j].)

§a_int8: u64

64-byte-aligned device address of the int8 A input (64 bytes).

§b_int8: u64

64-byte-aligned device address of the int8 B input in IMA8A32 interleaved format (64 bytes). (PRM TensorIMA8A32: word j = [b[0,j]|b[1,j]|b[2,j]|b[3,j]].)

§n_shires: u64

Extent of the output array in shires (1..=32). Cells are indexed by physical shire number, so this is one more than the highest launched shire, not the number of launched shires; Minions in shires at or beyond it do not write.

Trait Implementations§

Source§

impl Clone for TensorExtTestArgs

Source§

fn clone(&self) -> Self

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 Copy for TensorExtTestArgs

Source§

impl Debug for TensorExtTestArgs

Source§

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

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

impl DeviceArgs for TensorExtTestArgs

Source§

fn as_bytes(&self) -> &[u8]

Borrow the struct as its on-wire bytes (host side: stage these in device memory as the launch arguments).
Source§

unsafe fn from_ptr<'a>(ptr: *const u8) -> &'a Self

Reinterpret a device-memory pointer as these arguments (device side). Read more
Source§

impl PartialEq for TensorExtTestArgs

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for TensorExtTestArgs

Auto Trait Implementations§

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, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

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

fn try_from(value: U) -> Result<T, !>

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.