feat(rdna2-ref): run half-precision VOPC and VOP3 compares #502
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/502"
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:20:45Z.
Change
Port the 34 half-precision (
f16) compare instructions ofemu/rdna2_exec_cmpf16.pytocrates/anyxboxx-rdna2-ref(cmpf16.rs,compare.rs) acrossVOPCandVOP3:v_cmp_*_f16(writingVCCinVOPCor theSGPRdestination inVOP3) andv_cmpx_*_f16(writingEXEC), clearing inactive lanes on the full mask write.v_cmp_class_f16andv_cmpx_class_f16, extendingcompare::float_classto 16-bit binary16 (5exponent bits,10mantissa bits) and readingS1through the same 16-bit source path (so float inline constants decode as binary16 bits per ISA section 12.9).VOP3abs/negon bit 15 of float sources and shared refusals (SDWA/DPP,op_sel,clamp,omod, andabs/negon the class maskS1).Linked issue: Refs #482 (part 2 of 3)
Verification
Oracle and test data
PrototypeScarlett/emu/rdna2_exec_cmpf16.py(AMD RDNA 2 ISA sections 3.9, 6.2.5, 12.9).tests/test_rdna2_ref_cmpf16_parity.py, covering all 34 mnemonics inVOPCandVOP3(wave32andwave64), an exhaustive 65,536-input × 10-class-bit sweep forv_cmp_class_f16, all refusal paths, and 250 seeded multi-instruction programs.tests/test_rdna2_ref_cmpf16_parity.pyfails becauseanyxboxx-rdna2-refrefuses all 34f16compare instructions 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_cmpf16.pyis in this repository).AI assistance: implemented and verified with AI coding assistance.