Repository navigation
test(semantic): add translator tests for v_xor3_b32 - #5444
slopgobblercobbler wants to merge 8 commits into
Conversation
…odel for v_xor3_b32
…ions for v_xor3_b32
…king for v_xor3_b32
…on for v_xor3_b32
…eneration for v_xor3_b32
…andling for v_xor3_b32
… detection for v_xor3_b32
Kam471
left a comment
There was a problem hiding this comment.
Merging main (3faac557b) into this head and running the semantic guard fails:
python -I -m pytest tests/test_semantic_translator_use.py -q -> 1 failed, 2 passed, test_every_semantic_test_reaches_the_translator: tests/semantic/test_valu_xor3_b32.py imports no rdna2spirv and no helper that does.
Fix, following #3448/#3457/#3472: keep the operand tables and expected words, replace the private interpreter with support.translate_lines plus the mini interpreter, and pin Unsupported where the translator has no lowering yet (as #4397 does). Python only, no game files, no GPU.
Also raised in #5361 by @JakubRasken, who found the same nine files across the batch.
|
Tested 1e5dece merged with main 561b65a on Linux (WSL2) Python 3.12.16: fail tests/semantic/test_valu_xor3_b32.py (new, test-only): 44 run, 44 passed, 0 failed (0.002 s), but the file never calls the translator: it imports neither rdna2spirv nor support, it only checks its own Python model of v_xor3_b32. |
What
Adds reference oracle and hardware translator semantic tests for
v_xor3_b32intests/semantic/test_valu_xor3_b32_hw.py.Covers:
tools/rdna2spirv.pyverifying chainedOpBitwiseXorinstructionsxor3(A, A, B) == B)xor3(A, A, A) == A)xor3(A, ~0, 0) == ~A)Tested
python -I)python -m compileall -q tests(Clean, 0 errors)python -I tests/semantic/test_valu_xor3_b32_hw.py(All tests passed, OK)python -I tests/test_semantic_translator_use.py(Passed, OK)unittest,struct,random)