Archived
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:
1 parent
6cb9826975
commit
890715fd96
5 files changed
+49
-31
No files matched your search
+4
-5
@@ -18,11 +18,10 @@
|
||||
* can match a geometry, it decides which serves. Each group states the reason for its order.
|
||||
* Values are spaced by ten so a row can be slipped between two without renumbering.
|
||||
*
|
||||
* libr3d ships one row per (op, dtype) pair far more often than libr4d does: on RDNA3 there is no
|
||||
* matrix instruction whose fragment layout, tile shape or operand width a kernel has to design
|
||||
* around, so the dot2 kernel that serves bf16 serves f16 with a template argument, and there is
|
||||
* nothing to specialise a second row for. Where two rows of one op do exist, the reason is the
|
||||
* geometry, and it is written next to the pair.
|
||||
* libr3d ships one row per (op, dtype) pair far more often than libr4d does: the matrix work runs
|
||||
* on the dot2 path, whose lane map takes a dtype as a template argument, so the kernel that serves
|
||||
* bf16 serves f16 as is, and there is nothing to specialise a second row for. Where two rows of
|
||||
* one op do exist, the reason is the geometry, and it is written next to the pair.
|
||||
*/
|
||||
enum {
|
||||
/* The common case: this op, these dtypes, one row. Nothing competes with it. */
|
||||
|
||||
Reference in new issue
Block a user