Merged from the TreXito/mangrove copy of the original repository, which carried
contributor pull requests that were never merged here.
Kept: rdna2spirv fixes (ds_append/ds_consume, v_ldexp_f16 under MODE.FP_ROUND,
thread-group SGPR, fma exact), the differential fuzzers (dot, vint, wint, vrel, cvt,
f16misc, salu, mode) with their tests, the exe/import fail-fast and int3 cause tools,
Zen 2 instruction emulation (cpu_emulation.h) and the xapu.dll/chad.dll shims.
Not taken, because they conflict with different implementations already on main:
the D3D12 Xbox-ABI layer, xmem, acphal, loader TLS, f64_diff, DirectStorage (needs the
typed-error zlib inflate), and the copy's own MANGROVE.md and README changes.
With --oracle hw,vk, run_suite called vk_verdict on each hardware row
before check() validated it, so a None row raised a TypeError and a
short or empty row an IndexError, both uncaught by main() (traceback,
exit 1). A None batch also reached len(hw). check_hw_rows() now refuses
a None batch, a wrong result count, and a None or sub-4-word row right
after oracle.run(), before either comparison path; str rows (skip
reasons) pass as before. main-level hw,vk regressions cover None, []
and a 2-word row, as the review asked.
AI-assisted (Claude Code)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference kept a signalling NaN through mul:2 / mul:4 / div:2, while the
translator's OpFMul quiets it, so a later v_cmp_class_f32 differed (seed 202,
program 53: v_ldexp_f32 v5, -|v18|, v1 mul:2 with v18 = 0x7f800001, then a
class test on bit 0). What the hardware does is not measured, so the program
is now skipped as "output modifier on a signalling NaN", like the clamp of a
NaN. Quiet NaNs and sNaNs without an omod are judged as before.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The reference returned 0x7fc00000 for any NaN or infinity. docs/design.md ("Float min/max/med3 with NaN, v_fract")
records the gfx1036 measurement: a NaN operand comes back unchanged, a signalling one too, and +-inf gives exactly
0xffc00000. The translator follows that, so a v_cmp_class_f32 of a fract'd signalling NaN reported a false
mismatch: fmisc_diff --programs 8000 --seed 775101, program 177 (v_fract_f32 of 0x7f800001, then a class mask with
bit 0 and not bit 1: reference 0, translated 1.0).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A separate exact-rational ISA model for v_fract_f32, v_frexp_mant/exp_f32, v_ldexp_f32, v_cvt_u32/i32_f32, v_cvt_off_f32_i4, v_fmamk_f32, the 16 v_cmp_*_f32 conditions and v_cmp_class_f32, with neg/abs, omod and clamp and every source kind within the constant-bus rules, compared one lane at a time with rdna2spirv run in tests/semantic/spirv_mini_interp.py, optionally with the hardware through tools/hw_oracle (run under IEEE off, f32 denormals flushed). Denormals, NaN payloads read as integers, clamp of a NaN and omod giving a zero are counted skips. v_cmp_class_f32 with neg/abs on a signalling NaN only with --known.
AI-assisted.