libr3d: the wave-matrix record -- the six 16x16x16 variants, the MAC-core measurement, the i8-x4 gap

RDNA3's ISA lists exactly six wave-matrix instructions (f16, bf16, int8 and
int4 in; f32, f16, bf16 and i32 accumulating) and the toolchain emits them on
every gfx11 target; they run over multiple cycles driving the DOT pipeline
internally, and the MAC-core measurement on the 16-CU gfx1102 part confirms
it: f32-acc f16 19.11, f32-acc bf16 19.24, f16-acc f16 19.44, i32-acc i8
19.29 against the paired dot2 path's 18.86 TFLOP/s -- the same pipe within
three percent, matching the full-kernel 1.99-vs-1.97 already in r3d_common.h.
The i32-acc i4 tile is the exception at 25.68 TFLOP/s, 35% above, but it takes
i4 in both operands and the grids served here pair i8 activations against i4
and i2 weights: there is no mixed-precision integer WMMA on RDNA3, so that
pipe is unreachable from the w4a8 and w2a8 rows.

Commentary only -- the rationale passages in the README, CMakeLists.txt,
r3d_rows.cpp, r3d_plugin.h and r3d_selftest.cpp now state the measured
record; no kernel, lane map or numeric path changes, and the rebuilt library
is byte-identical (selftest 78 rows, 0 failed, 0 skipped).
This commit is contained in:
Asim Siddiqui authored and StillDeadcode committed 2026-10-28 13:51:45 +01:00
1 parent 6cb9826975
commit 890715fd96
5 files changed
+49 -31

No files matched your search

+2 -2
View File
@@ -43,8 +43,8 @@
* joined operands they store -- the w2a8 row's `b_scale`, the fp8 weight's codes and scale, the
* logits head -- and repack nothing, so a container converted on this card keeps row-major codes
* against row-major scales. A dot2 GEMM reads a weight in the order it is stored; libr4d's fragment
* permutations are a WMMA fact, and RDNA3's tensor cores are not reachable from this toolchain
* (r3d_common.h has the measurements).
* permutations are a WMMA fact, and RDNA3's wave-matrix instructions use a 16x16 fragment layout
* this table's dot2 kernels do not (r3d_common.h has the measurements).
*
* Pure host C++: no r3d.h, no HIP, so this table compiles and can be read and tested without ROCm.
*/