Commit Graph

5 Commits

Author SHA1 Message Date
e7192663f7 f16_trans_sweep: harden CLI tokens, atomic JSON writes, and oracle result count guards 2026-11-25 07:58:19 +01:00
fef61b247c tools: the RDNA2/3 hardware fuzzers and tests skip on gfx1170+ instead of failing (TEST-873) 2026-11-22 23:45:21 +01:00
5ffb5e30ed f16_trans_sweep: reject empty selections 2026-11-22 19:55:11 +00:00
a6d78ba353 f16_trans_sweep: validate --json before sweeping, create parent folders and report write errors
Validate --json (refusing empty paths, NUL bytes, existing directories, and non-directory parent ancestors) before opening the hardware oracle, create missing parent folders before writing LF-terminated JSON, and catch OSError cleanly with exit code 1. Adds 5 CLI/unit tests in tests/test_f16_trans_sweep.py.
2026-11-22 17:11:05 +01:00
7c0bb5e17b Tools: every f16 input through the f16 transcendentals on the hardware oracle (FUZZ-29)
tools/f16_trans_sweep.py runs all 65,536 f16 bit patterns through v_exp/log/rcp/rsq/sqrt/sin/cos_f16 natively
(8 raw kernels of 1,024 threads per op), in wave32 and wave64 and five MODEs (IEEE, f16 denormal mode, f16
round toward zero), reads MODE back first, and compares each word with the exact result correctly rounded to
f16 (decimal, 60 digits; sin/cos reduced in turns). It counts bit-exact, 1 ulp, >1 ulp, denormals read or
written as zero, signalling NaNs kept or quieted, and the inputs where SPIR-V is undefined, and lists the words
of 23 special inputs.

On an RX 6700 XT (gfx1031): the five non-trigonometric ops are correctly rounded on every non-NaN input; sin/cos
are exact in turns over the whole f16 range (14 and 4 results 1 ulp off, all at |x| <= 1), while the f32
product 6.2831855 * x is >1 ulp off on 16,366 sin and 2,036 cos inputs (#594). denorm_mode_16_64 = 0 flushes
denormal operands and results, FP_ROUND's f16 field is ignored, IEEE only quiets signalling NaNs. The results
go into docs/design.md (a new f16 transcendentals row) and docs/shader_validation.md.
2026-11-22 11:57:04 +02:00