Repository navigation
vk_compute_test: seed s4.. from VKC_SGPRS, so a compute test can take an input word - #398
Conversation
|
What this is for, run on the same RTX 4060 Ti: #300's 16/16 exact (u32 in Wiring that sweep into AI-assisted. |
|
Independently checked AI-assisted (Codex). |
|
Rebased onto main 4abd545 (conflicts were only neighbouring names in RTX 4060 Ti at b5b48be: One caveat, also in the commit message: on NVIDIA this can't catch the bug #300 fixed. With the translator from before #300 (273e53c^1) this card also gives 16/16, because SPIR-V leaves an out-of-range conversion undefined and this hardware saturates anyway. It can fail on a driver that doesn't (like @EchoTD's RADV constant-input case); AI-assisted. |
|
Tested b306d8e on NVIDIA GeForce RTX 3050 Laptop GPU (Ampere, subgroup 32), driver 610.91, Windows 11 build 26300, MSVC 14.44, Vulkan SDK 1.4.363: pass. AI-assisted (Claude Code).
|
b306d8e to
b5b48be
Compare
|
Thanks @FreddyxS and @Aminecsmc. The conflict with 4abd545 is gone: the branch is rebased onto it (b5b48be), and the second commit wires your 16-input sweep into both runners ( AI-assisted. |
|
Tested Verified the integrated conversion sweep and register seeding on Ubuntu 26.04.1 LTS. I built the unmodified Vulkan harness from this head and ran the two filters from separate empty work directories. Both shaders translated and passed SPIR-V validation. The runner reported exact signed and unsigned results for all 16 inputs to I also dispatched the same Coverage was limited to these two synthetic compute fixtures through the filtered runner and the direct register readbacks. AI-assisted verification. |
b5b48be to
c72bb72
Compare
|
Rebased onto main 91b36cf (c72bb72), now mergeable. The conflicts were only #421's RTX 4060 Ti, against a baseline run of main 91b36cf on the same machine: For the record, main 91b36cf itself fails three tests here (and in its own CI run): CI on c72bb72 matches: the failing AI-assisted. |
c72bb72 to
f9e6c98
Compare
|
Rebased onto the merge round's main 22590c7 (f9e6c98), mergeable, as asked. The only conflicts were #296's mip-zero names next to RTX 4060 Ti, against a baseline run of main 22590c7 on the same machine: AI-assisted. |
… an input word vk_compute_test always put the output V# in s[0:3] and zero in every other user SGPR, so a compute test shader could not be given an input word: ItsNotRexed#300's cs_cvt_f32_sat reads its float from s4 and could only be checked on a GPU by building one shader variant per input by hand. - VKC_SGPRS=w4,w5,... sets s4, s5, ... up to s31 (s[0:3] stay the output V#), with the same syntax and checks as vk_harness's VKH_SGPRS: decimal or 0x hex, no sign, nothing above 32 bits, no trailing comma, at most 28 words; anything else exits 2 with a message. - cs_user_sgprs.asm declares eight user SGPRs (RSRC2 0x8090) and stores s4..s7 back. Both runners seed it with 0x4f000000,0xdeadbeef,7, 0xffffffff (check.USER_SGPRS) and expect those words, then the 0xEEEEEEEE fill. - check.compute_test() takes an env for vk_compute_test. - tests/test_shader_checks.py: the fake harness only answers cs_user_sgprs with the seeded words when VKC_SGPRS was passed, and no other test may get VKC_SGPRS. AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (Ada, subgroup 32), driver 32.0.16.2124, Windows 11, on main d937b7f: - run_gpu_tests.py cs_user_sgprs PASS natively and with LEONIDA_W64_EMULATE=1; check.py cs_user_sgprs ok - vk_compute_test directly: unset -> s4..s7 read 0; "5" sets s4 only; 28 words accepted; "1,2,", "-1", "0x1ffffffff", "abc" and 29 words exit 2 - test_shader_checks.py fails (7) if check.py stops passing VKC_SGPRS - full suite: see the PR Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…h VKC_SGPRS cs_cvt_f32_sat (ItsNotRexed#300) takes its binary32 input in s4, so neither runner ran it. Now both do: one dispatch per input of tests/semantic/test_float_to_int.py (check.CVT_F32_SAT_CASES), each judged on both words (v_cvt_u32_f32 in out[0], v_cvt_i32_f32 in out[1]). - check.cvt_f32_sat_test() and the run_gpu_tests.py branch report "16/16 inputs exact", or how many were wrong and the first one. - tests/test_shader_checks.py: the fake device answers from the word in VKC_SGPRS; every input must be sent, one wrong input must fail and be named, and the table must equal the interpreter test's CASES. On NVIDIA this checks the fixed translation, but it cannot catch the old bug: with the translator from before ItsNotRexed#300 (273e53c^1) the RTX 4060 Ti also gives 16/16, since SPIR-V leaves an out-of-range conversion undefined and this hardware saturates anyway. A driver that does not (@EchoTD's RADV case on ItsNotRexed#300, constant inputs) is where it can fail; tests/semantic/test_float_to_int.py pins the rule itself. AI-assisted (Claude Code). Tested on NVIDIA GeForce RTX 4060 Ti (Ada, subgroup 32), driver 32.0.16.2124, Windows 11, on main d937b7f: run_gpu_tests.py cs_cvt_f32_sat "16/16 inputs exact" natively and with LEONIDA_W64_EMULATE=1; check.py cs_cvt_f32_sat ok; tests/test_shader_checks.py 18/18. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
f9e6c98 to
b928011
Compare
|
Rebased onto c432cdc (b928011), mergeable. The one real merge was RTX 4060 Ti at b928011: AI-assisted. |
What and why
vk_compute_testalways puts the output V# ins[0:3]and zero in every other user SGPR, so a compute test shader can't be given an input word. #300'scs_cvt_f32_satreads its float froms4, so on a GPU it could only be checked by building one shader variant per input by hand (@EchoTD did 16 on #300; @NWX10 and I noted the gap there too).VKC_SGPRS=w4,w5,...setss4,s5, ... up tos31;s[0:3]stay the output V#. Same syntax and checks asvk_harness'sVKH_SGPRS: decimal or0xhex, no sign, nothing above 32 bits, no trailing comma, at most 28 words; anything else exits 2 with a message. Unset, everything is as before.cs_user_sgprs.asmdeclares eight user SGPRs (RSRC20x8090) and storess4..s7back. Both runners seed it with0x4f000000,0xdeadbeef,7,0xffffffff(check.USER_SGPRS) and expect those words, then the0xEEEEEEEEfill.check.compute_test()takes anenvforvk_compute_test.tests/test_shader_checks.py: the fake harness only answerscs_user_sgprswith the seeded words whenVKC_SGPRSwas passed, and no other test may getVKC_SGPRS.With this, #300 (or a follow-up) can run
cs_cvt_f32_satwithVKC_SGPRS=<input>once per input fromtest_float_to_int.py. Doesn't touch #368'sVKC_OUT_WORDS/VKC_DUMP(different lines of the same file).Item: TEST-43 (claimed in #374).
Tested
NVIDIA GeForce RTX 4060 Ti (Ada, subgroup 32..32), driver 32.0.16.2124, Windows 11 Home 26300, on main
d937b7f; LLVM 21.1.8 (WSL), Vulkan SDK 1.4.363, MSVC 2022.run_gpu_tests.py:cs_user_sgprsPASS (0x4f000000 0xdeadbeef 0x7 0xffffffff, then the fill), natively and withLEONIDA_W64_EMULATE=1. Whole suite: 62/62 translated and spirv-val valid; 35/59 passed, 24 skipped natively; 59/59 emulated; none failed. Every other test's PASS/SKIP is identical to maind937b7f.build.py+check.py:cs_user_sgprs ok.vk_compute_testdirectly: unset →s4..s7read 0;5setss4only; 28 words (s4..s31) accepted;1,2,,-1,0x1ffffffff,abcand 29 words exit 2 with the message.tests/test_shader_checks.py15/15; it fails (7) ifcheck.pystops passingVKC_SGPRS. ctest 18/18,tests/test_*.pyall pass,tests/semantic440 OK.Checklist
docs/design.md, with how it was confirmed. (No translator change.)AI-assisted (Claude Code); I ran the tests above.
🤖 Generated with Claude Code