upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/testing.md
diff options
context:
space:
mode:
authoraslan2142 <jan.trencansky@protonmail.com>2026-11-25 00:02:27 +0100
committerGitHub <noreply@github.com>2026-11-25 00:02:27 +0100
commit6558d5318d0130b65eba9acfa408ce0ef23d86b5 (patch)
treef171bb4543907b3aba796a3e0f6b16a12eb8bb8f /docs/testing.md
parent28a32e190ef461b9d895433813aa83aa7d662385 (diff)
parentd366ee248992db80d03ac1e5ce323058c6ac9e5d (diff)
Merge pull request #1012 from milk4sale/gpu-test/cmp-f64
tests: GPU readback for the binary64 vector compares, v_cmp_*_f64 and v_cmpx_*_f64 (GPU-CMP-F64)
Diffstat (limited to 'docs/testing.md')
-rw-r--r--docs/testing.md16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/testing.md b/docs/testing.md
index 9f9ce653e..305fae1bc 100644
--- a/docs/testing.md
+++ b/docs/testing.md
@@ -395,6 +395,22 @@ It needs shader Int64 support; a device that lacks it reports a skip. This is a
395independent of wave64 emulation. On RTX 3080 Ti (616.92, Windows 11), all 640 words matched; replacing the count 395independent of wave64 emulation. On RTX 3080 Ti (616.92, Windows 11), all 640 words matched; replacing the count
396mask with 31 or the arithmetic shift with a logical shift made the test fail at words 66 and 251 respectively. 396mask with 31 or the arithmetic shift with a logical shift made the test fail at words 66 and 251 respectively.
397 397
398`cs_w32_cmp_f64` checks the 32 binary64 vector compares, `v_cmp_*_f64` into VCC and `v_cmpx_*_f64` on EXEC, with
399256 memory-fed operand pairs: the product of 16 values (±inf, ±max, the 1-ULP neighbours of ±1, the smallest
400subnormals, ±0, the smallest normal, a NaN whose payload is only in the low dword and a negative quiet NaN). Each
401thread stores one bit per predicate for both forms, a bit for `tru` run with the odd threads turned off (an inactive
402lane gets VCC 0 from `v_cmp_` and stays off through `v_cmpx_`) and two bits for `lt` and `nge` with VOP3 `abs`/`neg`.
403The expected words come from Python floats (`cmp_f64_words` in `check.py`): IEEE-754 ordering, with every pair that
404has a NaN unordered. Both GPU runners compare all 1536 heap words (512 result words and 1024 unchanged input words);
405the operands are loaded at run time, so neither the translator nor the driver can fold a compare. Run it alone with
406`python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_cmp_f64 --require-pass`.
407It is a wave32 test and no step of it needs a particular subgroup width, so it also runs on llvmpipe; the SGPR-pair
408and constant operand forms are CPU-checked only (`tests/semantic/test_cmp_f64.py`). On an RTX 4070 Ti (NVIDIA
409620.70.06, Linux) all 1536 words matched, and seven translator rules broken one at a time each failed it: no `-0`
410canonicalization at word 206, a NaN test that ignores the low dword at word 28, an ordering key without the low
411dword at word 70, the raw result written to an inactive lane's VCC at word 2, `v_cmpx_` replacing EXEC at word 3,
412`abs` ignored and `nlt` lowered as the negation of `le` at word 0.
413
398## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`) 414## Wave64 pixel, vertex and geometry shaders (`w64_graphics.py`)
399 415
400Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the 416Graphics stages have no emulation: on a 32-wide subgroup a wave64 VS, PS or GS runs as two 32-lane halves, and the