Repository navigation
Conversation
e3b812b to
f21b390
Compare
…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>
…PU-ATOMIC-CSUB) cs_global_csub.asm (xelerb-debug, carried here from old PR 7237) checks the clamp at 0, the unsigned compare, glc and 32 lanes on one dword. This wave32 fixture adds what it leaves out, for global_atomic_csub and buffer_atomic_csub: - the 16 even lanes on one dword while the odd lanes are inactive and aimed at a trap word: both trap words unchanged, the inactive lanes' vdst/vdata kept, the active lanes' old values returned (an atomic OR of 1 << lane per lane gives the exact mask, since a lane mask copied into a VGPR reads this lane's bit in the translator); - buffer_atomic_csub through a V# with num_records 8: offset 4 in range, offsets 8 (glc) and 12 (no glc) out of range, memory untouched, vdata 0 with glc and kept without. Registered in check.py (WAVE32_DUMPS, WAVE32_LANE_DUMPS, the expected words) and run_gpu_tests.py (the wave32 dump list, its words and the wave32-only list). The docs/design.md csub row now names both fixtures, the GPUs they pass on and the planted faults each one catches. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Tested f21b390 on AMD Radeon RX 6900 XT (RADV NAVI21 / GFX1030, Mesa 26.2.5, Linux 7.3.1 CachyOS, Vulkan 1.4.328, subgroup 32..64): pass. Physical hardware verification on discrete RDNA2 / GFX1030:
AI-assisted: yes |
f21b390 to
e811439
Compare
|
Tested e811439 on NVIDIA GeForce RTX 3080 Ti Laptop (Ampere, subgroup 32..32), NVIDIA 621.24, Vulkan 1.4.357, Windows 11 Pro (build 26300): pass Runtime built at this head with
|
|
The red
This pull request touches none of the files #877 and #892 change, and it merges into current AI-assisted. |
One conflict, in scripts/run_gpu_tests.py: main's TEXT_ONLY_MARK path for llvm-mc-less fixtures (cs_dpp_cmp, 957) next to this branch's asm_target() and "; mcpu:" header. Both are kept: a text-only fixture returns before llvm-mc runs, every other one is assembled for its "; mcpu:" target. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Merged I rebuilt the test programs from the merged tree, then ran both csub fixtures on an RTX 4070 Ti (NVIDIA 620.70.06): they pass natively and with |
Brings the branch up to date with main 68d1331. No conflicts; the merged tree was tested before the push (every standalone test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since ProjectLeonida#930). Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
GPU-ATOMIC-CSUB (claim: #14 (comment))
What and why
The
docs/design.mdrow "global_atomic_csub,buffer_atomic_csub(GFX10.3)" is CPU-checked only onmain(tests/semantic/test_atomic_csub.py) and says that the translation is not GPU-verified.Draft #59 (carried over, Unclaimed) already has a GPU fixture for it,
runtime/test/shaders/cs_global_csub.asm, from old PR 7237 byxelerb-debug. This PR takes that part over on its own:xelerb-debug's two commits, cherry-picked unchanged with their author: thecs_global_csubfixture and the; mcpu:fixture header (build.py,run_gpu_tests.py,tests/test_rdna2_decode.py,tests/conftest.py). The fixture covers both forms:DATAabove, equal to and belowM0xffffffffon0x80000000glcand noglcOne new commit adds
runtime/test/shaders/cs_w32_csub_ext.asm, a wave32 fixture for what that file leaves out:vdst/vdata, and the active lanes get their old values. Each lane ORs1 << laneinto a word, which gives the exact mask. A lane mask copied into a VGPR would read only that lane's bit in the translator (the "Whole-wave masks" row).buffer_atomic_csubgoes through a V# withnum_records8. Offset 4 is in range. Offsets 8 (glc) and 12 (noglc) are out of range: memory is untouched, andvdatais 0 withglcand kept without.Every expected word is derived in the file header from three
docs/design.mdrows:glclane gets 0, and an inactive lane keeps its registerIt is registered in
check.pyandrun_gpu_tests.pythe waycs_w32_fcmpswapis. It is also inWAVE32_LANE_DUMPS, because its masks cover 32 lanes.The csub row now names both fixtures, the GPUs, and the faults each fixture catches.
#59 would then reduce to its
cs_w32_dot_intcommit, on top of this one.cs_w32_csub_extvdstkept its preset0xaaaaaaaa0x777700540x023005c8vdatakept its preset0xaaaaaaaa0x55550012glc: old 30 |Mafter (25) << 160x0019001eglc:vdata0 |Mkept (0x99) << 160x00990000glc:vdatakept (3) |Mkept (0xab) << 160x00ab0003Depends on: none.
Tested
CachyOS (Linux 7.3.3) on this branch (
mainece4ba5b3plus 3 commits), with llvm-mc 23.1.4 and theruntime/buildtest programs, whose sources are the same as this branch's. The device was picked withVK_DRIVER_FILES. Both fixtures were run withrun_gpu_tests.py --filter csuband withbuild.py+check.py:LEONIDA_W64_EMULATE=1I planted translator faults one at a time and reverted each. The results are the same on both GPUs:
cs_global_csubcs_w32_csub_extglcreturnglclane gets itsDATA, not 0Other checks:
python -m unittest discover -s tests/semantic -p test_atomic_csub.py: OK.python -I:test_run_gpu_tests,test_runner_calls_all_tests,test_design_contract_rows,test_docs_links,test_docs_repo_paths,test_text_write_line_endingsandtest_shader_checks.tests/test_rdna2_decode.pywithLLVM_MCset: both csub fixtures pass the llvm-mc parity check. The test then fails oncs_w32_permlane_fi.asm, as it does onmain.conftest.pychange serves. pytest isn't installed here.scripts/check_no_game_data.pyon the changed files: clean.AI-assisted: yes (Claude Code).
🤖 Generated with Claude Code