Repository navigation
Tools: hardware oracle for valu_fuzz (f16 + mem) — 40,000 programs on real AMD hardware, 0 mismatches - #1365
Conversation
Additive: Kernel(vgprs=, sgprs=), defaults unchanged (32 and 40). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Runs the same programs natively on the AMD GPU through tools/hw_oracle (wave32 and wave64) and compares them with the model. mem gains OOB_SELECT semantics (per-mode, per-dword), V#s in the GFX10 and GFX11 layouts, s_load and s_buffer_load; f16 writes op_sel forms the GFX11 assembler lacks as instruction words; --negative-control, --hw-sync. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Keeps the edit away from the lines PR 1265 changes. Defaults unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…, results Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…d count, --skip-op validation, Kernel resource test) mem translator path ran on the Radeon 880M: 400 of 400 match. Docs: --show line back in the options list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent CPU/static verification only (no GPU or hardware-number claim), at head
Coordination note: this PR and #1345 both edit |
|
Tried eef4004 on an AMD Radeon RX 9070 (RDNA4, gfx1201), AMD 26.11.2,
Assembler errors from 30 programs of each family (
The f16 rejections come from The programs that did assemble (about 50 per wave size per seed) all matched the model on RDNA4. AI-assisted (Claude Code). |
…prs) asm.py keeps main's lds/vgprs validation, lists in metadata and the 1024 workgroup size and adds sgprs per kernel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested on AMD Radeon RX 6950 XT (RDNA2, gfx1030), driver 26.11.2, Windows 11 (HIP backend, ROCm 6.2 clang 19): mem passes; f16 hardware not testable with this assembler At
Rechecked at With ROCm 6.2, One thing to look at: AI-assisted. |
…2_f16 sNaN by IEEE mode The valu_fuzz hardware oracle (#1365) had not run on RDNA2, and the v_pack_b32_f16 row said "RDNA2 not measured". On a gfx1036 iGPU (AMD Windows driver 32.0.21044.64, HIP backend, AMD clang 23): - f16 and mem, seeds 101-105 x 2000 x wave32/wave64: 40,000 of 40,000 match, 0 assembler rejections; every negative-control perturbation caught. - translator,hw at seed 3: mem 200/200, f16 199/200; the difference is an AMD Vulkan driver mismatch of the #1506 kind. - v_pack_b32_f16 quiets a signaling-NaN half under IEEE mode 1 and moves it unchanged under IEEE mode 0; neg flips the sign first. BUILD-422. Docs only. AI-assisted. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This continues the hardware oracle from #1160, #1202, #1248 and #1345.
What and why
tools/valu_fuzz.py(FUZZ-2, FUZZ-5) gains--oracle hwand--oracle translator,hwfor both families. The same seeded programs run natively on an AMD GPU, in wave32 and native wave64, and are compared with the model. Without the tools it exits 77.mem:num_records, following the per-mode, per-dword bounds rules from Translator: honour V# OOB_SELECT in buffer bounds checks; per-dword multi-dword stores (SHADER-110) #1104.gfx11-rsrc.json: 6-bit FORMAT at [17:12], no RESOURCE_LEVEL).idxen offenand offset-only accesses, ands_load/s_buffer_loadof what the stores wrote.s_waitcnt_vscntpluss_dcache_inv(--hw-sync). On gfx1150 the scalar cache is not coherent with vector stores, so this is a harness requirement, not a translator rule.f16:op_selforms that the gfx11 assembler has no spelling for are written as VOP3 instruction words.v_pack_b32_f16(0x7c96becomes0x7e96), so only signaling-NaN halves are unjudged. They are counted and printed. Quiet NaNs are still compared.--negative-controlruns 6 wrongf16models and 8 wrongmemmodels, and all are caught. Thememmodels include OOB_SELECT ignored, the stride check missing,soffsetleft out of the check, the whole access taken instead of per dword, ands_buffer_loadunbounded.--skip-opnow rejects unknown op names.tools/hw_oracle/asm.pygets an additiveKernel(vgprs=, sgprs=), covered by a test.Results: Radeon 880M (gfx1150, RDNA3.5), driver 26.11.2
mem,--oracle hw, 5 seeds × 2000 × wave32/64f16,--oracle hw, samemem,--oracle translatoron the Radeon 880M (seed 1)memandf16,--oracle translator,hw(seed 3, 100 each)The translator therefore matches the model, and the model matches gfx1150, on the OOB_SELECT, straddle,
s_loadands_buffer_loadrules. On the RTX 5070,vk_compute_testloses the device (−4) for thesememprograms. It does the same withmain's generator, so it is not caused by this PR. gfx1150 is not RDNA2.Tested
py -m pytest tests/test_valu_fuzz.py tests/test_hw_oracle.py: 92 passed, 2 skipped (the skips need hardware or tools).eef40049). The translator runs and pytest ran after it.memprograms than onmain, because the family was rewritten.f16programs are unchanged.An independent review found no blocking issue. Its findings are fixed:
memtranslator path is now run on a GPU;--skip-opvalidates its names;Kernel;AI-assisted (Claude Code).
Checklist
docs/design.md, with how it was confirmed. (No translator change.)🤖 Generated with Claude Code