Repository navigation
Conversation
…u:" fixture header
The GPU fixture runners assemble every .asm for gfx1013, which has no GFX10.3 instructions: llvm-mc rejects
global_atomic_csub and buffer_atomic_csub there, so the csub rows of docs/design.md could get no GPU check. A
fixture may now name its target in the leading comment ("; mcpu: gfx1030"), next to "; mattr:", in
scripts/run_gpu_tests.py, runtime/test/shaders/build.py and the decoder parity test; without it nothing changes.
cs_global_csub.asm runs both forms on a few seeded dwords (DATA above, equal to and below M, 0xffffffff on
0x80000000, no glc with the data register kept) and 32 lanes of one wave subtracting 1 from 20 at once (old values
20..1 then 0 twelve times, M ends at 0). Passes on an RTX 4060 (NVIDIA 621.01) through both runners; the translator
with the clamp removed, or with a signed compare, fails it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
conftest.Shader, which tests/test_translate.py uses for every runtime/test/shaders/*.asm, still assembled for gfx1013 only, so test_gpu_samples_translate_and_validate and test_wave64_emulate_uses_no_subgroup_ops failed on cs_global_csub.asm (found by @tikD1337 in review). It now reads "; mcpu:" and "; mattr:" the way build.py and run_gpu_tests.py do. tests/test_translate.py: 647 passed (both cases failed without this change). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
v_dot2_i32_i16, v_dot2_u32_u16, v_dot4_u32_u8, v_dot8_i32_i4 and v_dot8_u32_u4 were CPU-checked and measured with hw_oracle, but no fixture ran the translation on a GPU. A wave32 dump of eight words covers the signed and unsigned elements, the 32-bit wrap, u32 and i32 clamp saturation, and the clamp case whose products overflow while the sum stays below INT32_MAX. Assembled for gfx1030 through ProjectLeonida#7237's "; mcpu:" header (gfx1013 has no dot instructions). Registered in check.py and run_gpu_tests.py. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
5e1835f to
d24ef75
Compare
|
Tested
That is the RDNA2 run the description lists as still open; the RDNA4 numbers from @ThomasSAMP reproduce here for the same eight words. AI-assisted. |
|
Tested
AI-assisted. |
|
Tested
The fixture's words are exact on this RADV/RDNA4 card. Counts and pass/fail only; no game files. AI-assisted (DeepSeek V4.1 Flash coding agent). |
Claim: #9522 (comment) (new TEST item)
Re-submission of #9672, which was closed in the PR cleanup. It builds on #7237 by @xelerb-debug (also closed in the cleanup): that PR's two commits, the
; mcpu:fixture header and itscs_global_csubfixture, are included here unchanged and keep @xelerb-debug as their author; this PR's own change is the last commit. If #7237 is re-opened and merged first, this reduces to that last commit.What and why
docs/design.md's "Packed integer dot products" row is CPU-checked (tests/semantic) and measured withtools/hw_oracle, but no checked-in fixture runs the translation ofv_dot2_i32_i16,v_dot2_u32_u16,v_dot4_u32_u8,v_dot8_i32_i4orv_dot8_u32_u4on a GPU.runtime/test/shaders/cs_w32_dot_int.asmis a wave32 dump likecs_w32_new_ops/cs_w32_dot2_f16: lane 0 stores eight words, each derived in the file header from the row's rule (element products + S2, sign- or zero-extended elements, 32-bit wrap;clampsaturates the exact sum):v_dot2_i32_i160x0003fffe, 0x0005fff9, 100v_dot2_u32_u160xffff8001, 0xffff0003, 0xffffff000xffff7f04v_dot4_u32_u80x80ff0102, 0x7f02ff03, 5v_dot8_i32_i40x8f01f7a3, 0x12345678, -3v_dot8_u32_u47v_dot2_u32_u16 … clamp0xffffffff0xffffffffv_dot2_i32_i16 … clamp0x80008000twice,-20x7ffffffe: the products overflow, the sum does not, so no saturationv_dot2_i32_i16 … clamp0x80008000twice,00x7fffffffOut 1 and 3/4 use the same bits signed and unsigned, so a signedness mix-up changes a word; out 6 vs 7 checks that clamp saturates the exact sum, not a wrapped one.
Registered in
check.py(WAVE32_DUMPS+ expected words) andrun_gpu_tests.py(the three wave32 lists). The design row gets one sentence. The VOP2v_dot*c_*forms don't assemble with llvm-mc for gfx1013 or gfx1030, so they stay CPU-checked; the sentence says so.Tested
Windows 11, NVIDIA GeForce RTX 3070 (Ampere), driver 621.01, MSVC 19.44 (VS 2022 Build Tools), Vulkan SDK 1.4.363.1, llvm-mc 23.1.6 (conda-forge, AMDGPU), Python 3.12.10, on this branch (rebased onto
main2d53a8055):run_gpu_tests.py --filter cs_w32_dot: translated +spirv-val, PASS:129 4294934276 17032 4294967258 260 4294967295 2147483646 2147483647, all eight as derived.build.py+check.py:cs_w32_dot_int ok,cs_global_csub ok(GPU fixture for global_atomic_csub / buffer_atomic_csub, and a "; mcpu:" fixture header #7237's fixture, still passing after the rebase).tests/test_rdna2_decode.pywithLLVM_MCset: the llvm-mc parity check passes on both new fixtures; it later fails oncs_w32_permlane_fi.asmandps_w64_a_discard.asm, exactly as onmain(rdna2_decode: v_permlane16_b32 prints the two op_sel bits llvm-mc prints #8044 covers the permlane one).tests/test_run_gpu_tests.py,tests/test_runner_calls_all_tests.py,tests/test_rdna2_decode.py,tests/test_design_contract_rows.py,tests/test_docs_links.py,tests/test_docs_repo_paths.py: OK.tests/test_shader_checks.pyhas the same 15 failures with and without this change (the onesmainalready has, tests: fix descriptor-fetch runner mocks and cover all fetch modes #7122).scripts/check_no_game_data.pyon the new fixture anddocs/design.md: clean.AMD: @ThomasSAMP ran it on an RX 9070 XT (RDNA4, Windows): the same eight words, plus a negative control (a zero-extended
v_dot8_i32_i4changes only out[3]); see the comments. An RDNA2 run is still open.AI-assisted: yes (Claude).
🤖 Generated with Claude Code