Tests: GPU tests of 64-bit atomics skip where those atomics write nothing #983

Open
github-bot wants to merge 1 commit from github-bot/gh-983 into main AGit
Owner

@⁠vakaobr on GitHub · 2026-11-24 09:52 UTC · original
vakaobr:tests/int64-atomics-skip → main · +58 −17 · 1 files · 1 commits · open

On Apple's D3DMetal 3.0 (macOS, CrossOver 26.3), a compute program that contains a 64-bit atomic writes nothing at all: not the atomic, not its other stores, not even stores issued before it. The only exception is non-returning unsigned InterlockedMin64 / InterlockedMax64 on device memory. The adapter still reports Int64ShaderOps, AtomicInt64OnTypedResourceSupported, AtomicInt64OnGroupSharedSupported and AtomicInt64OnDescriptorHeapResourceSupported as 1, so a one-thread kernel checks it instead: a returning InterlockedAdd64 must carry into the high dword and give back the old value. Part of #258.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs: no_int64_atomics(), the one-time probe (OnceLock). It skips with no 64-bit atomics only when the probe kernel ran and its results are wrong.
  • Same file: gpu_atomic_fcmpswap_x2 and gpu_atomic_fmin_fmax_x2 return through it.
  • Same file: the three GLOBAL_ATOMIC_{ADD,INC,DEC}_X2 instructions and their asserts move unchanged from gpu_more_atomics_sub_dword_scratch_valu into a new gpu_global_atomic_add_inc_dec_x2, gated the same way, so the rest of the old test runs on such a host.

Tested

  • Apple M5 Pro (20-core GPU), macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode", 32-lane waves only), Rosetta 2. Cross-built with mingw-w64 (GCC 16.2.0), Rust 1.100.0, debug, DXC 1.9.2609.
  • Each gpu::recomp::tests::gpu_*atomic* test in its own process (<lib test exe> --exact <test> --test-threads=1 --nocapture).
    • On main 6bac4b4: 4 passed, 3 failed (gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, gpu_more_atomics_sub_dword_scratch_valu: "global_atomic_inc wraps at 10", 0 where 9 is expected).
    • At this PR's head ab7ce43 (on main 9aec53d): 8 passed, 0 failed, of which 3 are SKIPPED …: no 64-bit atomics (gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, gpu_global_atomic_add_inc_dec_x2). gpu_more_atomics_sub_dword_scratch_valu now passes.
  • Local probes (not in the PR), one thread, through the same mem binding: a 32-bit Store, a 32-bit InterlockedAdd, 64-bit arithmetic with Store2 and Store<uint64_t> all land. Add64, And64, Or64, Xor64, Exchange64, CompareExchange64, CompareStore64, signed Min64 / Max64 and returning unsigned Min64 / Max64 each leave the whole program's writes out, and so does any 64-bit atomic on groupshared. The translated *_X2 atomics behave the same in their buffer, flat and global forms, except UMIN / UMAX with GLC=0. Interlocked*64 memory-window accessors that a program never calls do not affect it.
  • Independent run: a second M5 Pro (x86_64-pc-windows-gnullvm, release), base 9aec53d and this head: the same three failures on the base; at this head the two gated tests skip and gpu_more_atomics_sub_dword_scratch_valu passes (@⁠mikebuckets171, https://github.com/ivall/xcl/pull/983#issuecomment-7129605266).

Regression run

Test-only change: no runtime file changed, no xcl-smoke blocks.

Not tested

  • Windows and any adapter with working 64-bit atomics: not run. There the probe should pass and nothing should skip, but no run shows it.
  • cargo test --workspace as a whole.
  • XCL_REQUIRE_GPU=wave64 / mesh turns this skip into a failure, because runner::skip_test is unchanged.
  • #787 gates gpu_atomic_fcmpswap_x2 and gpu_atomic_fmin_fmax_x2 on no_doubles(), so the two PRs touch the same if lines. Those two tests use no doubles (see https://github.com/ivall/xcl/pull/787#issuecomment-7127510124).
  • A runtime workaround for titles: a 64-bit compare-swap, exchange or min / max cannot be built correctly from 32-bit atomics without a lock, so this PR only reports the gap.

AI use

  • Claude Code with Claude Opus 5.5 ran the probes and tests on this machine, wrote the change and this description.
**@⁠vakaobr** on GitHub · 2026-11-24 09:52 UTC · [original](https://github.com/xcl-dev/xcl/pull/983) `vakaobr:tests/int64-atomics-skip` → `main` · +58 −17 · 1 files · 1 commits · open On Apple's D3DMetal 3.0 (macOS, CrossOver 26.3), a compute program that contains a 64-bit atomic writes nothing at all: not the atomic, not its other stores, not even stores issued before it. The only exception is non-returning unsigned `InterlockedMin64` / `InterlockedMax64` on device memory. The adapter still reports `Int64ShaderOps`, `AtomicInt64OnTypedResourceSupported`, `AtomicInt64OnGroupSharedSupported` and `AtomicInt64OnDescriptorHeapResourceSupported` as 1, so a one-thread kernel checks it instead: a returning `InterlockedAdd64` must carry into the high dword and give back the old value. Part of #258. **What is in it** - `crates/xcl/src/gpu/recomp/tests.rs`: `no_int64_atomics()`, the one-time probe (`OnceLock`). It skips with `no 64-bit atomics` only when the probe kernel ran and its results are wrong. - Same file: `gpu_atomic_fcmpswap_x2` and `gpu_atomic_fmin_fmax_x2` return through it. - Same file: the three `GLOBAL_ATOMIC_{ADD,INC,DEC}_X2` instructions and their asserts move unchanged from `gpu_more_atomics_sub_dword_scratch_valu` into a new `gpu_global_atomic_add_inc_dec_x2`, gated the same way, so the rest of the old test runs on such a host. **Tested** - Apple M5 Pro (20-core GPU), macOS 27.2.1, CrossOver 26.3.0.39832 with D3DMetal 3.0 ("AMD Compatibility Mode", 32-lane waves only), Rosetta 2. Cross-built with mingw-w64 (GCC 16.2.0), Rust 1.100.0, debug, DXC 1.9.2609. - Each `gpu::recomp::tests::gpu_*atomic*` test in its own process (`<lib test exe> --exact <test> --test-threads=1 --nocapture`). - On `main` `6bac4b4`: 4 passed, 3 failed (`gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, `gpu_more_atomics_sub_dword_scratch_valu`: "global_atomic_inc wraps at 10", 0 where 9 is expected). - At this PR's head `ab7ce43` (on `main` `9aec53d`): 8 passed, 0 failed, of which 3 are `SKIPPED …: no 64-bit atomics` (`gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, `gpu_global_atomic_add_inc_dec_x2`). `gpu_more_atomics_sub_dword_scratch_valu` now passes. - Local probes (not in the PR), one thread, through the same `mem` binding: a 32-bit `Store`, a 32-bit `InterlockedAdd`, 64-bit arithmetic with `Store2` and `Store<uint64_t>` all land. Add64, And64, Or64, Xor64, Exchange64, CompareExchange64, CompareStore64, signed Min64 / Max64 and returning unsigned Min64 / Max64 each leave the whole program's writes out, and so does any 64-bit atomic on groupshared. The translated `*_X2` atomics behave the same in their buffer, flat and global forms, except UMIN / UMAX with GLC=0. `Interlocked*64` memory-window accessors that a program never calls do not affect it. - Independent run: a second M5 Pro (`x86_64-pc-windows-gnullvm`, release), base `9aec53d` and this head: the same three failures on the base; at this head the two gated tests skip and `gpu_more_atomics_sub_dword_scratch_valu` passes (@⁠mikebuckets171, https://github.com/ivall/xcl/pull/983#issuecomment-7129605266). **Regression run** Test-only change: no runtime file changed, no `xcl-smoke` blocks. **Not tested** - Windows and any adapter with working 64-bit atomics: not run. There the probe should pass and nothing should skip, but no run shows it. - `cargo test --workspace` as a whole. - `XCL_REQUIRE_GPU=wave64` / `mesh` turns this skip into a failure, because `runner::skip_test` is unchanged. - #787 gates `gpu_atomic_fcmpswap_x2` and `gpu_atomic_fmin_fmax_x2` on `no_doubles()`, so the two PRs touch the same `if` lines. Those two tests use no doubles (see https://github.com/ivall/xcl/pull/787#issuecomment-7127510124). - A runtime workaround for titles: a 64-bit compare-swap, exchange or min / max cannot be built correctly from 32-bit atomics without a lock, so this PR only reports the gap. **AI use** - Claude Code with Claude Opus 5.5 ran the probes and tests on this machine, wrote the change and this description.
On Apple's D3DMetal 3.0 (macOS, CrossOver) a compute program with a
64-bit atomic writes nothing at all: not the atomic, not its other
stores, not even stores issued before it. Only non-returning unsigned
InterlockedMin64 / InterlockedMax64 on device memory work. The adapter
still reports Int64ShaderOps and every AtomicInt64On*Supported cap, so
no_int64_atomics() runs one small kernel instead: a returning
InterlockedAdd64 must carry into the high dword and give back the old
value. It skips only when that kernel ran and its results are wrong.

gpu_atomic_fcmpswap_x2 and gpu_atomic_fmin_fmax_x2 return through it.
The three GLOBAL_ATOMIC_{ADD,INC,DEC}_X2 instructions and their asserts
move unchanged from gpu_more_atomics_sub_dword_scratch_valu into
gpu_global_atomic_add_inc_dec_x2, gated the same way, so the rest of
the old test runs on such a host. (#258)

Assisted-by: Claude Code (Claude Opus 5.5)
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:39:11 +00:00
Author
Owner

@⁠mikebuckets171 on GitHub · 2026-11-24 11:03 UTC · original

Verified on a second Apple silicon host, on the gnullvm target: all three of the failures you name reproduce on the base, and at this head the two dedicated tests skip and the mixed one runs.

Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (adapter reports "AMD Compatibility Mode"), Rosetta 2, Rust 1.100.0, x86_64-pc-windows-gnullvm with LLVM-MinGW 20261117 (clang 23.1.6), --release --locked, test binaries run under Wine, one test per process (--exact <full test path> --nocapture --test-threads=1). Base is 9aec53d, head ab7ce43; the lib test binary reports 704 tests on the base and 705 at the head.

test 9aec53d ab7ce43
gpu::recomp::tests::gpu_atomic_fcmpswap_x2 FAILED, tests.rs:4737: assertion left == right failed: lane 0: buffer cell, left: 4609434218613702656 SKIPPED …gpu_atomic_fcmpswap_x2: no 64-bit atomics -> ok. 1 passed; 0 failed
gpu::recomp::tests::gpu_atomic_fmin_fmax_x2 FAILED, tests.rs:4868: assertion left == right failed: buffer: max of the lanes, left: -inf SKIPPED …gpu_atomic_fmin_fmax_x2: no 64-bit atomics -> ok. 1 passed; 0 failed
gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valu FAILED, tests.rs:4632: assertion left == right failed: global_atomic_inc wraps at 10, left: 0 ok. 1 passed; 0 failed in 0.62 s

The third row is the part worth having in the record: on this host the mixed test's own failure was the 64-bit atomic (global_atomic_inc came back 0), and after your change the test runs and passes - so taking the three 64-bit atomics out of it really does keep the rest of it working on a Mac host rather than trading one failure for a skip.

The left: 4609434218613702656 on the first row is what the cell holds when the atomic never writes: it is the value the test put there first, unchanged, which fits your "any 64-bit atomic writes nothing at all, other stores included" measurement. left: -inf on the second is the reduction over lanes that never got updated.

Not tested here: Windows (no Windows machine on this bench), and this PR's CI has not run on GitHub - every head of mine on this repo shows only the PR checks description job, which is main's own pull_request_target workflow, so the CI job still needs a maintainer's approval to start for a fork contribution.

Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. AI use: GPT-6 Luna built both trees, ran the tests and drafted this comment; the codes, line numbers and assertion values are from those runs.

**@⁠mikebuckets171** on GitHub · 2026-11-24 11:03 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7129605266) **Verified on a second Apple silicon host, on the `gnullvm` target: all three of the failures you name reproduce on the base, and at this head the two dedicated tests skip and the mixed one runs.** Host: MacBook Pro M5 Pro (48 GB), macOS 27.2.1, CrossOver 26 with D3DMetal (adapter reports "AMD Compatibility Mode"), Rosetta 2, Rust 1.100.0, `x86_64-pc-windows-gnullvm` with LLVM-MinGW 20261117 (clang 23.1.6), `--release --locked`, test binaries run under Wine, one test per process (`--exact <full test path> --nocapture --test-threads=1`). Base is `9aec53d`, head `ab7ce43`; the lib test binary reports 704 tests on the base and 705 at the head. | test | `9aec53d` | `ab7ce43` | |---|---|---| | `gpu::recomp::tests::gpu_atomic_fcmpswap_x2` | FAILED, `tests.rs:4737`: `assertion left == right failed: lane 0: buffer cell`, `left: 4609434218613702656` | `SKIPPED …gpu_atomic_fcmpswap_x2: no 64-bit atomics` -> `ok. 1 passed; 0 failed` | | `gpu::recomp::tests::gpu_atomic_fmin_fmax_x2` | FAILED, `tests.rs:4868`: `assertion left == right failed: buffer: max of the lanes`, `left: -inf` | `SKIPPED …gpu_atomic_fmin_fmax_x2: no 64-bit atomics` -> `ok. 1 passed; 0 failed` | | `gpu::recomp::tests::gpu_more_atomics_sub_dword_scratch_valu` | FAILED, `tests.rs:4632`: `assertion left == right failed: global_atomic_inc wraps at 10`, `left: 0` | **`ok. 1 passed; 0 failed`** in 0.62 s | The third row is the part worth having in the record: on this host the mixed test's own failure was the 64-bit atomic (`global_atomic_inc` came back 0), and after your change the test runs and passes - so taking the three 64-bit atomics out of it really does keep the rest of it working on a Mac host rather than trading one failure for a skip. The `left: 4609434218613702656` on the first row is what the cell holds when the atomic never writes: it is the value the test put there first, unchanged, which fits your "any 64-bit atomic writes nothing at all, other stores included" measurement. `left: -inf` on the second is the reduction over lanes that never got updated. Not tested here: Windows (no Windows machine on this bench), and this PR's CI has not run on GitHub - every head of mine on this repo shows only the `PR checks` description job, which is main's own `pull_request_target` workflow, so the `CI` job still needs a maintainer's approval to start for a fork contribution. Host: macOS 27.2.1 (Apple silicon, M5 Pro), CrossOver 26, D3DMetal; local inference unloaded and the bottle's wineserver stopped for each run. **AI use**: GPT-6 Luna built both trees, ran the tests and drafted this comment; the codes, line numbers and assertion values are from those runs.
Author
Owner

@⁠shortside on GitHub · 2026-11-24 11:56 UTC · original

Test report from a second Mac, head ab7ce43 against its merge base 9aec53d.

Tested

  • MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for x86_64-pc-windows-msvc with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (--exact --nocapture, 60 s cap).
  • Every lib test with atomic in its name (12 on base, 13 on head): base 9 passed, 3 failed (gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, gpu_more_atomics_sub_dword_scratch_valu); head 10 passed, 3 passed with SKIPPED … no 64-bit atomics (gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, and the new gpu_global_atomic_add_inc_dec_x2), 0 failed.
  • gpu_more_atomics_sub_dword_scratch_valu goes from failed to passed (it runs, it does not skip).

Not tested

  • Windows (where none of these should skip), the rest of the suite.

AI use

  • Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.
**@⁠shortside** on GitHub · 2026-11-24 11:56 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7130756438) Test report from a second Mac, head `ab7ce43` against its merge base `9aec53d`. **Tested** - MacBook Pro M5 Pro, macOS 27.2.1, Rosetta 2; CrossOver 26.3 (Wine 11.0), Windows 10 bottle, D3DMetal; DXC 1.9.2609. Cross-built for `x86_64-pc-windows-msvc` with clang-cl / lld-link 23.1.6 and an xwin SDK 10.0.26100, Rust 1.100.0, debug. The lib test binary run under Wine, one test per process (`--exact --nocapture`, 60 s cap). - Every lib test with `atomic` in its name (12 on base, 13 on head): base 9 passed, 3 failed (`gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, `gpu_more_atomics_sub_dword_scratch_valu`); head 10 passed, 3 passed with `SKIPPED … no 64-bit atomics` (`gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, and the new `gpu_global_atomic_add_inc_dec_x2`), 0 failed. - `gpu_more_atomics_sub_dword_scratch_valu` goes from failed to passed (it runs, it does not skip). **Not tested** - Windows (where none of these should skip), the rest of the suite. **AI use** - Claude Code with Claude Fable 5.2 built both commits, ran the tests and wrote this report.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 12:34 UTC · original

Independent verification, merged onto current main 384f7f7 locally (clean merge).

Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug.

  • cargo test -p xcl --lib atomic: 13 passed, 0 failed — the 64-bit atomic GPU tests still run and pass on this adapter (which does support them, so the new skip_test("no 64-bit atomics") guard is correctly not taken). The skip is gated on an actual probe, not assumed.

AI use: test runs by Devin (Cognition, SWE-2); no code changes.

**@⁠DavidM1911** on GitHub · 2026-11-24 12:34 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7131620890) Independent verification, merged onto current `main` `384f7f7` locally (clean merge). **Machine:** Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug. - `cargo test -p xcl --lib atomic`: **13 passed, 0 failed** — the 64-bit atomic GPU tests still run and pass on this adapter (which does support them, so the new `skip_test("no 64-bit atomics")` guard is correctly not taken). The skip is gated on an actual probe, not assumed. AI use: test runs by Devin (Cognition, SWE-2); no code changes.
Author
Owner

@⁠jesuarchive on GitHub · 2026-11-24 12:36 UTC · original

Native Windows + NVIDIA check that the new skip does not fire where 64-bit atomics work. Head ab7ce43, merged locally onto main 47efa2e (clean merge, nothing pushed).

Tested

  • NVIDIA GeForce RTX 3060 12 GB (Ampere, 32-lane waves only), driver 32.0.16.1088; AMD Ryzen 7 5800XT; Windows 11 Pro build 26300; rustc 1.95.0 stable-x86_64-pc-windows-msvc; DXC 1.9.2602.17 from the Windows SDK; debug.
  • cargo test -p xcl --lib atomic -- --test-threads=1 --nocapture: 13 passed, 0 failed, 0 ignored. The InterlockedAdd64 probe did not report a failure and no test printed skipping or SKIPPED: gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, gpu_atomic_fmin_fmax_negative_zero, gpu_more_atomics_sub_dword_scratch_valu, gpu_global_atomics_and_sub_dword_access and the new gpu_global_atomic_add_inc_dec_x2 all ran on the GPU and passed. Same filter on main 47efa2e: 12 passed (without the new test).
  • cargo test --workspace -- --test-threads=4: 742 passed, 0 failed, 41 ignored (main: 741 / 0 / 41).
  • SKIPPED on this adapter, the same two on main: gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware (no wave64).

Not tested

  • A host where the skip should fire (no CrossOver / D3DMetal here); AMD and Intel GPUs; the head on its own base 9aec53d; release build.

AI use

  • Claude Code with Claude Opus 5.5: merged the branch, ran the commands above on this machine and wrote this report.
**@⁠jesuarchive** on GitHub · 2026-11-24 12:36 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7131681656) Native Windows + NVIDIA check that the new skip does not fire where 64-bit atomics work. Head `ab7ce43`, merged locally onto `main` `47efa2e` (clean merge, nothing pushed). **Tested** - NVIDIA GeForce RTX 3060 12 GB (Ampere, 32-lane waves only), driver 32.0.16.1088; AMD Ryzen 7 5800XT; Windows 11 Pro build 26300; rustc 1.95.0 `stable-x86_64-pc-windows-msvc`; DXC 1.9.2602.17 from the Windows SDK; debug. - `cargo test -p xcl --lib atomic -- --test-threads=1 --nocapture`: 13 passed, 0 failed, 0 ignored. The `InterlockedAdd64` probe did not report a failure and no test printed `skipping` or `SKIPPED`: `gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, `gpu_atomic_fmin_fmax_negative_zero`, `gpu_more_atomics_sub_dword_scratch_valu`, `gpu_global_atomics_and_sub_dword_access` and the new `gpu_global_atomic_add_inc_dec_x2` all ran on the GPU and passed. Same filter on `main` `47efa2e`: 12 passed (without the new test). - `cargo test --workspace -- --test-threads=4`: 742 passed, 0 failed, 41 ignored (`main`: 741 / 0 / 41). - SKIPPED on this adapter, the same two on `main`: `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` (no wave64). **Not tested** - A host where the skip should fire (no CrossOver / D3DMetal here); AMD and Intel GPUs; the head on its own base `9aec53d`; release build. **AI use** - Claude Code with Claude Opus 5.5: merged the branch, ran the commands above on this machine and wrote this report.
Author
Owner

@⁠bjarngard on GitHub · 2026-11-24 13:05 UTC · original

Test report for head ab7ce43 (AMD, native wave64, and RTX 5080)

Tested

  • AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug
  • XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4: 725 passed, 0 failed, 41 ignored, no SKIPPED
  • With XCL_REQUIRE_GPU=wave64: gpu_global_atomic_add_inc_dec_x2, gpu_more_atomics_sub_dword_scratch_valu passed
  • RTX 5080 (Blackwell, wave32), driver 621.24: full suite 725 passed, 0 failed, 41 ignored; SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware
  • gpu_global_atomic_add_inc_dec_x2 and gpu_more_atomics_sub_dword_scratch_valu ran and passed on both adapters; the new no 64-bit atomics skip did not fire on either

Not tested: Intel.

AI use: the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.

**@⁠bjarngard** on GitHub · 2026-11-24 13:05 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7132330731) Test report for head `ab7ce43` (AMD, native wave64, and RTX 5080) **Tested** - AMD Radeon(TM) Graphics (Ryzen 9 9950X iGPU, RDNA2, native wave64), driver 32.0.21043.5001; Windows 11 build 26300; Rust 1.99.1 MSVC; DXC 1.9.2602.17; debug - `XCL_ADAPTER=radeon cargo test --workspace --no-fail-fast -- --test-threads=4`: 725 passed, 0 failed, 41 ignored, no SKIPPED - With `XCL_REQUIRE_GPU=wave64`: `gpu_global_atomic_add_inc_dec_x2`, `gpu_more_atomics_sub_dword_scratch_valu` passed - RTX 5080 (Blackwell, wave32), driver 621.24: full suite 725 passed, 0 failed, 41 ignored; SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware` - `gpu_global_atomic_add_inc_dec_x2` and `gpu_more_atomics_sub_dword_scratch_valu` ran and passed on both adapters; the new `no 64-bit atomics` skip did not fire on either **Not tested:** Intel. **AI use:** the tests were run and this report was written by an AI agent, Claude Code (Claude Opus 5.5), on the hardware above. The numbers are copied from the actual test output.
Author
Owner

@⁠JoaoPauluu on GitHub · 2026-11-24 13:32 UTC · original

A run on Linux with vkd3d-proton, NVIDIA: the probe fires here too, but for a different fault than D3DMetal's. And it skips two tests that pass on main on this stack.

Tested

  • RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for x86_64-pc-windows-gnu. ab7ce43 as it is (merge base 9aec53d) and main 47efa2e, no uncommitted changes. The lib test binary runs under Wine, one test per process (--exact, 90 s cap).
  • ab7ce43, every lib test with atomic in its name: 13 passed, 0 failed. 3 of them SKIPPED no 64-bit atomics: gpu_atomic_fcmpswap_x2, gpu_atomic_fmin_fmax_x2, gpu_global_atomic_add_inc_dec_x2.
  • The probe printed InterlockedAdd64 probe: [0, 3, 0, 0]. So the add itself lands, carry included ([0, 3]), but the old value InterlockedAdd64 returns comes back as 0 ([0, 0] where [0xffffffff, 1] is expected). D3DMetal writes nothing at all.
  • The same tests on main 47efa2e:
test main this PR
gpu_atomic_fcmpswap_x2 ok SKIPPED
gpu_atomic_fmin_fmax_x2 ok SKIPPED
gpu_atomic_fmin_fmax_negative_zero ok ok
gpu_more_atomics_sub_dword_scratch_valu fails: kernel dispatch: GPU fence still pending after 10000 ms ok
gpu_global_atomic_add_inc_dec_x2 not on main SKIPPED
  • So on this stack the probe finds a real fault: a 64-bit atomic's returned value is lost. That would also explain the GPU hang main has had here in gpu_more_atomics_sub_dword_scratch_valu (the inc / dec x2 CAS loop never sees the old value), but I have not checked which instruction hangs.
  • But fcmpswap_x2 and fmin_fmax_x2 work on main here and are skipped with this PR, so on vkd3d-proton the skip also covers 64-bit atomics that work.

Not tested

  • whether the lost return value is in vkd3d-proton (dxil-spirv) or the NVIDIA driver; the other lib tests; native Windows.

AI use

  • Claude Code (Claude Opus 5.5) built the commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
**@⁠JoaoPauluu** on GitHub · 2026-11-24 13:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7132988697) A run on Linux with vkd3d-proton, NVIDIA: the probe fires here too, but for a different fault than D3DMetal's. And it skips two tests that pass on `main` on this stack. **Tested** - RTX 3060 12 GB (NVIDIA 620.70.06, 32-lane waves), i5-10400F, 16 GB, CachyOS (kernel 7.3.3), Proton Experimental 11.0-20261112 with the patched vkd3d-proton 3.1 from #257, DXC 1.9.2609.5. Release, cross-built for `x86_64-pc-windows-gnu`. `ab7ce43` as it is (merge base `9aec53d`) and `main` `47efa2e`, no uncommitted changes. The lib test binary runs under Wine, one test per process (`--exact`, 90 s cap). - `ab7ce43`, every lib test with `atomic` in its name: 13 passed, 0 failed. 3 of them SKIPPED `no 64-bit atomics`: `gpu_atomic_fcmpswap_x2`, `gpu_atomic_fmin_fmax_x2`, `gpu_global_atomic_add_inc_dec_x2`. - The probe printed `InterlockedAdd64 probe: [0, 3, 0, 0]`. So the add itself lands, carry included (`[0, 3]`), but the old value `InterlockedAdd64` returns comes back as 0 (`[0, 0]` where `[0xffffffff, 1]` is expected). D3DMetal writes nothing at all. - The same tests on `main` `47efa2e`: | test | `main` | this PR | |---|---|---| | `gpu_atomic_fcmpswap_x2` | ok | SKIPPED | | `gpu_atomic_fmin_fmax_x2` | ok | SKIPPED | | `gpu_atomic_fmin_fmax_negative_zero` | ok | ok | | `gpu_more_atomics_sub_dword_scratch_valu` | **fails**: `kernel dispatch: GPU fence still pending after 10000 ms` | ok | | `gpu_global_atomic_add_inc_dec_x2` | not on `main` | SKIPPED | - So on this stack the probe finds a real fault: a 64-bit atomic's returned value is lost. That would also explain the GPU hang `main` has had here in `gpu_more_atomics_sub_dword_scratch_valu` (the inc / dec x2 CAS loop never sees the old value), but I have not checked which instruction hangs. - But `fcmpswap_x2` and `fmin_fmax_x2` work on `main` here and are skipped with this PR, so on vkd3d-proton the skip also covers 64-bit atomics that work. **Not tested** - whether the lost return value is in vkd3d-proton (dxil-spirv) or the NVIDIA driver; the other lib tests; native Windows. **AI use** - Claude Code (Claude Opus 5.5) built the commits, ran the tests and runs and wrote this report. The account owner asked for test reports to be posted and has not reviewed this one.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-26 03:32 UTC · original

Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current main on the new head — needs another rebase before it can be tested.

**@⁠DavidM1911** on GitHub · 2026-11-26 03:32 UTC · [original](https://github.com/xcl-dev/xcl/pull/983#issuecomment-7181804422) Re-verification on RTX 3060 Ti (Windows 11): still a **merge conflict with current `main`** on the new head — needs another rebase before it can be tested.
This pull request has changes conflicting with the target branch.
  • crates/xcl/src/gpu/recomp/tests.rs
View command line instructions

Manual merge helper

Use this merge commit message when completing the merge manually.

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/983/head:github-bot/gh-983'
git switch 'github-bot/gh-983'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-983'
git switch 'github-bot/gh-983'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-983'
git switch 'github-bot/gh-983'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-983'
git switch 'main'
git merge --squash 'github-bot/gh-983'
git switch 'main'
git merge --ff-only 'github-bot/gh-983'
git switch 'main'
git merge 'github-bot/gh-983'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.