Covers the 12 v_dot* ops the translator lowers: the six VOP3P forms and the
six accumulating c forms (v_dot4c_i32_i8 is the gfx103x one; the others are
gfx908 syntax the translator also takes). A Python integer reference, sharing
no code with the translator, is compared bit for bit with the translation run
in spirv_mini_interp.
Three stages: a sweep of every encodable source-kind combination with and
without clamp (671 programs), an edge grid of lane extremes against
accumulators on the saturation bounds (2,944 cases), then random programs.
The reference is pinned to the 15 words measured on gfx1036 in
tests/semantic/test_alu_dot4_i8.py.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also: #2490's committed conflict markers in fssm_crosscheck.md resolved to main's text, the SHADER-605 section
moved below the troubleshooting table it split, a header rule for the export-format table, two backticked
paths that name no Leonida file, and the BOM dropped from anim_move.py and its test.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
TreXito's review of #4536 found 40 mismatches in 24000 programs (seeds 776401 and
776402, exp(S2) - exp(S1) >= 1024): the reference predates #2477 (48a1a98b),
whose measured RDNA2 gfx1036 rules are in the docs/design.md v_div_fixup row.
The translator is the side that is right. Checked against that row and against
the v_div_fixup_f64 lowering in tools/rdna2spirv.py on main, not only against the
proposed patch:
- NaN in S2 or S1 passes through unchanged (a signalling NaN is not quieted with
IEEE=0); the priority NaN(S2) over NaN(S1) is unchanged.
- The underflow cutoff is exp(S2) - exp(S1) <= -1076 (was < -1074).
- There is no overflow check (was >= 1024).
- NaN(S0) gives signed infinity, still below the underflow case.
test_div_fixup_table is updated row by row (gap 1074/1075 pass S0, 1076 gives a
signed zero, no overflow rows, unquieted sNaN) and docs/shader_validation.md
records the rule.
AI-assisted (OpenBot team).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>
#2477 (48a1a98b) makes the translator return signed infinity for v_div_fixup_f64
with NaN(S0), as measured on RDNA2 gfx1036, which is what the reference already
modelled. The case is no longer a known divergence (as TreXito's review of #4536
observed: two tests fail on main because they expect the old divergence).
- Remove the div-fixup-nan-s0 entry, its reference skip and its dedicated --known
program; NaN(S0) programs are compared like any other.
- Add a positive test that the reference and the translator give +-inf for qNaN,
-qNaN and sNaN with both output signs.
- Rework the two --known tests so they no longer depend on div_fixup: the three
remaining forms are excluded with a reason by default, run with --known, and a
planted clamp-only translator error exits 1 and prints the shrunk program.
- docs/shader_validation.md no longer lists the div_fixup case.
Same change as 41525870 (prepared for #4586, which #2477 made redundant).
AI-assisted (OpenBot team).
Co-authored-by: OpenBot <335604065+openbotgit[bot]@users.noreply.github.com>