Common MFMA parameters#
Every MFMA builtin across all CDNA generations shares trailing integer parameters that must be compile-time integer constants. Some parameters apply to all MFMA variants; others are specific to dense or sparse forms.
Dense MFMA parameters#
The following parameter applies to dense MFMA builtins only.
Parameter |
Type |
Description |
|---|---|---|
|
int |
\(\pmb{B}\)-matrix Lane Group Pattern modifier. Allows a constrained set of swizzling operations on \(\pmb{B}\) data between lanes. Supported values:
Note CDNA3 FP64 exception: for FP64 MFMA builtins on CDNA3
( |
Sparse MFMA parameters#
Sparse MFMA (SMFMAC) builtins share the cbsz and abid parameters
described above with the same semantics as their dense counterparts. In
addition, SMFMAC builtins accept the following parameter:
Parameter |
Type |
Description |
|---|---|---|
|
int |
Sparsity index. Encodes which two of the four positions in each group of four elements along the K dimension hold the non-zeros in the compressed \(\pmb{A}\) matrix. The bit width of the index scales with K: a 2-bit field per group of four is needed, so K=16 requires 8 bits, K=32 requires 16 bits, and K=64 requires 32 bits. This is a runtime value, not a compile-time constant. |
Note
SMFMAC builtins do not support the blgp (\(\pmb{B}\)-matrix
Lane Group Pattern) modifier available on dense MFMA instructions.