Tests: f32 and f16 transcendentals on the GPU against f64 references #638

Open
acaracargo wants to merge 2 commits from upstream-pr/643 into main
acaracargo commented 2026-11-24 02:49:23 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by acaracargo on 2026-11-24T02:49:23Z.


Adds GPU tests for v_rcp, v_rsq, v_sqrt, v_log, v_exp, v_sin and v_cos, in both f32 and f16, against f64 references.

Special results such as zeros, infinities, NaN and overflow are checked exactly. Other results are checked within the following tolerances:

  • f32: 2^-21 relative (4 ulp), and 2^-10 absolute for sin / cos.
  • f16: 2^-9 relative, and 2^-8 absolute for sin / cos.

The worst measured f32 errors were 0 for rcp, 8.4e-8 for rsq, 7.4e-8 for sqrt, 1.2e-7 for log, 1.1e-7 for exp, 6.8e-5 for sin and 9.6e-5 for cos. The f16 error was about 1.6 ulp at most.

The sin / cos results also show that converting turns to radians before range reduction increases the error with larger arguments. This is worth investigating separately rather than changing the translation in a test-only PR.

#530 covers the f64 forms of rcp and rsq, which these tests do not touch.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: gpu_transcendental_f32 and gpu_transcendental_f16.

Tested

  • NVIDIA GeForce RTX 4060 (32-lane waves only), driver 610.88; Intel Core i5-13400F; Windows 11 Pro 26300; Rust 1.100.0 x86_64-pc-windows-msvc; DXC 1.9.2602.17; debug.
  • cargo test --workspace -- --test-threads=4 on 232ee73: 686 passed, 0 failed, 41 ignored (main 9ce2070: 684 / 0 / 41).
  • SKIPPED: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).
  • Incorrect angle scaling, replacing log2() with log(), replacing exp2() with exp() and removing the 2pi factor from the f16 cosine translation all cause the tests to fail (checked locally, reverted).

Regression run

  • Test-only change, no runtime regression run.

Not tested

  • AMD GPUs and native wave64.
  • Console instruction accuracy. The tolerances follow D3D accuracy classes.
  • rsq(-0) because console behavior is unverified.
  • f16 overflow beyond the binary16 range due to the rounding behavior discussed in #111.

AI use

  • Claude Code (Claude Opus 5.5) wrote the tests and the original description and ran the tests and mutation checks. ChatGPT assisted with editing the PR description.
<!-- greyfinch-sync:ivall/xcl:issue:5465145919 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643). Originally posted by [acaracargo](https://github.com/acaracargo) on 2026-11-24T02:49:23Z. --- Adds GPU tests for `v_rcp`, `v_rsq`, `v_sqrt`, `v_log`, `v_exp`, `v_sin` and `v_cos`, in both f32 and f16, against f64 references. Special results such as zeros, infinities, NaN and overflow are checked exactly. Other results are checked within the following tolerances: - f32: 2^-21 relative (4 ulp), and 2^-10 absolute for sin / cos. - f16: 2^-9 relative, and 2^-8 absolute for sin / cos. The worst measured f32 errors were 0 for rcp, 8.4e-8 for rsq, 7.4e-8 for sqrt, 1.2e-7 for log, 1.1e-7 for exp, 6.8e-5 for sin and 9.6e-5 for cos. The f16 error was about 1.6 ulp at most. The sin / cos results also show that converting turns to radians before range reduction increases the error with larger arguments. This is worth investigating separately rather than changing the translation in a test-only PR. #530 covers the f64 forms of rcp and rsq, which these tests do not touch. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: `gpu_transcendental_f32` and `gpu_transcendental_f16`. **Tested** - NVIDIA GeForce RTX 4060 (32-lane waves only), driver 610.88; Intel Core i5-13400F; Windows 11 Pro 26300; Rust 1.100.0 `x86_64-pc-windows-msvc`; DXC 1.9.2602.17; debug. - `cargo test --workspace -- --test-threads=4` on `232ee73`: 686 passed, 0 failed, 41 ignored (`main` `9ce2070`: 684 / 0 / 41). - SKIPPED: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). - Incorrect angle scaling, replacing `log2()` with `log()`, replacing `exp2()` with `exp()` and removing the 2pi factor from the f16 cosine translation all cause the tests to fail (checked locally, reverted). **Regression run** - Test-only change, no runtime regression run. **Not tested** - AMD GPUs and native wave64. - Console instruction accuracy. The tolerances follow D3D accuracy classes. - `rsq(-0)` because console behavior is unverified. - f16 overflow beyond the binary16 range due to the rounding behavior discussed in #111. **AI use** - Claude Code (Claude Opus 5.5) wrote the tests and the original description and ran the tests and mutation checks. ChatGPT assisted with editing the PR description.
MesshM commented 2026-11-24 07:05:49 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by MesshM on 2026-11-24T03:18:22Z.


Test run of 232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0 on AMD RDNA4 (native wave64). I merged it onto current main 63cdc25 locally (clean merge) and tested that tree.

Tested

  • AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 stable-x86_64-pc-windows-msvc, debug
  • cargo build --workspace + cargo test --workspace -- --test-threads=4 on the merge: 694 passed, 0 failed, 41 ignored, exit code 0; xcl lib tests 654 passed, 0 failed, 21 ignored
  • 0 SKIPPED; gpu_transcendental_f32 and gpu_transcendental_f16 pass.

Review: v_sin / v_cos take their input in turns (turn(x, f64::sin)), as the hardware does, and inputs past |x| > 256 are left out where the hardware's own reduction differs; the special values are compared exactly and the rest within a relative tolerance (absolute for sin / cos). This is the first AMD run.

Not tested: no retail title (not needed for a test-only change), release build; the PR's head on its old base was not run, only its merge onto main.

Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.

<!-- greyfinch-sync:ivall/xcl:comment:7120964844 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/643#issuecomment-7120964844). Originally posted by [MesshM](https://github.com/MesshM) on 2026-11-24T03:18:22Z. --- Test run of `232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0` on AMD RDNA4 (native wave64). I merged it onto current `main` `63cdc25` locally (clean merge) and tested that tree. **Tested** - AMD Radeon RX 9060 XT 16 GB (RDNA4, native wave64), driver 32.0.32029.2010; Ryzen 7 5700X, 64 GB RAM, Windows 11 Pro build 26200, Rust 1.100.0 `stable-x86_64-pc-windows-msvc`, debug - `cargo build --workspace` + `cargo test --workspace -- --test-threads=4` on the merge: **694 passed, 0 failed, 41 ignored**, exit code 0; `xcl` lib tests 654 passed, 0 failed, 21 ignored - **0 `SKIPPED`**; `gpu_transcendental_f32` and `gpu_transcendental_f16` pass. **Review:** `v_sin` / `v_cos` take their input in turns (`turn(x, f64::sin)`), as the hardware does, and inputs past |x| > 256 are left out where the hardware's own reduction differs; the special values are compared exactly and the rest within a relative tolerance (absolute for sin / cos). This is the first AMD run. **Not tested:** no retail title (not needed for a test-only change), release build; the PR's head on its old base was not run, only its merge onto `main`. Run and review by Claude Code (Claude Opus 5.5) on this machine; the review points were checked against the code.
NAbobo101 commented 2026-11-24 07:05:50 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by NAbobo101 on 2026-11-24T03:21:11Z.


Test run of 232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0 on NVIDIA Blackwell with an older DXC than the PR's run (1.8 instead of 1.9), tested as is (it also merges cleanly onto current main dd2ae9a).

Tested

  • NVIDIA GeForce RTX 5060 8 GB (Blackwell, 32-lane waves only), driver 621.14 (32.0.16.2114); AMD Ryzen 7 5700G, 32 GB; Windows 11 Pro 26300; Rust 1.100.0 x86_64-pc-windows-msvc; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug.
  • cargo test --workspace --no-fail-fast -- --test-threads=4: 686 passed, 0 failed, 41 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • gpu_transcendental_f32 and gpu_transcendental_f16 pass, and three more runs of both (--nocapture) printed the same worst errors each time:
    • f32: rcp 0, rsq 8.43e-8, sqrt 7.45e-8, log 1.19e-7, exp 1.09e-7, sin 6.77e-5, cos 9.57e-5 – the same as the description's RTX 4060 / DXC 1.9 figures.
    • f16: rcp 8.24e-4, rsq 4.29e-4, sqrt 4.88e-4, log 6.51e-4, exp 6.93e-4, sin 4.88e-4, cos 4.88e-4 – within the 2^-9 relative / 2^-8 absolute tolerances with a margin of about 2.4x at the worst (rcp).

Not tested

  • AMD GPUs and native wave64.
  • Mutations of the translation (the description's checks were not repeated here).

AI use

  • Claude Code (Claude Opus 5.5) ran the build and tests and drafted this comment; I checked the results.
<!-- greyfinch-sync:ivall/xcl:comment:7121007815 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/643#issuecomment-7121007815). Originally posted by [NAbobo101](https://github.com/NAbobo101) on 2026-11-24T03:21:11Z. --- Test run of `232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0` on NVIDIA Blackwell with an older DXC than the PR's run (1.8 instead of 1.9), tested as is (it also merges cleanly onto current `main` `dd2ae9a`). **Tested** - NVIDIA GeForce RTX 5060 8 GB (Blackwell, 32-lane waves only), driver 621.14 (32.0.16.2114); AMD Ryzen 7 5700G, 32 GB; Windows 11 Pro 26300; Rust 1.100.0 `x86_64-pc-windows-msvc`; DXC 1.8.2502.11 (Windows SDK 10.0.26100); debug. - `cargo test --workspace --no-fail-fast -- --test-threads=4`: 686 passed, 0 failed, 41 ignored. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - `gpu_transcendental_f32` and `gpu_transcendental_f16` pass, and three more runs of both (`--nocapture`) printed the same worst errors each time: - f32: rcp 0, rsq 8.43e-8, sqrt 7.45e-8, log 1.19e-7, exp 1.09e-7, sin 6.77e-5, cos 9.57e-5 – the same as the description's RTX 4060 / DXC 1.9 figures. - f16: rcp 8.24e-4, rsq 4.29e-4, sqrt 4.88e-4, log 6.51e-4, exp 6.93e-4, sin 4.88e-4, cos 4.88e-4 – within the 2^-9 relative / 2^-8 absolute tolerances with a margin of about 2.4x at the worst (rcp). **Not tested** - AMD GPUs and native wave64. - Mutations of the translation (the description's checks were not repeated here). **AI use** - Claude Code (Claude Opus 5.5) ran the build and tests and drafted this comment; I checked the results.
lordon1a commented 2026-11-24 07:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by lordon1a on 2026-11-24T03:38:09Z.


Independent GPU test report on 232ee73:

Tested

  • Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver 616.64, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200), rustc 1.100.0 (x86_64-pc-windows-gnullvm), debug build, DXC 1.9.2609.5 (01b62ad4)
  • Command: cargo test -p xcl --lib gpu_transcendental_ -- --nocapture
  • Result: 2 passed, 0 failed, 0 ignored in 0.97s (gpu_transcendental_f32 max err: rcp 0.0, rsq 8.43e-8, sqrt 7.45e-8, log 1.19e-7, exp 1.09e-7, sin 6.77e-5, cos 9.57e-5; gpu_transcendental_f16 max err: rcp 8.24e-4, rsq 4.29e-4, sqrt 4.88e-4, log 6.51e-4, exp 6.93e-4, sin/cos 4.88e-4)

Not tested

  • AMD / wave64, Intel GPU, retail title

AI use

  • Antigravity (Google DeepMind agent) — fetched 232ee73 in a detached worktree, audited the diff, ran the GPU test, and posted this report.
<!-- greyfinch-sync:ivall/xcl:comment:7121280038 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/643#issuecomment-7121280038). Originally posted by [lordon1a](https://github.com/lordon1a) on 2026-11-24T03:38:09Z. --- Independent GPU test report on `232ee73`: **Tested** - Hardware: NVIDIA GeForce RTX 3070 Ti Laptop GPU (driver `616.64`, wave32, SM 6.6), Intel i7-12700H, Windows 11 Home 26H2 (build 26200), `rustc 1.100.0` (`x86_64-pc-windows-gnullvm`), debug build, DXC `1.9.2609.5` (`01b62ad4`) - Command: `cargo test -p xcl --lib gpu_transcendental_ -- --nocapture` - Result: **2 passed, 0 failed, 0 ignored** in `0.97s` (`gpu_transcendental_f32` max err: rcp `0.0`, rsq `8.43e-8`, sqrt `7.45e-8`, log `1.19e-7`, exp `1.09e-7`, sin `6.77e-5`, cos `9.57e-5`; `gpu_transcendental_f16` max err: rcp `8.24e-4`, rsq `4.29e-4`, sqrt `4.88e-4`, log `6.51e-4`, exp `6.93e-4`, sin/cos `4.88e-4`) **Not tested** - AMD / wave64, Intel GPU, retail title **AI use** - Antigravity (Google DeepMind agent) — fetched `232ee73` in a detached worktree, audited the diff, ran the GPU test, and posted this report.
acaracargo commented 2026-11-24 07:06:00 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by acaracargo on 2026-11-24T03:47:36Z.


@lordon1a Eline sağlık.

<!-- greyfinch-sync:ivall/xcl:comment:7121424759 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/643#issuecomment-7121424759). Originally posted by [acaracargo](https://github.com/acaracargo) on 2026-11-24T03:47:36Z. --- @lordon1a Eline sağlık.
upipibi commented 2026-11-24 07:06:40 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by upipibi on 2026-11-24T05:53:39Z.


For when this lands: #818 (fix for #796) reduces v_sin / v_cos in turns before scaling. With this PR's gpu_transcendental_f32 / _f16 applied locally, both pass on main and with #818 (RTX 3070, driver 616.56). The worst sin/cos errors drop from 6.8e-5 / 9.6e-5 (f32) to 1.2e-7 / 6.0e-8, and f16 sin from 4.9e-4 to 2.6e-4. So after #818 the f32 sin/cos tolerance could tighten well below 2^-10, and the skip of inputs above 256 turns could go: the RDNA2 ISA's own examples include sin(-MaxFloat) = 0 and cos(-MaxFloat) = 1.

AI-assisted (Claude Code).

<!-- greyfinch-sync:ivall/xcl:comment:7123374481 --> Imported from [ivall/xcl](https://github.com/ivall/xcl/pull/643#issuecomment-7123374481). Originally posted by [upipibi](https://github.com/upipibi) on 2026-11-24T05:53:39Z. --- For when this lands: #818 (fix for #796) reduces `v_sin` / `v_cos` in turns before scaling. With this PR's `gpu_transcendental_f32` / `_f16` applied locally, both pass on `main` and with #818 (RTX 3070, driver 616.56). The worst sin/cos errors drop from 6.8e-5 / 9.6e-5 (f32) to 1.2e-7 / 6.0e-8, and f16 sin from 4.9e-4 to 2.6e-4. So after #818 the f32 sin/cos tolerance could tighten well below 2^-10, and the skip of inputs above 256 turns could go: the RDNA2 ISA's own examples include `sin(-MaxFloat) = 0` and `cos(-MaxFloat) = 1`. AI-assisted (Claude Code).
JJAutoCompare commented 2026-11-25 06:05:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T05:42:30Z.


Tested

PR #643 was open at 232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0 before and after the run. The checkout was clean and detached at that commit. The PR discussion and issue #42 contained no equivalent Arc result at either check.

  • STOR-WINLAB, native Windows 11 Enterprise Evaluation 25H2 x64 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 x86_64-pc-windows-msvc, DXC/DXIL 1.9.2609.5, debug test profile with debuginfo disabled.

  • cargo test --locked -p xcl --lib --no-run --message-format=json finished in 39.90 s outside the Arc lock, with two build jobs, incremental compilation disabled, dev/test debuginfo set to 0, and TEMP/TMP under L:/XclTooling/pr643/temp.

  • With XCL_ADAPTER=A770, XCL_DIRECT_DXIL=0, and XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64, the lock wrapper ran the two prebuilt fixtures. $fixtureBinary came from Cargo's artifact output.

    & $fixtureBinary gpu::recomp::tests::gpu_transcendental_f32 --exact --nocapture --test-threads=1
    & $fixtureBinary gpu::recomp::tests::gpu_transcendental_f16 --exact --nocapture --test-threads=1
    
  • 2 passed, 0 failed, 0 ignored, 0 capability skips. Both fixtures reached their final assertions after GPU dispatch and readback. From the fixture loops, f32 evaluated 175 result comparisons (0.60 s) and f16 evaluated 159 (0.21 s) across reciprocal, reciprocal square root, square root, log2, exp2, sine and cosine. They exercised signed-zero inputs, infinities, NaN and turn-based angles where the fixtures include those cases. Both used split logical wave64 on 32-lane Arc hardware, as selected by the checked-in runner.

  • The Cargo build, both native fixture processes, and the Arc wrapper each returned 0. The wrapper logged release of the GPU lock.

Not tested

Native wave64, standalone logical wave32, direct DXIL, rsq(-0), f16 results filtered by the fixture's overflow guard, angles outside the fixture's domain, console parity, other fixtures, the workspace suite, and retail smoke runs.

AI use

T3 Code / Codex (gpt-6.2-sol) ran the verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr643/{f32,f16}.stdout.log and published.

<!-- greyfinch-sync:ivall/xcl:comment:7154062173 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7154062173). Originally posted by [JJAutoCompare](https://github.com/JJAutoCompare) on 2026-11-25T05:42:30Z. --- **Tested** [PR #643](https://github.com/xcl-dev/xcl/pull/643) was open at `232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0` before and after the run. The checkout was clean and detached at that commit. The PR discussion and issue #42 contained no equivalent Arc result at either check. - STOR-WINLAB, native Windows 11 Enterprise Evaluation 25H2 x64 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust/Cargo 1.100.0 `x86_64-pc-windows-msvc`, DXC/DXIL 1.9.2609.5, debug test profile with debuginfo disabled. - `cargo test --locked -p xcl --lib --no-run --message-format=json` finished in 39.90 s outside the Arc lock, with two build jobs, incremental compilation disabled, dev/test debuginfo set to 0, and `TEMP`/`TMP` under `L:/XclTooling/pr643/temp`. - With `XCL_ADAPTER=A770`, `XCL_DIRECT_DXIL=0`, and `XCL_DXC_DIR=%LOCALAPPDATA%/XclTooling/dxc-1.9.2609/bin/x64`, the lock wrapper ran the two prebuilt fixtures. `$fixtureBinary` came from Cargo's artifact output. ```powershell & $fixtureBinary gpu::recomp::tests::gpu_transcendental_f32 --exact --nocapture --test-threads=1 & $fixtureBinary gpu::recomp::tests::gpu_transcendental_f16 --exact --nocapture --test-threads=1 ``` - **2 passed, 0 failed, 0 ignored, 0 capability skips.** Both fixtures reached their final assertions after GPU dispatch and readback. From the fixture loops, f32 evaluated 175 result comparisons (0.60 s) and f16 evaluated 159 (0.21 s) across reciprocal, reciprocal square root, square root, log2, exp2, sine and cosine. They exercised signed-zero inputs, infinities, NaN and turn-based angles where the fixtures include those cases. Both used split logical wave64 on 32-lane Arc hardware, as selected by the checked-in runner. - The Cargo build, both native fixture processes, and the Arc wrapper each returned `0`. The wrapper logged release of the GPU lock. **Not tested** Native wave64, standalone logical wave32, direct DXIL, `rsq(-0)`, f16 results filtered by the fixture's overflow guard, angles outside the fixture's domain, console parity, other fixtures, the workspace suite, and retail smoke runs. **AI use** T3 Code / Codex (`gpt-6.2-sol`) ran the verification and wrote this report. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against `pr643/{f32,f16}.stdout.log` and published.
DavidM1911 commented 2026-11-25 13:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T12:31:37Z.


Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)

Thanks!

<!-- greyfinch-sync:ivall/xcl:comment:7162493999 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7162493999). Originally posted by [DavidM1911](https://github.com/DavidM1911) on 2026-11-25T12:31:37Z. --- Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.) Thanks!
github-actions[bot] commented 2026-11-29 07:42:42 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-11-29T07:42:42Z.


Nothing has happened on this PR for 3 days, so it is marked stale and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto main if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.

<!-- greyfinch-sync:ivall/xcl:comment:7252642436 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7252642436). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T07:42:42Z. --- Nothing has happened on this PR for 3 days, so it is marked `stale` and will be closed in 4 days. A push or a comment takes the mark off: rebase it onto `main` if it conflicts, and say in one line what it still fixes. If it only waits for a maintainer, a comment saying so is enough.
relativespace2K commented 2026-11-30 03:06:54 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by relativespace2K on 2026-11-30T03:06:54Z.


merge-check
base: 53e85fb1
head: 232ee73f36
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2790 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in --test gpu_two_pass_cache_e2e, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there), so none comes from this PR; both new GPU tests passed here and neither is among the SKIPPED lines, so they really ran on the RX 6800 XT. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused.
review: no blocking finding; one file, every line read. Both tests compare the GPU against f64 references computed in the test, exactly for the special values (zeros, infinities, NaN, negatives) and within a stated tolerance otherwise, and both leave out the cases where the console's answer is genuinely unsettled, each with a comment saying why: rsq(-0), sin/cos beyond the ISA's ±256 turns, and the f16 conversion that rounds toward zero and gives 65504 instead of an infinity (#111). The sin/cos references lower the argument in revolutions (the console's convention) and the tolerance carries a note on how the error grows with the turn count, which matches the failure mode a reviewer would look for. One note, not blocking: TOL[5]/TOL[6] are 2^-10 (9.77e-4) while the comment cites D3D's own 8e-4 limit for sin/cos, so the test is a little looser than the spec it names; tightening it to 8e-4 would make the test catch an error D3D itself would reject. No duplicate: #1576, #1639 and #638 cover other op families.
performance: none: tests only.
verdict: safe to merge
hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.

<!-- greyfinch-sync:ivall/xcl:comment:7267598160 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7267598160). Originally posted by [relativespace2K](https://github.com/relativespace2K) on 2026-11-30T03:06:54Z. --- merge-check base: 53e85fb1 head: 232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2790 passed, 6 failed, 49 ignored; failing: gpu::dxil::compact_tests::gpu_compact_form_with_micro_blocks_and_literal_table_runs_as_the_plain_form, gpu::recomp::pso::shader_cache_tests::console_mesh_caches_hlsl_compute_pass_in_memory_and_on_disk, hle::d3d12x::standin::tests::concurrent_shell_miss_reuses_winner_and_releases_loser_pipeline, ram_budget::tests::windows_takes_a_working_set_maximum_and_lifts_it, and two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (in `--test gpu_two_pass_cache_e2e`, so 5 failing tests give 6 failures). The same five fail on base 53e85fb1 alone (2788 passed, 6 failed, 49 ignored there), so none comes from this PR; both new GPU tests passed here and neither is among the SKIPPED lines, so they really ran on the RX 6800 XT. 13 SKIPPED lines, all environmental: no D3D12 debug layer / d3d12SDKLayers.dll, no heap windows, no GPU_UPLOAD, per-lane f16/f32 forms refused. review: no blocking finding; one file, every line read. Both tests compare the GPU against f64 references computed in the test, exactly for the special values (zeros, infinities, NaN, negatives) and within a stated tolerance otherwise, and both leave out the cases where the console's answer is genuinely unsettled, each with a comment saying why: `rsq(-0)`, sin/cos beyond the ISA's ±256 turns, and the f16 conversion that rounds toward zero and gives 65504 instead of an infinity (#111). The sin/cos references lower the argument in revolutions (the console's convention) and the tolerance carries a note on how the error grows with the turn count, which matches the failure mode a reviewer would look for. One note, not blocking: `TOL[5]`/`TOL[6]` are `2^-10` (9.77e-4) while the comment cites D3D's own 8e-4 limit for sin/cos, so the test is a little looser than the spec it names; tightening it to 8e-4 would make the test catch an error D3D itself would reject. No duplicate: #1576, #1639 and #638 cover other op families. performance: none: tests only. verdict: safe to merge hardware / tool and model: AMD Radeon RX 6800 XT 16 GB (RDNA2, wave64), driver 32.0.21045.29003; Ryzen 5 5600, 32 GB RAM; Windows 10 IoT Enterprise LTSC 2024, 10.0.26100 build 26100.9974; Rust 1.100.0; DXC 1.9.2602.17; debug build. DeepSeek Harness coding agent, model DeepSeek V4.1 Flash.
tiagonleal commented 2026-11-30 03:33:56 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by tiagonleal on 2026-11-30T03:33:56Z.


merge-check
base: cfb9753a8c
head: 232ee73f36
merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2836 passed, 0 failed, 51 ignored; SKIPPED: 24 lines (22 no wave64, 2 no heap windows), the same as on the base; failing: none. Base alone on this PC: 2834 passed, 0 failed, 51 ignored. The two new tests are not among the skipped ones: gpu::recomp::tests::gpu_transcendental_f32 and gpu_transcendental_f16 ran on this card and passed in the suite and in 4 separate runs with --nocapture.
review: whole diff read (+130/-0, tests only, gpu/recomp/tests.rs). A second vendor for the numbers: on this NVIDIA card the worst f32 errors were rcp 0, rsq 8.4e-8, sqrt 7.4e-8, log 1.19e-7, exp 1.09e-7 relative, against the test's 4.77e-7 (4 ulp), and sin 6.8e-5, cos 9.6e-5 absolute against 9.77e-4. The f16 worst errors were 4.3e-4 to 8.2e-4 relative for rcp, rsq, sqrt, log and exp, and 4.9e-4 absolute for sin and cos, the same in every run. One note, not a blocker: the 4 ulp bound for log and exp is tighter than what D3D promises for those functions, so the f32 test can fail on a driver that is within the spec; here the margin is about four times. No test of these instructions existed on main, the names do not collide, and each test is one dispatch.
performance: none, tests only. scripts/smoke.ps1, 60 s of a retail title, release, as an extra: 1664 frames and 16062 MB peak commit against 1678 and 1677 frames, 15737 and 16476 MB on the base. No device removal, no crash.
verdict: safe to merge
hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Fable 5.2 ran the build, suite and tests and wrote this; Claude Opus 5.5 read the diff first)

  • Tiago
<!-- greyfinch-sync:ivall/xcl:comment:7268001089 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7268001089). Originally posted by [tiagonleal](https://github.com/tiagonleal) on 2026-11-30T03:33:56Z. --- merge-check base: cfb9753a8cbf5517ee36914b7041cb62b4a97582 head: 232ee73f36c7b8fa0c4e9fe30c96e29a4b3063f0 merge: clean build: cargo build --workspace -> ok tests: cargo test --workspace --no-fail-fast -j 8 -- --test-threads=4 -> 2836 passed, 0 failed, 51 ignored; SKIPPED: 24 lines (22 `no wave64`, 2 `no heap windows`), the same as on the base; failing: none. Base alone on this PC: 2834 passed, 0 failed, 51 ignored. The two new tests are not among the skipped ones: `gpu::recomp::tests::gpu_transcendental_f32` and `gpu_transcendental_f16` ran on this card and passed in the suite and in 4 separate runs with `--nocapture`. review: whole diff read (+130/-0, tests only, `gpu/recomp/tests.rs`). A second vendor for the numbers: on this NVIDIA card the worst f32 errors were rcp 0, rsq 8.4e-8, sqrt 7.4e-8, log 1.19e-7, exp 1.09e-7 relative, against the test's 4.77e-7 (4 ulp), and sin 6.8e-5, cos 9.6e-5 absolute against 9.77e-4. The f16 worst errors were 4.3e-4 to 8.2e-4 relative for rcp, rsq, sqrt, log and exp, and 4.9e-4 absolute for sin and cos, the same in every run. One note, not a blocker: the 4 ulp bound for log and exp is tighter than what D3D promises for those functions, so the f32 test can fail on a driver that is within the spec; here the margin is about four times. No test of these instructions existed on main, the names do not collide, and each test is one dispatch. performance: none, tests only. `scripts/smoke.ps1`, 60 s of a retail title, release, as an extra: 1664 frames and 16062 MB peak commit against 1678 and 1677 frames, 15737 and 16476 MB on the base. No device removal, no crash. verdict: safe to merge hardware / tool and model: RTX 5070 Ti 16 GB (617.42, wave32), Ryzen 7 9800X3D, 32 GB, Windows 11 26300, rustc 1.100.0 / Claude Code (Claude Fable 5.2 ran the build, suite and tests and wrote this; Claude Opus 5.5 read the diff first) - Tiago
Foniass commented 2026-12-01 03:52:06 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T03:52:06Z.


Triage (#1607) – head 232ee73

#1169 (opened later) also tests the f32 / f16 rcp, rsq, sqrt, log and exp ops on the GPU, but on exact powers of two, with VOP3 abs/neg/clamp/op_sel and no sin/cos. This PR checks accuracy and special values against f64, including sin/cos in revolutions. The two overlap without being the same test. #1672 / #1639 also touch some of these ops.
No problems found in the diff. The sin/cos absolute tolerance (2^-10 at up to ~256 turns) was measured on one NVIDIA GPU only.
Recommendation: keep open.

AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.

<!-- greyfinch-sync:ivall/xcl:comment:7300144318 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/643#issuecomment-7300144318). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T03:52:06Z. --- **Triage (#1607)** – head 232ee73 #1169 (opened later) also tests the f32 / f16 rcp, rsq, sqrt, log and exp ops on the GPU, but on exact powers of two, with VOP3 abs/neg/clamp/op_sel and no sin/cos. This PR checks accuracy and special values against f64, including sin/cos in revolutions. The two overlap without being the same test. #1672 / #1639 also touch some of these ops. No problems found in the diff. The sin/cos absolute tolerance (2^-10 at up to ~256 turns) was measured on one NVIDIA GPU only. Recommendation: keep open. AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/643:upstream-pr/643'
git switch 'upstream-pr/643'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/643'
git switch 'upstream-pr/643'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/643'
git switch 'upstream-pr/643'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/643'
git switch 'main'
git merge --squash 'upstream-pr/643'
git switch 'main'
git merge --ff-only 'upstream-pr/643'
git switch 'main'
git merge 'upstream-pr/643'
git push origin 'main'
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
xcl-dev/xcl!638
No description provided.