Repository navigation
test(semantic): add translator-backed tests for v_ldexp_f64 - #5480
slopgobblercobbler wants to merge 1 commit into
Conversation
|
Tested At With only that ID fix, the RTX 5090 readback also exposed a rounding discrepancy. I used positive binary64 inputs with raw bit patterns 1, 3, 5 and 7 (units of the smallest subnormal), all with exponent −1. The GPU returned raw bit patterns 0, 1, 2, 3. The PR’s unmodified interpreter helper returned the same four values. Python’s Two regression checks would catch these independently: validate the generated module and compare those four raw results against the binary64 reference. The GPU measurements used the temporary ID fix. The submitted head failed validation. AI-assisted verification. |
|
Independent test on Apple M4 at head The PR's own tests pass on both Python versions. I reproduced both of tylerstraub's findings here:
What's new below comes from a cross-check against #3543, which implements the same op from gfx1036 measurements and was claimed in #3232. #3543's test against this PR. I ran #3543's
No effect on current output:
Verdict: changes requested. Beyond the invalid SPIR-V and the truncation, NaN clamp, omod and literal placement differ from #3543's measured contract. #3543 already covers this op. AI-assisted. |
|
Tested
AI-assisted (Claude Code). |
What
Adds translator support and hardware-verified semantic interpreter tests for
v_ldexp_f64intests/semantic/test_valu_ldexp_f64_hw.py.Covers:
v_ldexp_f64(VOP3) binary64 floating-point scaling by signed 32-bit integer exponents (D.f64 = S0.f64 * (2 ^ S1.i32))Float64capability unless VOP3 output modifiers are presentmath.ldexp|S0|), neg (-S0), and combined-|S0|clampto [0.0, 1.0]support.translate_lines(...)andsupport.mrt0_words(...)docs/design.mdTested
python -m compileall -q make_game.py tools tests(Passed, 0 errors)python -I tests/test_semantic_translator_use.py(Passed, OK)python -I tests/semantic/test_valu_ldexp_f64_hw.py(Passed all 8 tests, OK)python -I tests/semantic/test_alu_frexp_f64.py(Passed all 9 tests, OK)unittest,struct,math)