Repository navigation
Add GFX12 hardware oracle support and improve GPU testing - #4152
nandorjanosi wants to merge 5 commits into
Conversation
|
Independent CPU verification of PR head:
Untouched base with the same test files:
The negative controls land exactly on the new GFX12 oracle/T# paths, so the CPU-side change is well scoped. No game data or hardware was used. |
|
Code read of b1cb9b7: the GFX12 kernel spelling is right, and two of the new paths are untested. Windows 11, CPython 3.14.6, llvm-mc 23.1.6. Live mutant, kernel text: putting the GFX11 spelling back at Live mutant, calls: skipping The GFX12 WORD4 pitch branch is not separable from the GFX11 formula inside the legal size range. The largest pitch is 16383 (width 16129, 1 byte per texel), so bit 14 is never set. AI-assisted code read (Claude) |
sds-228
left a comment
There was a problem hiding this comment.
Code review of b1cb9b7: one issue. git diff --check reports trailing whitespace in tools/hw_oracle/tsharp.py and tools/image_fuzz.py; please strip it before merge. Targeted suites: 17, 44 and 25 tests OK (some skips).
AI-assisted (OpenCode).
|
Tested AMD Radeon RX 9070 XT (RDNA4, gfx1201, driver 32.0.32029.2010):
Ryzen 7 9800X3D iGPU (RDNA2, gfx1036, driver 32.0.21045.29003), to check that the gfx10 path is unchanged: Controls on the 9070 XT:
PR tests on Windows (Python 3.13): Synthetic textures only, no game files. |
|
Verified on Linux: merges cleanly with current main and merge-trees cleanly against both #4087 and #3954. The new/changed suites pass (test_hw_oracle 44 OK / 2 skipped; test_image_fuzz_hw 29 passed / 1 skipped, so the GFX12 T# word tests ran; test_loop_ballot_barrier 17 OK) — but the DMASKS reorder in tools/image_fuzz.py breaks the pre-existing test_dmask_schedule_covers_each_format_and_keeps_full_mask_first, which asserts DMASKS[0] == 0xf; that test passes on main and fails on this head, so the reorder needs to keep the full mask first or carry the invariant's update with its rationale. Smaller items: a computed-then-unused |
…lable" and exit 77 docs/testing.md says a tool that cannot use the hardware oracle prints "hardware oracle unavailable: ..." and exits 77. On an RDNA4 card (RX 9060 XT, gfx1200) ten tools ended otherwise at main 561b65a: an uncaught RuntimeError or ValueError, a "harness error" exit 2, or rows printed as MISMATCH whose hardware value was the reason text. None of that is a model failure on RDNA4: their kernels cannot run there, for a reason known before anything is assembled. - asm.modes_skip_reason: every kernel of the tool sets IEEE and DX10_CLAMP, which gfx1170+ fixes (f32_fuzz, f16_trans_sweep, pknorm_probe, fma_mix_probe, vinterp_hw_probe). - asm.family_skip_reason: the kernel text is an older family's. buffer_swizzle_probe and smem_neg_probe use MUBUF/MTBUF forms, which the GFX12 assembler rejects and gfx1150 still takes. vcmp16_opsel_probe is raw GFX10 compare opcodes (0xC9 for v_cmp_lt_f16_e64 on gfx1036, 0x01 on gfx1150 and gfx1200), so on GFX11 and GFX12 it printed the oracle's sentinel as a result; it now also refuses a word the kernel never stored. sampler_lod_probe sets GFX10 mip fields and exited 2 elsewhere. - texoff_probe reports a missing T# layout as image_fuzz does, instead of raising. mad_denorm_probe already exits 77 on main (v_mad_f32 is GFX10.1 only), and lds_fuzz, valu_fuzz and the GFX12 T# are left to ItsNotRexed#3978, ItsNotRexed#4519, ItsNotRexed#5576 and ItsNotRexed#4152. tests/test_hw_oracle_gfx12_unavailable.py runs each tool with a fake oracle reporting gfx1200 (exit 77, the reason, no kernel run, oracle closed), gfx1030 (every tool still reaches Oracle.run) and gfx1150. It fails for all ten tools without the change. docs/testing.md lists what runs on RDNA4 and what does not. Tested on an RX 9060 XT (gfx1200, AMD 26.11.2, rocm-sdk-core 10.0.0 clang, HIP launcher): the ten tools exit 77 with their reason; salu_diff, crosslane_fuzz (50/50) and int_hw_probe (186/186) are unchanged. Not run on GFX10 or GFX11 hardware. Synthetic programs only, no game files. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
Adds GFX12 (RDNA 4) hardware oracle support and improves GPU testing.
Tested
Checklist