Repository navigation
Conversation
|
Tested
AI-assisted. |
|
Tested 29552f6 merged with main dde82f2 on Linux/Python 3.12.16: pass
Negative control: tools/wave64_halves.py restored from main with the PR's new test file kept: Diff read: |
|
Tested 29552f6 on Windows 11 (NTFS), Python 3.12.10 (CPU only, no GPU, no game files): pass The test counts and the 20-failure negative control from the two earlier reviews match what I got. This review adds the following. What I ran:
VCC half writes under different EXEC states (tier from the translator, then the 1x64 and 2x32 outputs from
Other hand-written cases: Nits, none blocking:
Docs: the tier C list in AI-assisted (Claude Code). |
|
Tested 29552f6 on Steam Deck LCD (Jupiter), AMD Custom GPU 0405 "Van Gogh", RADV Mesa 26.2.0-devel (git-5c65d4fc31), Vulkan 1.4.350, SteamOS 3.9.5 (holo), kernel 7.2.7-valve2-2-neptune-72-g31504582a073: pass Command:
AI-assisted (OpenCode) |
Claimed in coordination issue #7496: #7496 (comment)
Summary
Fixes soundness false negatives in
tools/wave64_halves.pywhere wave64 graphics shaders were certified Tier A despite diverging between one 64-lane wave and two 32-lane halves:wave64_halves.py:887-895):MASK_BITWISEpreviously only entered whenany(self.is_mask(ins, x) for x in srcs). Writes tovcc_loorvcc_hiwhose sources are immediates or non-mask SGPRs (e.g.s_mov_b32 vcc_hi, 0,s_mov_b32 vcc_lo, 0,s_mov_b32 vcc_hi, s4,s_not_b32 vcc_lo, 0x0f,s_and_b32 vcc_hi, 0x0f, 0x05) fell through as plain scalar ALU and passed as Tier A even thoughrdna2spirv.pyupdates only one half viawave_lane < 32/>= 32.vccorexec(wave64_halves.py:887-925,1190-1226):s_mov_b64,s_and_b64,s_not_b64,s_cselect_b64,s_wqm_b64writingvcc, andSAVEEXEC/s_mov_b64/s_and_b64/s_wqm_b64writingexec, read non-mask sources viardna2spirv.Gen.mask_src(taking bitwave_lane:0..63on 64-wide vs0..31in each 32-wide half). Only constant0,-1/0xFFFFFFFFFFFFFFFF, andnullare uniform across both halves.0xFFFFFFFFhas zero upper 32 bits (lo = 0xFFFFFFFF, hi = 0, lanes0..31on and32..63off), so treating0xFFFFFFFFas a uniform 64-bit mask constant at line 884 also lets_and_b64 vcc, vcc, 0xffffffffands_and_b64 s[6:7], vcc, 0xffffffffpass as Tier A while diverging between 1x64 and 2x32.s_mov_b64/s_cselect_b64non-SCC semantics when taintingvcc, and requires all registers of a copied SGPR pair to carry the tag before propagatingmask/elect/wfmask/uvoteins_mov_b64.Disjoint from
#2241(v_cndmask/co_cidata-SGPR check),#4624(half-overwritten SGPR mask pairs), and#7380/#5747(vote()changes).Changes
tools/wave64_halves.py: add_uniform_mask_const, handle live-VCC half writes and non-uniform 64-bitvcc/execmask sources inMASK_BITWISEandexec_write, and require pair-wide tag agreement ins_mov_b64tag propagation.tests/semantic/test_wave64_halves_mask_literals.py: standalone soundness regression suite verifying 20 diverging wave64 vertex-shader cases (1x64 vs 2x32 execution viaspirv_wave_interp+spirv_asm.assembleVulkan 1.2) are Tier C, and 8 clean uniform-constant/control cases remain Tier A and agree on 1x64 vs 2x32.Verification
spirv-val,llvm-mc, Vulkan SDK, or game files used).origin/main86a7807ddviaLEONIDA_TOOLS_DIR):tests/semantic/test_wave64_halves_mask_literals.pyfails 20/20 diverging cases (all falsely Tier A).python -B -I tests/semantic/test_wave64_halves_mask_literals.py -v— 4/4 OK (20 diverging Tier C cases + 8 Tier A controls, all assembled withspirv_asm.assemble(..., target_env="vulkan1.2")and executed 1x64 vs 2x32)python -B -I tests/semantic/test_wave64_halves.py— 125/125 OKpython -B -I tests/semantic/test_wave64_halves_soundness.py— 33/33 OKpython -B -I tests/semantic/test_wave64_halves_readlane_uniform.py— 2/2 OKpython -B -I tests/test_semantic_translator_use.py— 3/3 OKpython -B -I tests/test_runner_calls_all_tests.py— 3/3 OKpython -B -I scripts/check_no_game_data.py tools/wave64_halves.py tests/semantic/test_wave64_halves_mask_literals.py— exit 0python -B -I make_game.py --help— exit 0tests/test_wave64_halves_fixtures.py(requirespytest),spirv-val, GPU execution tests, and full-corpus census (nopytest/ Vulkan SDK / game files in this checkout).AI-assisted.