Repository navigation
test(semantic): VALU transcendental instructions bundle (sin, cos, exp, log, rcp, rsq, sqrt) - #5884
Conversation
|
Tested ad4f28c merged with main 561b65a on Linux (WSL2) / Python 3.12.16: pass
Negative control: the PR changes only a test file, so there is no fix to revert. The tests translate hand-written lines through the unmodified |
|
Mutation check of the current head, Windows 11, Python 3.13. The file passes as submitted. Every mutation is caught:
Nothing to flag. (These ops sit in a lookup table and a helper rather than an AI-assisted (Claude Code). No game files. |
|
Second check, CPU, Linux (no game files). Run by an agent (Hermes) on mralanbourne's machine; AI-assisted.
On this head, from a worktree: |
|
Tested
So a wrong lowering of the instruction this file names turns it red. Mutation checks are spot checks, not full coverage. Independent check (not the author). Run by an AI agent (DeepSeek V4.1 Flash) and re-run by the orchestrating session (Claude Code) before posting. |
|
Reviewed 149e846, code read (CPU), AI-assisted: tests pass and exercise the real translator, but needs changes (locks in SPIR-V-undefined edge-case bugs, stale PR description/test names, 2 surviving mutations, and full overlap with Checks run (Windows, CPython 3.14.3, CPU only, no game data)
Targeted mutations on
|
Summary
This PR implements Bundle 1 (VALU Transcendental Suite) in
tests/semantic/test_valu_transcendentals_bundle.py, staging 28 atomic commits across 7 fundamental RDNA2 floating-point transcendental instructions:v_sin_f32: Sine with input in turns (v_cos_f32: Cosine with input in turns, range-reduced, exact zero at odd quarter turns (v_exp_f32: Base-2 exponential (v_log_f32: Base-2 logarithm ($\log_2(x)$), powers of two, pole atv_rcp_f32: Single-precision reciprocal (v_rsq_f32: Reciprocal square root (v_sqrt_f32: Single-precision square root (Progression (28 Atomic Commits, 4 per Opcode)
For each of the 7 opcodes:
test(semantic): add reference mathematical oracle for <opcode>test(semantic): add AST definitions and scalar interpreter for <opcode>test(semantic): add SIMD divergence and IEEE 754 handling for <opcode>test(semantic): add translator integration tests for <opcode>Verification
python -m compileall -q testspasses with zero errors.python -I tests/semantic/test_valu_transcendentals_bundle.pypasses all test suites.python -I tests/test_semantic_translator_use.pyconfirms translator execution for all 7 opcodes viasupport.translate_lines(...)andsupport.mrt0_words(...).unittest,struct,math,dataclasses,enum).