feat(rdna2-ref): run f16 integer/norm conversions, packs and min3/max3/med3 #505
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/505"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from LooperSalty/AnyXboxX. Originally posted by Lewandox on 2026-11-27T14:34:00Z.
Change
Port the 14 half-precision integer/normalized conversion, pack and three-operand min/max/med3 instructions (20
VOP1andVOP3encodings) added to the Python model in #275 (emu/rdna2_exec_f16conv.py) tocrates/anyxboxx-rdna2-ref(f16conv.rs):VOP1andVOP3:v_cvt_f16_u16,v_cvt_f16_i16,v_cvt_u16_f16,v_cvt_i16_f16,v_cvt_norm_i16_f16,v_cvt_norm_u16_f16.VOP3-only:v_cvt_pknorm_i16_f16,v_cvt_pknorm_u16_f16,v_cvt_pknorm_i16_f32,v_cvt_pknorm_u16_f32,v_pack_b32_f16,v_min3_f16,v_max3_f16,v_med3_f16.24f32significand bits ×16-bit scale =40bits, exact in53-bitf64), ISAv_med3_f16NaN/±0rules, low-16-bit inline float constants on 16-bit integer sources, and all sharedVOP1/VOP3refusals (SDWA/DPP,omod,clampon integer/packed results,op_selrestrictions).Linked issue: Refs #482 (follow-up covering #275)
Verification
Oracle and test data
PrototypeScarlett/emu/rdna2_exec_f16conv.py(AMD RDNA 2 ISA sections 6.2.5, 12.7, 12.8, 12.12).tests/test_rdna2_ref_f16conv_parity.pychecks all 65,536 16-bit inputs across all 6 unary conversions (393,216 evaluations), fixedVOP3encodings and shared refusals across all 20 encodings, and 250 seeded multi-instruction programs.tests/test_rdna2_ref_f16conv_parity.pyfails becauseanyxboxx-rdna2-refrefuses all 20 encodings witherror untranslated.Checklist
E_NOTIMPL), never a fake success.test_readme_sync.pychecks it; collected count stays1900+).AGENTS.mdallows; none used here.emu/rdna2_exec_f16conv.pyis in this repository).AI assistance: implemented and verified with AI coding assistance.
Imported from LooperSalty/AnyXboxX. Originally posted by LooperSalty on 2026-11-27T15:54:06Z.
Thanks! #501 and #502 were just merged and this PR now conflicts with main (same
anyxboxx-rdna2-reffiles). Could you rebase it on main? It is otherwise ready to merge.Imported from LooperSalty/AnyXboxX. Originally posted by Lewandox on 2026-11-27T16:08:17Z.
Rebased on \main\ and re-verified \cargo test -p anyxboxx-rdna2-ref\ — ready to merge!