T5: A console reference #412
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-28T20:48:43Z.
I'll take T5. I've got an RX 6700 XT (Navi 22, gfx1031) on RADV, Mesa 26.3.1.
tools/native_rdna2/(@JohnVonWells) already runs hand-written instructions natively through ROCm with MODE set bys_setreg_b32, so I'm building on that instead of starting something new. It works on my card withHSA_OVERRIDE_GFX_VERSION=10.3.0:check_sad.pymatches the checked-in RX 6950 XT receipt exactly.First piece is in (#420, merged), the float arithmetic family: 20 instructions under all 1,024 MODE values through ROCm, and 17 of them again through RADV as a second witness (a compute shader per instruction, checked against the driver's disassembly). The two agree on every bit they share, and RADV's default is MODE
0xc0.Second piece is in too (#437, merged): what VOP3
clampand the output modifiers do under every MODE value, which is the part #333 left open.Third piece is in too (#469, merged): the approximate ones (rcp, rsq, sqrt, log, exp, sin, cos), where only the chip can say what the exact bits are. f16 comes out correctly rounded, f32 is within one unit but not predictable, and RADV agrees with ROCm on every word they share.
Fourth is #446, merged:
check_basic_alu_gpu.pynow holds its float results to this reference instead of its own looser models. The old models computed from denormal sources the card flushes. What a host may still do differently is named and counted undertolerated. Two translator faults are left among those names:v_fma_f32gets rounded twice when av_mul_f32shares its product (the one from #333), and on NVIDIAv_min_f32,v_max_f32,v_floor_f32andv_ceil_f32don't flush a denormal source. The second needs a flush in the translator. The NVIDIA runs (RTX 3090 and RTX 5090) came from contributors, thanks both.What I think the deliverable is: the kernels and check scripts, the card's results checked in as evidence so the checks can be held to real hardware without needing an RDNA 2 card, and a doc with what matched and what didn't. If you had something else in mind for T5, tell me.
One limit: this is a GFX10.3 card and Xbox programs mix GFX10.1 and GFX10.3 instructions. The gfx1030 assembler refuses
v_mad_f32,v_mac_f32and the other RDNA 1 multiply-adds, and recorded shaders use them, so a card like mine can't be the reference for those. That would need agfx1013board (a BC-250, say). Does anyone have one?Next: whichever float instructions are left that the recorded shaders use most.
Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-28T21:10:47Z.
Two corrections to my own post.
"A Vulkan driver won't take raw machine code" is too strong. RADV exposes
VK_KHR_pipeline_binaryandVK_EXT_shader_object, and its binaries hold the actual machine code, so splicing console code into the blob from a trivial shader might get it through an unpatched driver. Haven't tried it. The catch is the ABI: console code expects its own register setup, descriptor layout and float mode, so realistically that's leaf arithmetic wrapped in RADV's prologue and epilogue, not whole shaders. I'll try it once the float family is recorded, since it's the only way I can see to hit exact console encodings.The bigger one: this card is GFX10.3, and
runtime/dxbc/src/rdna2/opcodes.rssays Xbox programs mix GFX10.1 and GFX10.3 instructions, including three legacy multiply-add opcodes that collide between the two. A desktop RDNA 2 card can't be the reference for the GFX10.1-only ones. Its compiler won't emit them, and the console's encoding would run as a different instruction. So T5 from a card like mine covers the GFX10.3 side only. The GFX10.1 side would need agfx1013board (a BC-250, say). Does anyone have one?Imported from brcly/TuxBox. Originally posted by JeffreyBytes on 2026-11-28T21:16:32Z.
I missed something obvious.
tools/native_rdna2/(@JohnVonWells's work) already runs hand-written instructions natively through ROCm with MODE set bys_setreg_b32, which is a better reference than what I described: exact forms, and all 1,024 MODE values. So ignore my "no way to run machine code" line.It works on my card too.
check_sad.pyfails as is on the RX 6700 XT (gfx1031), but withHSA_OVERRIDE_GFX_VERSION=10.3.0it passes and matches the checked-in RX 6950 XT receipt exactly, 81,920 comparisons, 0 mismatches.So what should T5 add on top of that? The roadmap says "through its Vulkan driver". I've got the Vulkan side working locally for 17 float instructions (it found that the card flushes denormal inputs in the default mode, which
check_basic_alu_gpu.py's models reject and its inputs never test), but the ROCm route can set the console's own MODE, and the translator starts that at0xc0. My plan unless you say otherwise: extend the ROCm kernels to the float family under MODE0xc0and the neighbors that matter, and keep the Vulkan recording as a second witness. Tell me if that's not what you meant by T5.Imported from brcly/TuxBox. Originally posted by 1093i3511 on 2026-11-29T21:52:28Z.
@JeffreyBytes, a second RDNA 2 chip for T5: an RX 6600 (Navi 23, gfx1032,
1002:73ff) on RADV, Mesa 26.3.1, Linux 7.3.6. I only ran the Vulkan route, so no ROCm.Both match your RX 6700 XT (gfx1031) receipts bit for bit: the same output words and the same emitted instructions, for every instruction and mode, and for the approximate instructions' sweeps too. Both tools still print
FAIL, but only because the receipts name your card and driver build:So on these families, gfx1031 and gfx1032 behave the same through RADV.
vulkan_approx.pygave identical output again in a second run.The card already has a
tuxbox.py verifyreceipt inevidence/(#506), but that covers TuxBox's own checks, not this family. If it helps, I can record a gfx1032 receipt withrecord --evidence ...for the repository. I can also run the next instruction family you pick here as a second witness. The RDNA 1 multiply-adds are out of reach for this card too.