diff options
| author | milk4sale <53350507+milk4sale@users.noreply.github.com> | 2026-11-24 11:15:37 -0600 |
|---|---|---|
| committer | milk4sale <53350507+milk4sale@users.noreply.github.com> | 2026-11-24 11:15:37 -0600 |
| commit | 26d010b41dc042bc36698f673ad588a1e6d04f07 (patch) | |
| tree | e1c0ddb2ee6fb475b69d13b614e544103e32a7dc /tests/test_run_gpu_tests_python_assembler.py | |
| parent | 355c8c9c2da01a9898df5061d266ca1f5567cdc9 (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 'tests/test_run_gpu_tests_python_assembler.py')
0 files changed, 0 insertions, 0 deletions