You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The kernels target RDNA 4 (gfx1201 / gfx1200) and use its FP8 matrix instructions. What would an RDNA 3 path need:
which kernels change, what arithmetic replaces FP8, how close the results stay, and what the speed could be? Start with
a written analysis in this issue; no code needed yet. See ROADMAP.md.
Here is the written analysis, with measurements from an RX 7900 XT (gfx1100) under Linux (Mesa RADV, native Vulkan cooperative-matrix shaders; so facts about the chip's instructions, not about AMD's Windows driver). No game was run, and nothing was run on Windows or on an RDNA 4 card.
It was put together with Claude models and checked against the cited lines and the probe outputs; every claim is labelled measured, read, inferred or unknown. The short version:
What RDNA 3 lacks. Every FP8 instruction the kernels use (FP8 WMMA, v_cvt_pk_fp8_f32, v_cvt_f32_fp8). It has F16, IU8 and IU4 WMMA, with a different operand layout: A and B replicated across the half-waves (8 VGPRs for F16, not 4), accumulator rows interleaved, so every D -> B step needs a half-wave exchange.
Measured arithmetic.v_wmma_f32_16x16x16_f16 fed exact E4M3 values returns slightly inexact sums when terms have mixed signs (1 + (-1) gives -2^-24). None of 13 rounding models fits, including per-8. It is deterministic and independent of lane position, but depends on the K order. After rounding to E4M3 that is about 450 one-code differences per million outputs on P1b-style data, mostly at exact ties; 2 per million on random E4M3. So F16 carrying E4M3 values is close, not identical. Whether it can match RDNA 4 depends on whether the FP8 WMMA shows the same artefacts, which only a replay on your card can tell. v_wmma_i32_16x16x16_iu8 (wrapping) was exact on every output.
Measured speed. F16 and IU8 WMMA both take 32-33 cycles, as documented. Vector work never overlaps a WMMA. v_dot4_i32_iu8 reached about half the matrix rate. The cost of an FP8-model step on RDNA 3 is not the matrix instruction but the glue: software FP32 -> E4M3 rounding costs 133 cycles per tile (bit-exact port, 4x a WMMA) and widening the codes about 141, so the matrix instruction is 10 % of a 322-cycle step.
INT8. On a real converted Model M with the float64 reference (CPU, probe frames): one INT8 plane makes every stage DIFFERENT under every scale choice tried; two planes per operand are exact (every weight block of M and RR F fits two planes), but that is about 3.9 WMMAs per product and, with the E4M3 rounding still needed, about the cost of the F16 route. So INT8 gives Model M a cheap different model or an exact one at F16-route cost.
Per model. K and FG are FP16 models: no widening, no E4M3 rounding, about 48 cycles per step by the measured parts, so K looks like the natural first RDNA 3 target. M, L and RR need the F16 route or digit planes; for them a cheaper exact E4M3 quantizer is the largest lever.
What I can't answer from here.
Which contract RDNA 3 must meet: same bytes as RDNA 4, exact against the reference, or CLOSE.
The replay: FP8 WMMA on the saved A8, B8, C on an RX 9070 XT, compared with this card's D_f32 (layout in section 10). It decides byte identity and would give a full model of the FP8 instruction.
Whether AMD's Windows driver accepts the WaveMatrix channel on RX 7000, and with which fragment layout (CheckSupport, an RGA compile for gfx1100).
The document also has the gate list with file:line, a porting map, the test plan, and a few small defects I noticed in today's tree (section 13).
An update from the RX 7900 XT (gfx1100), Linux, since the analysis above.
Model M on RDNA 3 runs, including in a game. Draft PR #259 has the work so far (milestone 0.6.6; I know it waits until after 0.6.5):
The HIP kernels of Model M on gfx1100, with card tests per stage and a whole frame (17.9 ms at 1706x960 -> 2560x1440). As you said, HIP stays a developer and test route.
The in-game route is D3D12: behind a compile-time developer switch (off in every normal build), the D3D12 device accepts the 7900 XT and runs the unchanged gfx12 kernel set. Under Proton this works with a local dxil-spirv change on top of #362's raw fragments that emulates the FP8 matrix ops on RDNA 3 (F16 matrix ops, the RDNA 3 lane layout, exact FP8 rounding), and vkd3d-proton built with enable_extended_emulation. That change is not upstream.
Cyberpunk 2077 under GE-Proton 11-11, 1440p Quality, ray tracing and frame generation off: the built-in benchmark gives 52.6 fps with Model M against 134.8 fps with FSR 3.1.5, so about 12 ms per frame for Model M. Offline the frame went from 31.6 ms to 12.4 ms after two translator-side speed fixes that keep the results bit-identical; a third round is running. My estimate for exact Model M on this card is about 6-7.5 ms at best, because every matrix step needs a software FP8 rounding and an exchange that RDNA 4 does in hardware.
Findings that may help elsewhere:
On gfx11 the compiler moved a whole v_wmma chain into the branch of a per-lane store (if (token < ntok)), giving NaN or wrong values on partly valid tiles; the CPU emulator cannot show it. RDNA 3 (RX 7900 XT): Model M in HIP on gfx1100 and a developer-only D3D12 route under Proton (draft) #259 has the fixes and a disassembly scan (exec_scan.py) that finds matrix ops or half-wave exchanges under a lane mask. I see from clean/k/dx12/hlsl/k_common.hlsli that you met the same thing in the Model K kernels.
Through vkd3d-proton on RDNA 3, any shader with an FP8 raw-fragment op fails PSO creation, and a few of the gfx12 Swin kernels crashed the driver at PSO creation instead of being refused.
Next: Model K on RDNA 3 through the same route. It uses only the F16 matrix instruction, so none of the FP8 cost applies. I am testing it headless at main and at #254's head (to see whether its v_fma_mix probe passes or falls back under Proton on RDNA 3), and will report here.
Written with Claude models doing the coding, measurements and drafting under my direction; I checked the results.
Activity
j0nsh1n commentedon Nov 15, 2026
Here is the written analysis, with measurements from an RX 7900 XT (gfx1100) under Linux (Mesa RADV, native Vulkan cooperative-matrix shaders; so facts about the chip's instructions, not about AMD's Windows driver). No game was run, and nothing was run on Windows or on an RDNA 4 card.
It was put together with Claude models and checked against the cited lines and the probe outputs; every claim is labelled measured, read, inferred or unknown. The short version:
What RDNA 3 lacks. Every FP8 instruction the kernels use (FP8 WMMA,
v_cvt_pk_fp8_f32,v_cvt_f32_fp8). It has F16, IU8 and IU4 WMMA, with a different operand layout: A and B replicated across the half-waves (8 VGPRs for F16, not 4), accumulator rows interleaved, so every D -> B step needs a half-wave exchange.Measured arithmetic.
v_wmma_f32_16x16x16_f16fed exact E4M3 values returns slightly inexact sums when terms have mixed signs (1 + (-1) gives -2^-24). None of 13 rounding models fits, including per-8. It is deterministic and independent of lane position, but depends on the K order. After rounding to E4M3 that is about 450 one-code differences per million outputs on P1b-style data, mostly at exact ties; 2 per million on random E4M3. So F16 carrying E4M3 values is close, not identical. Whether it can match RDNA 4 depends on whether the FP8 WMMA shows the same artefacts, which only a replay on your card can tell.v_wmma_i32_16x16x16_iu8(wrapping) was exact on every output.Measured speed. F16 and IU8 WMMA both take 32-33 cycles, as documented. Vector work never overlaps a WMMA.
v_dot4_i32_iu8reached about half the matrix rate. The cost of an FP8-model step on RDNA 3 is not the matrix instruction but the glue: software FP32 -> E4M3 rounding costs 133 cycles per tile (bit-exact port, 4x a WMMA) and widening the codes about 141, so the matrix instruction is 10 % of a 322-cycle step.INT8. On a real converted Model M with the float64 reference (CPU, probe frames): one INT8 plane makes every stage DIFFERENT under every scale choice tried; two planes per operand are exact (every weight block of M and RR F fits two planes), but that is about 3.9 WMMAs per product and, with the E4M3 rounding still needed, about the cost of the F16 route. So INT8 gives Model M a cheap different model or an exact one at F16-route cost.
Per model. K and FG are FP16 models: no widening, no E4M3 rounding, about 48 cycles per step by the measured parts, so K looks like the natural first RDNA 3 target. M, L and RR need the F16 route or digit planes; for them a cheaper exact E4M3 quantizer is the largest lever.
What I can't answer from here.
A8,B8,Con an RX 9070 XT, compared with this card'sD_f32(layout in section 10). It decides byte identity and would give a full model of the FP8 instruction.CheckSupport, an RGA compile for gfx1100).The document also has the gate list with file:line, a porting map, the test plan, and a few small defects I noticed in today's tree (section 13).
j0nsh1n commentedon Nov 16, 2026
An update from the RX 7900 XT (gfx1100), Linux, since the analysis above.
Model M on RDNA 3 runs, including in a game. Draft PR #259 has the work so far (milestone 0.6.6; I know it waits until after 0.6.5):
enable_extended_emulation. That change is not upstream.Findings that may help elsewhere:
v_wmmachain into the branch of a per-lane store (if (token < ntok)), giving NaN or wrong values on partly valid tiles; the CPU emulator cannot show it. RDNA 3 (RX 7900 XT): Model M in HIP on gfx1100 and a developer-only D3D12 route under Proton (draft) #259 has the fixes and a disassembly scan (exec_scan.py) that finds matrix ops or half-wave exchanges under a lane mask. I see fromclean/k/dx12/hlsl/k_common.hlslithat you met the same thing in the Model K kernels.Next: Model K on RDNA 3 through the same route. It uses only the F16 matrix instruction, so none of the FP8 cost applies. I am testing it headless at main and at #254's head (to see whether its
v_fma_mixprobe passes or falls back under Proton on RDNA 3), and will report here.Written with Claude models doing the coding, measurements and drafting under my direction; I checked the results.