upleb.uk

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

summaryrefslogtreecommitdiff
path: root/scripts/run_gpu_tests.py
diff options
context:
space:
mode:
authormilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 11:15:37 -0600
committermilk4sale <53350507+milk4sale@users.noreply.github.com>2026-11-24 11:15:37 -0600
commit26d010b41dc042bc36698f673ad588a1e6d04f07 (patch)
treee1c0ddb2ee6fb475b69d13b614e544103e32a7dc /scripts/run_gpu_tests.py
parent355c8c9c2da01a9898df5061d266ca1f5567cdc9 (diff)
rdna2spirv: the binary64 roundings keep a NaN's bits and round a subnormal without the driver (SHADER-ROUND-F64-SPECIALS)
v_trunc_f64, v_ceil_f64, v_rndne_f64 and v_floor_f64 hand their source to the driver's double-precision Trunc, Ceil, RoundEven and Floor. Vulkan lets a driver return any NaN for a NaN operand and, with no DenormPreserve for 64 bits, read a subnormal as zero, and cs_w32_round_f64 measured both: a signalling NaN came back quiet on an RTX 4070 Ti (NVIDIA 620.70.06) and on llvmpipe, and llvmpipe read the smallest subnormals as zero, so v_ceil_f64 of the positive one gave +0. RDNA2 returns a NaN unchanged and keeps subnormals: that ceil is 1. The two kinds of source are now selected with integer ops on the words, after the source modifiers and before the output ones. A NaN's words pass through. A subnormal gives a zero of its sign, or 1 with its sign where the op rounds that sign away from zero (ceil of a positive one, floor of a negative one). Every other source still takes the driver's result. cs_w32_round_f64 now compares all 1152 words exactly, on both devices. tests/semantic/test_f64_round.py runs the four ops under a model of a driver that quiets a NaN and reads a subnormal as zero; without the change that class fails for the signalling NaNs and for ceil and floor of a subnormal. The row in docs/design.md describes the rule and how it was confirmed. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Diffstat (limited to 'scripts/run_gpu_tests.py')
-rw-r--r--scripts/run_gpu_tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/run_gpu_tests.py b/scripts/run_gpu_tests.py
index aac6efeee..53c92298a 100644
--- a/scripts/run_gpu_tests.py
+++ b/scripts/run_gpu_tests.py
@@ -996,7 +996,7 @@ def run_suite(a, work: str) -> int:
996 elif name == "cs_w32_round_f64": 996 elif name == "cs_w32_round_f64":
997 detail = round_f64_test(a.build, spirv_dir, cs_env) 997 detail = round_f64_test(a.build, spirv_dir, cs_env)
998 results.append((name, None if isinstance(detail, Skip) else not detail, 998 results.append((name, None if isinstance(detail, Skip) else not detail,
999 detail or "1152 words judged (64 inputs, eight roundings each, and unchanged inputs)")) 999 detail or "1152 words exact (64 inputs, eight roundings each, and unchanged inputs)"))
1000 elif name == "cs_workgroup_yz": 1000 elif name == "cs_workgroup_yz":
1001 rc, msg = run_cmd([vk_compute, spv, "2x3x4", "workgroup_yz"], env=cs_env) 1001 rc, msg = run_cmd([vk_compute, spv, "2x3x4", "workgroup_yz"], env=cs_env)
1002 results.append((name,) + compute_result(rc, msg, rc == 0 and "2x3x4 workgroup Y/Z: 0 mismatches" 1002 results.append((name,) + compute_result(rc, msg, rc == 0 and "2x3x4 workgroup Y/Z: 0 mismatches"