Repository navigation
tests: the f64 output-modifier checks assert the stores the translator emits (#4473) - #8292
evilclanker9000 wants to merge 2 commits into
Conversation
…tor emits it ItsNotRexed#4473 replaced the per-store OpSelect %active <word> <old> with an active run (or no mask at all when nothing writes EXEC), so this file has been red on main: python -I tests/test_f64_conversion.py is FAILED (failures=6) at dde82f2. The listing writes no EXEC, so the converted word is stored unconditionally; assert that store instead.
…tor emits Same stale shape as the conversion check: with nothing in the listing writing EXEC both words of v[4:5] are stored as computed, so the masked OpSelect the test looked for is gone and the file is red on main (FAILED (failures=7) at dde82f2). The seven modifier cases still have to produce the words the fixture comment lists; the interpreter gives 0x3ff4000000000000 for the plain case and the matching mul:2/mul:4/div:2/clamp words.
|
Verified commit AI-assisted verification. |
leoleahy
left a comment
There was a problem hiding this comment.
AI-assisted.
Independently verified 8ad55227 on Windows 11 (Python 3.14.8, CPU-only, no game data):
- Clean merge check against
upstream/main(dde82f27):git merge-tree --write-treeexit 0,git diff --checkexit 0,python -I -m compileall -q tests/test_f64_conversion.py tests/test_f64_output_modifiers.pyexit 0. - Confirmed both suites currently fail on
upstream/main(dde82f27) due to theexec_static_truedirect-store path from #4473 (tests/test_f64_conversion.py: 6 failures;tests/test_f64_output_modifiers.py: 7 failures). - On HEAD
8ad55227:python -I tests/test_f64_conversion.py1/1 OK,python -I tests/test_f64_output_modifiers.py2/2 OK. - Diff review: assertions now verify
OpStore {dest} {word}directly while keeping all conversion/modifier/NoContraction checks intact.
tupacfan04
left a comment
There was a problem hiding this comment.
The store assertion itself is correct: neither listing writes EXEC, so exec_static_true is set and dst() direct-stores OpStore {dest} {word} (tools/rdna2spirv.py:16480, :1559-1560, :439-446); the conversion uses %reg_v3, the f64 add %reg_v4/%reg_v5, and the modifier chain is unchanged. Three issues remain:
-
Duplicate of open PRs. #6474 changes the same two files with the same
OpStore {dest} {word}assertions, is open/mergeable, has independent Windows/Linux runs and a negative control that turns offexec_static_true. #7528 is broader (addstests/f64_store_shape.pyand runs every case with a data-dependent EXEC write). #7209 also fixes both files with a helper accepting either write shape; #6994/#7365 were closed for the same fix. This PR adds no unique behavior over #6474 and no EXEC-path coverage over #7528; coordinate rather than adding a fifth independent fix. -
Only the no-EXEC branch is tested. All cases use listings that write no EXEC. The body's
s_mov_b32 exec_lo, s0prefix — which puts the writes underOpSelectionMerge/OpBranchConditional— is not in any test. A regression that direct-stores when EXEC is written, or drops the active-run guard, would still pass. #7528’sPREFIXEScovers exactly that. -
The CI premise is wrong.
ci.yml’scheck,stdlib-tests-linuxandmacos-pythonjobs run everytests/test_*.pywithif __name__ == "__main__"; both files have one (tests/test_f64_conversion.py:57,tests/test_f64_output_modifiers.py:96) and no pytest marker, so they do run in all three. The semantic job is only one of several. Correct the stated reason.
The no-EXEC assertion is non-vacuous and the expected registers are right. Synthetic only; no game files. AI-assisted (OpenCode).
|
Checked at |
cryptocxeq
left a comment
There was a problem hiding this comment.
Independent CPU test review of 8ad55227fed5315184dc432864ec01a4b8a0645a, patch applied to main snapshot 32a50c949e882ae539f2d54be93fadd50ce76cae.
The fixtures do not write EXEC, so the translator's statically-active path stores the computed word directly. The revised assertions still trace FClamp/scale and bitcasts to the exact value stored into the target VGPR; they remove the obsolete masked-select expectation rather than removing the store/value check. The f64 NoContraction checks remain.
Windows / CPython 3.11.15: test_f64_conversion.py runs 1 test and test_f64_output_modifiers.py runs 2, all pass. Before the patch the same files fail with 6 and 7 subcase failures respectively, looking for the obsolete load/select pattern. These are emitted-SPIR-V shape checks; a readback fault does not exercise them and no numerical/GPU verification is claimed. No blocking issue found in the updated assertions.
No game files or external shader tools. Claim: #8504 (comment)
AI-assisted (OpenAI Codex).
|
Tested 8ad5522 on Windows 11 (CPU only, no GPU needed): pass Windows 11 Pro, Python 3.14.7, no GPU or game files involved; pytest/numpy/Pillow pinned from
AI-assisted (Claude Code, Claude Opus 5.5). |
|
Tested
|
Item: EGEN-F64MOD-TESTS-STALE (claimed in #8186)
Two translator data-flow checks are red on
mainbecause #4473 replaced the per-storeOpSelect %uint %active <word> <old>with a guarded active run (and with no mask at all when nothing in theprogram writes EXEC). Neither file runs in CI (
.github/workflows/ci.ymlrunsunittest discover -s tests/semantic), so the breakage went unnoticed.tests/test_f64_conversion.py: the listing writes no EXEC, so every lane is active andv_cvt_f32_f64stores the converted word unconditionally. Assert that store.
tests/test_f64_output_modifiers.py: the same for the two words ofv_add_f64 v[4:5], ....The values these tests guard are unchanged: the modifier chain (
OpFConvert/OpFAdd->OpFMul->FClamp->OpBitcast-> store) still has to produce the fixture's words, and the SPIR-V interpreter(
tests/spirv_interp.py) returns 0x3ff4000000000000 for the plainv_add_f64case and the matching wordfor each of
mul:2,mul:4,div:2,clamp,clamp div:2andmul:4 clamp.Tested on
upstream/maindde82f2 (before) and on this branch (after), Windows, Python 3.12:Also ran
python -I scripts/check_no_game_data.py tests/test_f64_conversion.py tests/test_f64_output_modifiers.py(exit 0) andpython -m compileall -qon both files (exit 0).Notes:
shape the two tests regexed for is older than rdna2spirv: cache per-block %active loads and fast-path no-EXEC dst() writes #4473.
s_mov_b32 exec_lo, s0puts thewrites in an
OpSelectionMerge/OpBranchConditionalrun guarded by%active, with the sameOpStore %reg_v3 <word>inside it, so a program that writes EXEC still gets its masked write.v_add_f64values are already checked in CI bytests/semantic/test_valu_add_f64.py; this PR onlyrestores the instruction-level checks that were red.
GPU and driver: none needed.
AI-assisted.