Repository navigation
test(semantic): add reference oracle and semantic tests for v_pk_fma_clamp_f16 - #2804
Conversation
…odel for v_pk_fma_clamp_f16
…ions for v_pk_fma_clamp_f16
…v_pk_fma_clamp_f16
…king for v_pk_fma_clamp_f16
…on for v_pk_fma_clamp_f16
…eneration for v_pk_fma_clamp_f16
…andling for v_pk_fma_clamp_f16
… detection for v_pk_fma_clamp_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. |
|
Semantic & Pre-flight Verification: PASS AI-assisted review. Validated branch
Verification Summary:
Zero game data used. |
|
Tested The checked-in tests run a Python model. As a separate spot check of the production path, I translated a handwritten fragment shader for packed f16 FMA with one clamped lane above 1 and the other below 0. Its Vulkan 1.2 SPIR-V validated and all 4,096 pixels matched 0x00003c00 exactly on an RTX 5070 Ti, NVIDIA 620.73.04. The GPU check covers this case. AI-assisted, synthetic inputs only. |
|
Measured on gfx1036 (RDNA2, AMD Radeon iGPU, driver 26.10.1, game MODE: ieee 0, dx10_clamp 1, denorm32 0, denorm16_64 3): all 200 cases match. 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 a bit-accurate reference mathematical oracle and comprehensive semantic validation suite for
v_pk_fma_clamp_f16intests/semantic/test_valu_pk_fma_clamp.py.Covers:
Tested
python -m compileall -q tests(Clean, 0 errors)python -I tests/semantic/test_valu_pk_fma_clamp.py(All tests pass)python -Icompatible, 0 external dependencies)Checklist
docs/design.md, with how it was confirmed.