pub unsafe fn tensor_load(
addr: usize,
start: u8,
rows: u8,
id: bool,
stride: u64,
)Expand description
Initiate an asynchronous TensorLoad from memory into the L1 scratchpad.
Loads rows + 1 consecutive rows of 64 bytes each from memory into
L1 scratchpad lines start through start + rows. Row i is read from
address addr + i * stride. The operation is asynchronous: call
tensor_wait(TensorEvent::Load0) (or Load1 if id = true) before
reading the scratchpad in a subsequent tensor_fma32.
§Parameters
addr: 64-byte aligned virtual address of the first row in memory.start: L1 scratchpad starting line index (0..=47).rows: number of rows to load minus one (ROWS field, 0..=15). Loadsrows + 1cache lines.id: selects the TensorWait event (false =Load0, true =Load1).stride: row stride in bytes (64-byte aligned); placed in x31 by this function immediately before the CSRRW instruction.
§Safety
addrmust be 64-byte aligned and point to(rows + 1) * stridevalid, readable bytes of device memory.- Must be called from the primary hart of the Minion (mhartid & 1 == 0).