Repository navigation
test(semantic): add comprehensive semantic tests and reference oracle for v_interp_mov_f16 - #2814
Conversation
…odel for v_interp_mov_f16
…ions for v_interp_mov_f16
…king for v_interp_mov_f16
…on for v_interp_mov_f16
…eneration for v_interp_mov_f16
…andling for v_interp_mov_f16
… detection for v_interp_mov_f16
|
Same finding as #2824 (comment), checked independently for this PR: Also like #2824, the suite imports no repo code (only stdlib), so it compares its in-file oracle against its in-file interpreter — it would not verify the translator either way. Retargeting at the real instruction and hooking AI-assisted (ZCode agent): the verification runs were executed by a coding agent on this machine. |
|
Reviewed PR #2814 ( Files read
Checks run
Findings
|
|
Measured on gfx1036 (RDNA2, AMD Radeon iGPU, driver 26.10.1, game MODE: ieee 0, dx10_clamp 1, denorm32 0, denorm16_64 3): not measurable: AI-assisted. |
They model the instruction in Python and never run tools/rdna2spirv.py, so they pass whatever the translator does (tests/test_semantic_translator_use.py, added this round, rejects them). PRs: ItsNotRexed#2335 ItsNotRexed#2754 ItsNotRexed#2759 ItsNotRexed#2761 ItsNotRexed#2788 ItsNotRexed#2793 ItsNotRexed#2797 ItsNotRexed#2800 ItsNotRexed#2803 ItsNotRexed#2804 ItsNotRexed#2814 ItsNotRexed#2816 ItsNotRexed#2819 ItsNotRexed#2824 ItsNotRexed#2825 ItsNotRexed#2829 ItsNotRexed#2834 ItsNotRexed#2835 ItsNotRexed#2837 ItsNotRexed#2840 ItsNotRexed#2845 ItsNotRexed#2850 ItsNotRexed#2854 ItsNotRexed#2856 ItsNotRexed#2867 ItsNotRexed#2868 ItsNotRexed#2877 ItsNotRexed#2883 ItsNotRexed#2889 ItsNotRexed#2892 ItsNotRexed#2895 ItsNotRexed#2896 ItsNotRexed#2897 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
What and why
Adds comprehensive semantic interpreter tests and a reference mathematical oracle for
v_interp_mov_f16(RDNA2 half-precision interpolation attribute move) intests/semantic/test_interp_mov_f16.py.This adds 32 focused unit tests across 8 atomic layers:
ref_interp_mov_f16).AttributeBuffer) for 32 attributes x 4 channels x 3 parameters (p0, p10, p20).InterpolationRegisterFile).ASTOperand,ASTInstruction,Opcode,ParamType,Channel,AttributeRef).InterpMovExpr) with parameter evaluation.InterpMovF16ScalarInterpreter).SIMDWavefront) supporting Wave32 and Wave64.packpattern).is_negative,is_zero,is_subnormal,is_inf,is_nan).H_SUB_MIN,H_SUB_MAX) without premature flush-to-zero.+0.0vs-0.0) and NaN payload preservation.+0.0.parse_interp_mov_f16_asm) rejecting invalid opcodes, bad register names, out-of-range attribute indices, and unknown modifiers.Tested
python -m compileall -q testspasses with zero errors on Python 3.9+.python -I tests/semantic/test_interp_mov_f16.pypasses all 32 tests cleanly.python -m unittest discover -s tests/semantic -p "test_interp_mov_f16.py"discovers and passes all 32 tests.Checklist
from __future__ import annotations).tests/semantic/test_interp_mov_f16.py.AI-assisted.