tests: GPU readback for the binary64 roundings, v_trunc_f64, v_ceil_f64, v_rndne_f64 and v_floor_f64 (GPU-ROUND-F64) #1034

Manually merged
github merged 4 commits from gh-pr/1034/head into gh-pr/1034/base 2026-11-26 09:34:32 +00:00
Owner

@⁠milk4sale on GitHub · 2026-11-24 17:06 UTC · original
milk4sale:gpu-test/round-f64 → main · +581 −5 · 7 files · 4 commits · merged 2026-11-24 23:19 UTC

Claimed in the coordination issue as: GPU-ROUND-F64 (#14)

Depends on: #1012 (this branch is one commit on top of it. Both add a memory-fed fixture next to cs_w32_shift64 and touch the same lines of check.py, run_gpu_tests.py and tests/test_shader_checks.py; the last commit is the one to review.)

What and why

v_trunc_f64, v_ceil_f64, v_rndne_f64 and v_floor_f64 are translated to the driver's double-precision Trunc, Ceil, RoundEven and Floor (shaderFloat64). The row in docs/design.md is CPU-checked and hardware-confirmed on gfx1036, but no fixture in runtime/test/shaders ran the four ops, so what a driver does with ties, the largest value below 0.5, values at and above 2^52, signed zeros, subnormals, infinities and NaNs had never gone through the GPU suite.

This adds cs_w32_round_f64, memory-fed like cs_w32_shift64 (#590) and cs_w32_cmp_f64 (#1012):

  • check.py seeds 64 binary64 inputs through VKC_HEAP_INIT; each thread loads one at run time, so nothing folds.
  • A thread stores eight results: the four roundings, v_trunc_f64 with a neg source, v_ceil_f64 with an abs source, a v_floor_f64 whose destination pair overlaps its source pair, and a v_rndne_f64 run with the odd threads turned off, whose destination must keep the pair it held.
  • The expected words come from Python floats (round_f64: exact IEEE-754, the result keeping its source's sign). tests/test_gpu_round_f64.py checks that oracle against exact rational rounding and against the values the row names, and checks the judge, the assembly, the readback and the runner verdicts without a GPU.
  • dump_test gets an optional judge for a readback that is not compared word for word.

What it found

Two differences between the row and what the translated module does on a driver, posted as a finding (#14):

  1. A signalling NaN comes back quiet, with sign and payload kept (0x7ff0000000000001 gives 0x7ff8000000000001), on the RTX 4070 Ti and on llvmpipe. The hardware returns it unchanged.
  2. llvmpipe reads the two smallest subnormals as zero: v_ceil_f64 of the positive one gives +0 where the hardware gives 1. The 4070 Ti keeps them. The module declares no DenormPreserve for 64 bits, and neither device reports shaderDenormPreserveFloat64.

Vulkan allows a driver both, so the fixture judges those two kinds of input by that (a NaN may come back as any NaN; a subnormal may be read as a zero of its sign) and every other word exactly. The row now records both as an approximation. The fix is claimed separately as SHADER-ROUND-F64-SPECIALS and will make the judge exact; it is not in this pull request.

Added with 60c2ed910: a third difference, and the cause of the red linux-gpu-tools here. The job failed this fixture with word 164 (thread 10): rndne of 0x3fe0000000000001 gave 0x0000000000000000, on some runners and not on others. It is llvmpipe, not the translation: llvmpipe's double vectors are twice its native width (512 bits at the usual 256), and it has the exact Trunc and RoundEven only for a width the CPU has a vector extension for. On a CPU without AVX-512 the two ops go through the code it has for a float: a magnitude above 2^24 comes back unchanged (v_trunc_f64 of 123456789.0625 is 123456789.0625), and RoundEven of a smaller one can give the other neighbouring integer (1 for 1.5, 0 for the value just above 0.5). That is 48 of the 512 results. Floor and Ceil are exact on that path. My llvmpipe run passed because this machine has AVX-512; GALLIUM_OVERRIDE_CPU_CAPS=avx (or sse4.1, sse2) on the same machine gives the runner's failure word for word, with Mesa 26.2.6 as with the runner's 25.2.8.

So on llvmpipe, and on no other device, the judge lets v_trunc_f64 and v_rndne_f64 return what that path can give: the source itself above 2^24, either neighbouring integer with the source's sign from 0.5 up to it (ROUND_F64_FLOAT_PATH in check.py, keyed by device name like UNJUDGED_WORDS). v_floor_f64, v_ceil_f64, the kept pair and the inputs stay exact there. dump_test passes the test program's output to a judge, for its device line.

No translator or runtime change here.

Tested

At this head (355c8c9c2; main 82a2aabcc plus #1012), llvm-mc 23.1.4, SPIRV-Tools v2026.4:

  • python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_round_f64 --require-pass on the RTX 4070 Ti: PASS natively and with LEONIDA_W64_EMULATE=1; on llvmpipe: PASS. --filter cs_w32_ on the 4070 Ti: 22/22.
  • Read exactly, without the judge's two allowances: on the 4070 Ti 497 of the 512 results are the hardware's and the other 15 are those of the two signalling NaNs; on llvmpipe the same 15 and five from the two subnormals.
  • Rules broken one at a time, fixture rebuilt, on both devices; each failed: rndne lowered as floor(x + 0.5) (word 20, the sign of -0), trunc lowered as Floor, ceil lowered as Floor, the neg source modifier ignored (word 8), the abs one ignored (word 26), the low result word taken from the high one (word 8), and the fixture without its v_cmpx (word 30). One control did not fail and is not counted: RoundEven replaced by GLSL Round gives the same words on both devices, because both send a tie to the even integer.
  • python -I tests/test_gpu_round_f64.py (14 tests), tests/test_shader_checks.py (87), tests/test_run_gpu_tests.py (64), tests/test_gpu_cmp_f64.py, tests/test_gpu_shift64.py, tests/test_docs_design_rows.py, tests/test_docs_links.py, tests/test_docs_repo_paths.py, tests/test_text_write_line_endings.py, tests/test_regen_fixtures.py: OK. python -m compileall -q make_game.py tools tests and scripts/check_no_game_data.py on the changed files: OK.
  • git merge-tree of this branch against main fce586c6d: clean.
  • At 60c2ed910: the fixture passes on llvmpipe (Mesa 26.2.6) natively, under GALLIUM_OVERRIDE_CPU_CAPS=avx, sse4.1 and sse2, and at LP_NATIVE_VECTOR_WIDTH=128, and on the RTX 4070 Ti natively and with LEONIDA_W64_EMULATE=1. The judge of 355c8c9c2 fails under each of the three overrides at word 164, as the runner did; a scratch judge that lists every wrong result gave the same 48 under each. tests/test_gpu_round_f64.py (18 tests now) rebuilds those 48 and checks that nothing wider passes: not a non-neighbour, a lost sign, an unchanged value below 2^24, anything for ceil or floor, or anything on another device. On the CI image itself (ubuntu-24.04, Mesa 25.2.8, LLVM 20.1.2; the Runtime workflow run on my fork from a scratch branch that sets the avx override and counts): the fixture passes and 48 results take the allowance; three runs without the override landed on runners where none did. The whole GPU suite on llvmpipe gives the same verdict for every fixture natively and under the avx override (172 of 254 passed, 80 skipped; the two that fail are cs_imgload_tfe and cs_imgload_d16_tfe, which this branch's base predates the fix of, #892), so no other fixture depends on that path. On the tree merged with main 4a50cafc7 every standalone test file under tests/ passes except tests/test_ctest_registration.py, which fails on main alone (#1252).

Not run: the whole GPU suite and the whole standard-library test set at this head (both ran for #1012, one commit below, with the results given there); llvm-mc 19, which the linux-gpu-tools job assembles with (not installed here); the translator suite (nothing under tools/ or tests/semantic/ changes); Windows; AMD hardware.

GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS, kernel 7.3.3); Mesa llvmpipe 26.2.6 (LLVM 23.1.4), same machine (Ryzen 9 7900X, also with GALLIUM_OVERRIDE_CPU_CAPS=avx, sse4.1 and sse2); Mesa llvmpipe 25.2.8 (LLVM 20.1.2) on a GitHub ubuntu-24.04 runner

AI-assisted: yes (Claude Code)

Checklist

  • Based on current main and merges cleanly (a conflicting pull request is labeled needs rebase).
  • One topic; follow-up work goes in a new pull request.
  • No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here.
  • A new translator rule is in the contract table of docs/design.md, with how it was confirmed. (No new rule; the existing row now names the fixture and what it measured.)

🤖 Generated with Claude Code

**@⁠milk4sale** on GitHub · 2026-11-24 17:06 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1034) `milk4sale:gpu-test/round-f64` → `main` · +581 −5 · 7 files · 4 commits · merged 2026-11-24 23:19 UTC Claimed in the coordination issue as: GPU-ROUND-F64 (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14) Depends on: #1012 (this branch is one commit on top of it. Both add a memory-fed fixture next to `cs_w32_shift64` and touch the same lines of `check.py`, `run_gpu_tests.py` and `tests/test_shader_checks.py`; the last commit is the one to review.) ### What and why `v_trunc_f64`, `v_ceil_f64`, `v_rndne_f64` and `v_floor_f64` are translated to the driver's double-precision `Trunc`, `Ceil`, `RoundEven` and `Floor` (`shaderFloat64`). The row in `docs/design.md` is CPU-checked and hardware-confirmed on gfx1036, but no fixture in `runtime/test/shaders` ran the four ops, so what a driver does with ties, the largest value below 0.5, values at and above 2^52, signed zeros, subnormals, infinities and NaNs had never gone through the GPU suite. This adds `cs_w32_round_f64`, memory-fed like `cs_w32_shift64` (#590) and `cs_w32_cmp_f64` (#1012): - `check.py` seeds 64 binary64 inputs through `VKC_HEAP_INIT`; each thread loads one at run time, so nothing folds. - A thread stores eight results: the four roundings, `v_trunc_f64` with a `neg` source, `v_ceil_f64` with an `abs` source, a `v_floor_f64` whose destination pair overlaps its source pair, and a `v_rndne_f64` run with the odd threads turned off, whose destination must keep the pair it held. - The expected words come from Python floats (`round_f64`: exact IEEE-754, the result keeping its source's sign). `tests/test_gpu_round_f64.py` checks that oracle against exact rational rounding and against the values the row names, and checks the judge, the assembly, the readback and the runner verdicts without a GPU. - `dump_test` gets an optional `judge` for a readback that is not compared word for word. ### What it found Two differences between the row and what the translated module does on a driver, posted as a finding (https://git.gtahub.st/github/ubiquitarianism--leonida/issues/14): 1. A signalling NaN comes back quiet, with sign and payload kept (`0x7ff0000000000001` gives `0x7ff8000000000001`), on the RTX 4070 Ti and on llvmpipe. The hardware returns it unchanged. 2. llvmpipe reads the two smallest subnormals as zero: `v_ceil_f64` of the positive one gives +0 where the hardware gives 1. The 4070 Ti keeps them. The module declares no `DenormPreserve` for 64 bits, and neither device reports `shaderDenormPreserveFloat64`. Vulkan allows a driver both, so the fixture judges those two kinds of input by that (a NaN may come back as any NaN; a subnormal may be read as a zero of its sign) and every other word exactly. The row now records both as an approximation. The fix is claimed separately as SHADER-ROUND-F64-SPECIALS and will make the judge exact; it is not in this pull request. **Added with `60c2ed910`: a third difference, and the cause of the red `linux-gpu-tools` here.** The job failed this fixture with `word 164 (thread 10): rndne of 0x3fe0000000000001 gave 0x0000000000000000`, on some runners and not on others. It is llvmpipe, not the translation: llvmpipe's double vectors are twice its native width (512 bits at the usual 256), and it has the exact `Trunc` and `RoundEven` only for a width the CPU has a vector extension for. On a CPU without AVX-512 the two ops go through the code it has for a float: a magnitude above 2^24 comes back unchanged (`v_trunc_f64` of 123456789.0625 is 123456789.0625), and `RoundEven` of a smaller one can give the other neighbouring integer (1 for 1.5, 0 for the value just above 0.5). That is 48 of the 512 results. `Floor` and `Ceil` are exact on that path. My llvmpipe run passed because this machine has AVX-512; `GALLIUM_OVERRIDE_CPU_CAPS=avx` (or `sse4.1`, `sse2`) on the same machine gives the runner's failure word for word, with Mesa 26.2.6 as with the runner's 25.2.8. So on llvmpipe, and on no other device, the judge lets `v_trunc_f64` and `v_rndne_f64` return what that path can give: the source itself above 2^24, either neighbouring integer with the source's sign from 0.5 up to it (`ROUND_F64_FLOAT_PATH` in `check.py`, keyed by device name like `UNJUDGED_WORDS`). `v_floor_f64`, `v_ceil_f64`, the kept pair and the inputs stay exact there. `dump_test` passes the test program's output to a judge, for its device line. No translator or runtime change here. ### Tested At this head (`355c8c9c2`; `main` `82a2aabcc` plus #1012), llvm-mc 23.1.4, SPIRV-Tools v2026.4: - `python -I scripts/run_gpu_tests.py --build runtime/build --filter cs_w32_round_f64 --require-pass` on the RTX 4070 Ti: PASS natively and with `LEONIDA_W64_EMULATE=1`; on llvmpipe: PASS. `--filter cs_w32_` on the 4070 Ti: 22/22. - Read exactly, without the judge's two allowances: on the 4070 Ti 497 of the 512 results are the hardware's and the other 15 are those of the two signalling NaNs; on llvmpipe the same 15 and five from the two subnormals. - Rules broken one at a time, fixture rebuilt, on both devices; each failed: `rndne` lowered as `floor(x + 0.5)` (word 20, the sign of -0), `trunc` lowered as `Floor`, `ceil` lowered as `Floor`, the `neg` source modifier ignored (word 8), the `abs` one ignored (word 26), the low result word taken from the high one (word 8), and the fixture without its `v_cmpx` (word 30). One control did not fail and is not counted: `RoundEven` replaced by GLSL `Round` gives the same words on both devices, because both send a tie to the even integer. - `python -I tests/test_gpu_round_f64.py` (14 tests), `tests/test_shader_checks.py` (87), `tests/test_run_gpu_tests.py` (64), `tests/test_gpu_cmp_f64.py`, `tests/test_gpu_shift64.py`, `tests/test_docs_design_rows.py`, `tests/test_docs_links.py`, `tests/test_docs_repo_paths.py`, `tests/test_text_write_line_endings.py`, `tests/test_regen_fixtures.py`: OK. `python -m compileall -q make_game.py tools tests` and `scripts/check_no_game_data.py` on the changed files: OK. - `git merge-tree` of this branch against `main` `fce586c6d`: clean. - At `60c2ed910`: the fixture passes on llvmpipe (Mesa 26.2.6) natively, under `GALLIUM_OVERRIDE_CPU_CAPS=avx`, `sse4.1` and `sse2`, and at `LP_NATIVE_VECTOR_WIDTH=128`, and on the RTX 4070 Ti natively and with `LEONIDA_W64_EMULATE=1`. The judge of `355c8c9c2` fails under each of the three overrides at word 164, as the runner did; a scratch judge that lists every wrong result gave the same 48 under each. `tests/test_gpu_round_f64.py` (18 tests now) rebuilds those 48 and checks that nothing wider passes: not a non-neighbour, a lost sign, an unchanged value below 2^24, anything for `ceil` or `floor`, or anything on another device. On the CI image itself (ubuntu-24.04, Mesa 25.2.8, LLVM 20.1.2; the Runtime workflow run on my fork from a scratch branch that sets the `avx` override and counts): the fixture passes and 48 results take the allowance; three runs without the override landed on runners where none did. The whole GPU suite on llvmpipe gives the same verdict for every fixture natively and under the `avx` override (172 of 254 passed, 80 skipped; the two that fail are `cs_imgload_tfe` and `cs_imgload_d16_tfe`, which this branch's base predates the fix of, #892), so no other fixture depends on that path. On the tree merged with `main` 4a50cafc7 every standalone test file under `tests/` passes except `tests/test_ctest_registration.py`, which fails on `main` alone (#1252). Not run: the whole GPU suite and the whole standard-library test set at this head (both ran for #1012, one commit below, with the results given there); llvm-mc 19, which the `linux-gpu-tools` job assembles with (not installed here); the translator suite (nothing under `tools/` or `tests/semantic/` changes); Windows; AMD hardware. GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 620.70.06, Linux (CachyOS, kernel 7.3.3); Mesa llvmpipe 26.2.6 (LLVM 23.1.4), same machine (Ryzen 9 7900X, also with `GALLIUM_OVERRIDE_CPU_CAPS=avx`, `sse4.1` and `sse2`); Mesa llvmpipe 25.2.8 (LLVM 20.1.2) on a GitHub ubuntu-24.04 runner AI-assisted: yes (Claude Code) ### Checklist - [x] Based on current `main` and merges cleanly (a conflicting pull request is labeled `needs rebase`). - [x] One topic; follow-up work goes in a new pull request. - [x] No game data, keys or decryption (CONTRIBUTING.md), including in logs or reports quoted here. - [ ] A new translator rule is in the contract table of `docs/design.md`, with how it was confirmed. (No new rule; the existing row now names the fixture and what it measured.) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The translator gives the four ops to the driver's double-precision Trunc, Ceil, RoundEven and Floor, and no
fixture in runtime/test/shaders ran them, so what a driver does with ties, the largest value below 0.5, values at
and above 2^52, signed zeros, subnormals, infinities and NaNs had never gone through the GPU suite.

cs_w32_round_f64 is memory-fed, like cs_w32_shift64 and cs_w32_cmp_f64: check.py seeds 64 inputs and each thread
loads one at run time and stores eight results: the four roundings, v_trunc_f64 with a neg source, v_ceil_f64 with
an abs source, a v_floor_f64 whose destination pair overlaps its source pair, and a v_rndne_f64 run with the odd
threads turned off, whose destination must keep the pair it held. The expected words come from Python floats
(exact IEEE-754, the result keeping its source's sign) and are checked against exact rational rounding in
tests/test_gpu_round_f64.py.

Two kinds of input are judged by what Vulkan lets a driver do, not by RDNA2: a NaN may come back as another NaN,
and a subnormal may be read as a zero of its sign, since the module declares no DenormPreserve for 64 bits. That is
what the fixture measured: on an RTX 4070 Ti a signalling NaN comes back quiet, and on llvmpipe the smallest
subnormals are also read as zero. The row in docs/design.md records both as an approximation. dump_test takes an
optional judge for such a readback.

No translator or runtime change.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
linux-gpu-tools failed this fixture with `word 164 (thread 10): rndne of 0x3fe0000000000001 gave
0x0000000000000000`, on some runners and not on others. The cause is llvmpipe, not the translation: its double
vectors are twice its native width (512 bits at the usual 256), and it has the exact Trunc and RoundEven only for a
width the CPU has a vector extension for. Without AVX-512 the two ops go through the code it has for a float, where
a magnitude above 2^24 comes back unchanged and RoundEven of a smaller one can give the other neighbouring integer.
That is 48 of the 512 results, the same 48 with Mesa 25.2.8 (LLVM 20.1.2) on a runner and with Mesa 26.2.6
(LLVM 23.1.4) under GALLIUM_OVERRIDE_CPU_CAPS=avx, sse4.1 or sse2 on a Ryzen 9 7900X; Floor and Ceil are exact on
that path, and with AVX-512 (or AVX at LP_NATIVE_VECTOR_WIDTH=128) so are all four.

On llvmpipe the judge now lets v_trunc_f64 and v_rndne_f64 return what that path can give: the source itself above
2^24, either neighbouring integer with the source's sign from 0.5 up to it. Everything else stays exact there, and no other
device gets the allowance (ROUND_F64_FLOAT_PATH, keyed like UNJUDGED_WORDS). dump_test hands the test program's
output to a judge, for its device line.

Tested: the fixture passes on llvmpipe natively and under each of the three overrides, at
LP_NATIVE_VECTOR_WIDTH=128, and on the RTX 4070 Ti (NVIDIA 620.70.06) natively and with LEONIDA_W64_EMULATE=1; the
previous judge fails under each override at word 164. tests/test_gpu_round_f64.py rebuilds the 48 measured results
and checks that nothing wider passes.

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings the branch up to date with main 68d1331e5. No conflicts; the merged tree was tested before the push (every standalone
test file under tests/ passes except tests/test_ci_registration.py, which fails on main alone since #930).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
Brings the branch up to date with main 6558d5318, which now holds #1012 (GPU-CMP-F64), the pull request this one was
stacked on. Git merged it without conflicts (git merge-tree, exit 0). GitHub had reported a conflict since #1012
merged, with the branch and main on two merge bases (68d1331e5 and 50407827c); main is an ancestor of this commit.

The merged tree was tested before the push: every standalone test file under tests/ passes except
tests/test_ci_registration.py, which fails on main 6558d5318 alone (#1365 fixes it).

Co-Authored-By: Claude Fable 5.2 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 09:34:32 +00:00
github manually merged commit 69935f84ee into gh-pr/1034/base 2026-11-26 09:34:32 +00:00
Author
Owner

@⁠iFeyz on GitHub · 2026-11-24 19:40 UTC · original

AMD run: RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (LLPC, Vulkan 1.4.359), Windows 11. Head 355c8c9c2, scripts/run_gpu_tests.py --filter _f64 with the test programs of a current main build.

  • 7 of 7 pass, native (subgroup 64) and with LEONIDA_W64_EMULATE=1: cs_w32_round_f64 (1152 words judged), cs_w32_cmp_f64 (1536 words exact), and the five _f64 fixtures already on main.
  • Under the judge's tolerance only: with #1047's strict judge, the same readback differs at word 784 (trunc of the signalling NaN 0x7ff0000000000001 gives 0x7ff8000000000001). The AMD driver quiets a signalling NaN as NVIDIA does, so the tolerance this PR's judge gives a NaN source is needed on AMD too. Details on #1047.
**@⁠iFeyz** on GitHub · 2026-11-24 19:40 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1034#issuecomment-7142434869) AMD run: RX 9070 XT (RDNA4, GFX1201), AMD proprietary Windows driver 26.11.2 (LLPC, Vulkan 1.4.359), Windows 11. Head `355c8c9c2`, `scripts/run_gpu_tests.py --filter _f64` with the test programs of a current `main` build. - 7 of 7 pass, native (subgroup 64) and with `LEONIDA_W64_EMULATE=1`: `cs_w32_round_f64` (1152 words judged), `cs_w32_cmp_f64` (1536 words exact), and the five `_f64` fixtures already on `main`. - Under the judge's tolerance only: with #1047's strict judge, the same readback differs at word 784 (`trunc` of the signalling NaN `0x7ff0000000000001` gives `0x7ff8000000000001`). The AMD driver quiets a signalling NaN as NVIDIA does, so the tolerance this PR's judge gives a NaN source is needed on AMD too. Details on #1047.
Author
Owner

@⁠aslan2142 on GitHub · 2026-11-24 23:19 UTC · original

Merged, after #1012. Checked locally on main 16ff59721 + 69935f84e:

  • Claim: valid. GPU-ROUND-F64 was posted at 16:54 UTC, before this PR, and is unedited.
  • It passes on its own: with main's translator, cs_w32_round_f64 passes on llvmpipe (Mesa 26.3.1, also with GALLIUM_OVERRIDE_CPU_CAPS=avx and sse4.1) and on an RDNA2 iGPU (RADV); --filter f64 gives 7 of 7 on both.
  • The expected words agree with an exact rational rounding model for all 512 results: ties, ±0, the 2^52 boundary, −0 results, ±infinity and NaN.
  • On the merge: the semantic suite passes (475 files, 6,212 tests, 0 files failed); test_gpu_round_f64, test_run_gpu_tests, test_shader_checks pass; the 13 docs and writer tests pass; check_no_game_data.py is clean on the 7 changed files.
  • CI had not finished on this head.

A note for later, not blocking: on llvmpipe the float-path allowance lets trunc and rndne return either neighbouring integer, so the strict check of those two rests on the other devices. It is worth narrowing once #1047 is in, if the CI runners allow it.

AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).

**@⁠aslan2142** on GitHub · 2026-11-24 23:19 UTC · [original](https://github.com/ubiquitarianism/leonida/pull/1034#issuecomment-7147262395) Merged, after #1012. Checked locally on `main` `16ff59721` + `69935f84e`: - **Claim:** valid. `GPU-ROUND-F64` was posted at 16:54 UTC, before this PR, and is unedited. - **It passes on its own:** with `main`'s translator, `cs_w32_round_f64` passes on llvmpipe (Mesa 26.3.1, also with `GALLIUM_OVERRIDE_CPU_CAPS=avx` and `sse4.1`) and on an RDNA2 iGPU (RADV); `--filter f64` gives 7 of 7 on both. - **The expected words** agree with an exact rational rounding model for all 512 results: ties, ±0, the 2^52 boundary, −0 results, ±infinity and NaN. - **On the merge:** the semantic suite passes (475 files, 6,212 tests, 0 files failed); `test_gpu_round_f64`, `test_run_gpu_tests`, `test_shader_checks` pass; the 13 docs and writer tests pass; `check_no_game_data.py` is clean on the 7 changed files. - **CI had not finished on this head.** A note for later, not blocking: on llvmpipe the float-path allowance lets `trunc` and `rndne` return either neighbouring integer, so the strict check of those two rests on the other devices. It is worth narrowing once #1047 is in, if the CI runners allow it. AI-assisted (Claude Code, Claude Fable 5.2 and Claude Opus 5.5).
This discussion has been locked. Commenting is limited to contributors.
No description provided.