stmatrix GPU Virtual ISA NVIDIA
stmatrix Warp Level Matrix Multiply-Accumulate Instructions
stmatrix.sync.aligned.shape.num{.trans}{.ss}.type [p], r;
Collectively store one or more matrices across all threads in a warp to the location indicated by the address operand p, in.shared state space.
Encoding
PTX is a virtual instruction set. It has no single, stable native
binary encoding - the compiler lowers this instruction to different native machine
code depending on the selected NVIDIA target architecture (compute capability).
This page intentionally shows no bit-diagram; see the target/version requirements
below for what governs how this instruction compiles.
Syntax Forms
One mnemonic covers many type / state-space / scope / modifier combinations - each row below is an independently valid form.
| Syntax | Data Types | State Space(s) | Modifiers | Min. Target | Description |
|---|---|---|---|---|---|
| stmatrix.sync.aligned.shape.num{.trans}{.ss}.type [p], r; | sm_90 | Collectively store one or more matrices across all threads in a warp to the location indicated by the address operand p, in.shared state space. (see the official PTX ISA docs for the full description) |
Operands
At a Glance
Related
Reference
NVIDIA PTX ISA
Description
Collectively store one or more matrices across all threads in a warp to the location indicated by
the address operand p, in.shared state space. If no state space is provided, generic
addressing is used, such that the address in p points into.shared space. If the generic
address doesn’t fall in.shared state space, then the behavior is undefined.
The.shape qualifier indicates the dimensions of the matrices being loaded. (see the official PTX ISA docs for the full description)
Examples
// Store a single 8x8 matrix using 64-bit addressing
.reg .b64 addr;
.reg .b32 r;
stmatrix.sync.aligned.m8n8.x1.shared.b16 [addr], {r};
// Store two 8x8 matrices in column-major format
// (truncated - see the official PTX ISA docs for the full example)Reproduced from NVIDIA's official PTX ISA documentation for technical accuracy.
Sources
-
Parallel Thread Execution ISA ↗
- NVIDIA Corporation, Chapter 9 - Instruction Set
Deep-linked directly to this instruction's section.