anyxboxx-rdna2-ref refuses the half-precision (f16) VOP1/VOP2/VOP3/VOPC instructions that the Python model runs #482
Labels
No labels
accessibility
bloqué : binaire console
bug
chargeur
console-dll
cpu
documentation
duplicate
enhancement
good first issue
gpu
help wanted
invalid
performance
question
runtime-gdk
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LooperSalty--AnyXboxX#482
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@Luke-Ervin on GitHub · 2026-11-27 03:54 UTC · original
Problem
The Python reference interpreter runs the scalar half-precision vector instructions added since #218 (
emu/rdna2_exec_f16.py,emu/rdna2_exec_cmpf16.py, including #246, #247 and the f16 transcendentals). The Rust port,crates/anyxboxx-rdna2-ref, has none of them: they are only in its mnemonic table, so it refuses every one witherror untranslated.On
mainatb62053f, trying each of these names in each encoding the mnemonic table gives it (VOP1, VOP2, VOP3, VOPC), with plain register operands, wave32:v_add_f16,v_sub_f16,v_subrev_f16,v_mul_f16,v_fma_f16,v_fmac_f16,v_fmamk_f16,v_fmaak_f16,v_min_f16,v_max_f16,v_ldexp_f16,v_ceil_f16,v_floor_f16,v_trunc_f16,v_rndne_f16,v_fract_f16,v_frexp_mant_f16,v_frexp_exp_i16_f16,v_cvt_f16_f32,v_cvt_f32_f16,v_cvt_pkrtz_f16_f32,v_rcp_f16,v_sqrt_f16,v_rsq_f16,v_log_f16,v_exp_f16,v_sin_f16,v_cos_f16) and the 34 f16 compares (v_cmp_*_f16,v_cmpx_*_f16,v_cmp_class_f16,v_cmpx_class_f16).Minimal reproduction (input to
target/release/anyxboxx-rdna2-ref, then the same words throughemu.rdna2_exec):Why nothing caught it:
tests/test_rdna2_ref_parity.pygenerates its random programs from the Python tables it imports (VECTOR,VECTOR_COMPARE, the packed f16 tables…), and the scalar f16 tables are not among them, so these instructions are never compared.docs/rust-full-status.mdstill says "No RDNA 2 instruction family of the interpreter is Python-only any more", from a sweep run on 2026-11-25, before most of the f16 work was merged.#303 ports the HLSL recompiler (a new crate,
anyxboxx-rdna2-hlsl) and does not touchanyxboxx-rdna2-ref, so the two do not overlap.Proposal
Port them to
anyxboxx-rdna2-ref, checked against the Python model the same way as the earlier families (parity tests with fixed and seeded programs, refusals included), and correct the status doc. To keep each review small, in three pull requests:ceil/floor/trunc/rndne/fract/frexp) and the conversions, with their VOP3 modifiers and the same refusals as the Python (SDWA/DPP, unsupportedop_sel/omod).v_cmpxwriting EXEC,v_cmp_class_f16).rcp,sqrt,rsq,log,exp,sin,cos, compared with the Python on all 65,536 inputs of each, since their last bit depends on the host's float functions.Each one adds the new names to the parity generator, so later f16 changes on the Python side get compared automatically.
Questions
rust/full, phase 4 ofdocs/architecture-rust.md)?Found with an AI-assisted differential sweep of the two interpreters (Claude Code); the counts and the reproduction above were checked by running both interpreters on Linux.