Recompiler: group-shared and texel sub as a compare-exchange loop #2742

Closed
jhincromwel-star wants to merge 1 commit from upstream-pr/2752 into main
jhincromwel-star commented 2026-11-26 10:09:47 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by jhincromwel-star on 2026-11-26T10:09:47Z.


What is in it

Tested

  • hardware (GPU + driver, CPU), Rust version, debug / release:
  • cargo test --workspace -- --test-threads=4: N passed, N failed, N ignored (SKIPPED GPU tests: …)

Regression run

main:

PR:

Not tested

AI use

  • none / tool and model, and what it did
<!-- greyfinch-sync:ivall/xcl:issue:5508023087 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752). Originally posted by [jhincromwel-star](https://github.com/jhincromwel-star) on 2026-11-26T10:09:47Z. --- <!-- What changes and why, in a few sentences. "Fixes #N" / "Part of #N". Stacked: "Stacked on #N". --> **What is in it** - **Tested** - hardware (GPU + driver, CPU), Rust version, debug / release: - `cargo test --workspace -- --test-threads=4`: N passed, N failed, N ignored (SKIPPED GPU tests: …) **Regression run** <!-- Required when the PR changes crates/xcl/src outside tests: `scripts/smoke.ps1` on a real title, built from main and from this PR's head commit (no uncommitted changes); paste both blocks. Rerun the PR's after every push. Not needed for docs / tests / scripts only. --> main: PR: **Not tested** - **AI use** - none / tool and model, and what it did
luckyteagirl commented 2026-11-26 10:16:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T10:16:26Z.

Review: COMMENTED


At efb14e7, the LDS part of this PR replaces variable ds_sub with a compare-exchange loop in both emit.rs and lower_mem.rs. #1919 is already open for the same Blackwell LDS subtract failure and changes those same files and the fuzz/test fixtures. Its author first tried a compare-exchange loop, then replaced it after measuring 318.9 ms for that loop versus 9.7 ms for the current #1919 approach in a 32-lane, one-slot contention case. Those are #1919's published measurements, not a benchmark of this PR.

Could you compare or coordinate the LDS approach with #1919 before both fixes proceed, and identify which texel-sub behavior here is distinct? A focused contention comparison of this head against #1919 would make the tradeoff reviewable. This is an exact-head source and overlap review assisted by Codex (GPT-6.2 Astra and GPT-6.2 Sol); I have not measured this head's performance or Blackwell behavior.

<!-- greyfinch-sync:ivall/xcl:review:6072244096 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#pullrequestreview-6072244096). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T10:16:26Z. **Review:** COMMENTED --- At `efb14e7`, the LDS part of this PR replaces variable `ds_sub` with a compare-exchange loop in both `emit.rs` and `lower_mem.rs`. [#1919](https://github.com/xcl-dev/xcl/pull/1919) is already open for the same Blackwell LDS subtract failure and changes those same files and the fuzz/test fixtures. Its author first tried a compare-exchange loop, then replaced it after measuring 318.9 ms for that loop versus 9.7 ms for the current #1919 approach in a 32-lane, one-slot contention case. Those are #1919's published measurements, **not** a benchmark of this PR. Could you compare or coordinate the LDS approach with #1919 before both fixes proceed, and identify which texel-sub behavior here is distinct? A focused contention comparison of this head against #1919 would make the tradeoff reviewable. This is an exact-head source and overlap review assisted by Codex (GPT-6.2 Astra and GPT-6.2 Sol); I have not measured this head's performance or Blackwell behavior.
luckyteagirl commented 2026-11-26 11:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by luckyteagirl on 2026-11-26T10:26:33Z.


On the RX 6800M, the new gpu_ds_sub_rtn_u32_with_a_variable_operand test fails on the HLSL/DXC path at exact clean head efb14e746d6a4367ed56bb5468daa39f87fce4b2. The Direct DXIL path passes.

Tested

Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (PCI 1002:73df, driver 30.0.13002.13003), Rust 1.99.0 MSVC, and Windows SDK DXC/DXIL 1.8.2502.11. I set XCL_ADAPTER=AMD Radeon RX 6800M and XCL_REQUIRE_GPU=1. The test does not print the adapter name. I independently enumerated it in DXGI, and the test runner requires the explicit name match.

cargo test --locked -p xcl --lib -j 1 gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand -- --exact --test-threads=1 --nocapture
Revision and backend Passed Failed Ignored Filtered Skip markers Exit
Exact head, XCL_DIRECT_DXIL=0 0 1 0 1336 0 101
Exact head, XCL_DIRECT_DXIL=1 1 0 0 1336 0 0
Main b49be18 with this test added, HLSL/DXC 1 0 0 1336 0 0
Head with test-only HLSL capture, default DXC flags 0 1 0 1336 0 101
Head with the same capture and explicit DXC -O0 1 0 0 1336 0 0

The failing HLSL runs read 0xffffffff at lane 0, expected 0xfffff7e0 (0 - (1 + … + 64)). The main control added the PR test plus an HLSL dump and kept main's translator unchanged. The two captured HLSL files differ only in the subtract statement: main uses InterlockedAdd with a negated value, while head uses a bounded compare-exchange loop. Both emit GroupMemoryBarrierWithGroupSync() before and after the subtraction. The optimization control changed only the test's compilation argument. These results isolate an optimization-sensitive failure with the new HLSL lowering on this stack. They do not identify the compiler or driver stage responsible.

Not tested

Blackwell, other driver and DXC versions, #1919's alternate implementation, full workspace suite, retail title, and performance. The local control files were restored after testing.

AI use

OpenAI Codex (GPT-6.2 Sol) ran the tests and local controls, compared emitted HLSL, and drafted this report. OpenAI Codex (GPT-6.2 Astra) checked the logs and shader diff before posting.

<!-- greyfinch-sync:ivall/xcl:comment:7189371127 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7189371127). Originally posted by [luckyteagirl](https://github.com/luckyteagirl) on 2026-11-26T10:26:33Z. --- On the RX 6800M, the new `gpu_ds_sub_rtn_u32_with_a_variable_operand` test fails on the HLSL/DXC path at exact clean head `efb14e746d6a4367ed56bb5468daa39f87fce4b2`. The Direct DXIL path passes. **Tested** Windows 11 Home build 26200, Ryzen 9 5980HX, AMD Radeon RX 6800M (PCI `1002:73df`, driver `30.0.13002.13003`), Rust 1.99.0 MSVC, and Windows SDK DXC/DXIL 1.8.2502.11. I set `XCL_ADAPTER=AMD Radeon RX 6800M` and `XCL_REQUIRE_GPU=1`. The test does not print the adapter name. I independently enumerated it in DXGI, and the test runner requires the explicit name match. ```powershell cargo test --locked -p xcl --lib -j 1 gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand -- --exact --test-threads=1 --nocapture ``` | Revision and backend | Passed | Failed | Ignored | Filtered | Skip markers | Exit | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | Exact head, `XCL_DIRECT_DXIL=0` | 0 | 1 | 0 | 1336 | 0 | 101 | | Exact head, `XCL_DIRECT_DXIL=1` | 1 | 0 | 0 | 1336 | 0 | 0 | | Main `b49be18` with this test added, HLSL/DXC | 1 | 0 | 0 | 1336 | 0 | 0 | | Head with test-only HLSL capture, default DXC flags | 0 | 1 | 0 | 1336 | 0 | 101 | | Head with the same capture and explicit DXC `-O0` | 1 | 0 | 0 | 1336 | 0 | 0 | The failing HLSL runs read `0xffffffff` at lane 0, expected `0xfffff7e0` (`0 - (1 + … + 64)`). The main control added the PR test plus an HLSL dump and kept main's translator unchanged. The two captured HLSL files differ only in the subtract statement: main uses `InterlockedAdd` with a negated value, while head uses a bounded compare-exchange loop. Both emit `GroupMemoryBarrierWithGroupSync()` before and after the subtraction. The optimization control changed only the test's compilation argument. These results isolate an optimization-sensitive failure with the new HLSL lowering on this stack. They do not identify the compiler or driver stage responsible. **Not tested** Blackwell, other driver and DXC versions, #1919's alternate implementation, full workspace suite, retail title, and performance. The local control files were restored after testing. **AI use** OpenAI Codex (GPT-6.2 Sol) ran the tests and local controls, compared emitted HLSL, and drafted this report. OpenAI Codex (GPT-6.2 Astra) checked the logs and shader diff before posting.
sage-sage commented 2026-11-26 11:05:08 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by sage-sage on 2026-11-26T10:30:40Z.


Test report: passes on NVIDIA Ada; this card does not show the bug. Exact head efb14e74 (its base is current main b49be18, so head = merged).

Tested

  • RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build
  • cargo test --workspace -- --test-threads=4: 1436 passed, 0 failed, 47 ignored; gpu_ds_sub_rtn_u32_with_a_variable_operand passes
  • SKIPPED: 29 lines, the same as on main on this machine (wave64, debug layer, Developer Mode, heap windows)
  • With lower_mem.rs and emit.rs taken back to main (local only), the new test still passes here: Ada's driver accepts the group-shared atomicrmw add of a negated value, so on this card the test checks the compare-exchange loop's result but does not reproduce the refusal.

Not tested

  • Blackwell (the driver the PR is about), AMD, Intel; no game.

Claude Code (Claude Opus 5.5) ran the tests and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7189461999 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7189461999). Originally posted by [sage-sage](https://github.com/sage-sage) on 2026-11-26T10:30:40Z. --- **Test report: passes on NVIDIA Ada; this card does not show the bug.** Exact head `efb14e74` (its base is current `main` `b49be18`, so head = merged). **Tested** - RTX 4080 SUPER (driver 621.40), Ryzen 5 7600X, Windows 11 26H2 build 26300.10075, rustc 1.100.0 MSVC, DXC 1.9.2602.17 (Windows SDK 10.0.26100), debug build - `cargo test --workspace -- --test-threads=4`: 1436 passed, 0 failed, 47 ignored; `gpu_ds_sub_rtn_u32_with_a_variable_operand` passes - SKIPPED: 29 lines, the same as on `main` on this machine (wave64, debug layer, Developer Mode, heap windows) - With `lower_mem.rs` and `emit.rs` taken back to `main` (local only), the new test still passes here: Ada's driver accepts the group-shared `atomicrmw add` of a negated value, so on this card the test checks the compare-exchange loop's result but does not reproduce the refusal. **Not tested** - Blackwell (the driver the PR is about), AMD, Intel; no game. Claude Code (Claude Opus 5.5) ran the tests and wrote this report.
SzczepanGrela commented 2026-11-26 13:05:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by SzczepanGrela on 2026-11-26T12:15:25Z.


Additional RX 9070 / Wine result: I did not reproduce the HLSL failure reported above on this stack.

Tested

  • Exact head efb14e746d6a4367ed56bb5468daa39f87fce4b2, against main b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 with only the PR's new 35-line synthetic test appended. Main's translator was unchanged. No local source changes on the head.
  • AMD Radeon RX 9070 16 GB (RADV GFX1201), Ryzen 7 7700, CachyOS kernel 7.3.0-5-cachyos, Mesa 26.3.1-arch3.5, GE-Proton11-12 Wine 11.0 Staging, vkd3d-proton 8293130ebe370b1+ (local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, release x86_64-pc-windows-gnu binaries.
  • Explicit adapter selection XCL_ADAPTER="AMD Radeon RX 9070", XCL_REQUIRE_GPU=wave64, XCL_NETWORK=0, and XCL_DIRECT_DXIL=0 or 1. Fresh process and XCL DXIL cache directory for every run; vkd3d shader cache disabled.
  • gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand: 3/3 fresh-process passes per backend on the head and 3/3 per backend on the main control. Each run reported 1 passed, 0 failed, 0 ignored, 0 skip markers. The test checks the final LDS value in all 64 lanes and 64 distinct returned old values.
  • Filter gpu::recomp::tests::gpu_ds_: 5 passed, 0 failed, 0 ignored, 0 skip markers per revision/backend.
  • gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run: 1 passed, 0 failed, 0 ignored, 0 skip markers per revision.

The Windows libtest binaries were invoked directly through the GE-Proton Wine executable, with --nocapture --test-threads=1 and --exact for individual tests. Raw summaries, source inventories, and executable hashes were checked after the runs. This establishes a passing result on this particular stack; it does not explain the RX 6800M result.

Not tested

Native Windows, other GPUs, alternate DXC or driver versions, the full fuzz/workspace suites, retail workloads, smoke runs, or performance.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, ran and checked the synthetic comparisons, and drafted this report. Publication authorized by the account owner.

<!-- greyfinch-sync:ivall/xcl:comment:7191768526 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7191768526). Originally posted by [SzczepanGrela](https://github.com/SzczepanGrela) on 2026-11-26T12:15:25Z. --- Additional RX 9070 / Wine result: I did not reproduce the HLSL failure reported above on this stack. **Tested** - Exact head `efb14e746d6a4367ed56bb5468daa39f87fce4b2`, against main `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7` with only the PR's new 35-line synthetic test appended. Main's translator was unchanged. No local source changes on the head. - AMD Radeon RX 9070 16 GB (RADV GFX1201), Ryzen 7 7700, CachyOS kernel 7.3.0-5-cachyos, Mesa 26.3.1-arch3.5, GE-Proton11-12 Wine 11.0 Staging, vkd3d-proton `8293130ebe370b1+` (local asserts-disabled build), DXC/DXIL 1.9.2602.17, Rust 1.97.1, release `x86_64-pc-windows-gnu` binaries. - Explicit adapter selection `XCL_ADAPTER="AMD Radeon RX 9070"`, `XCL_REQUIRE_GPU=wave64`, `XCL_NETWORK=0`, and `XCL_DIRECT_DXIL=0` or `1`. Fresh process and XCL DXIL cache directory for every run; vkd3d shader cache disabled. - `gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand`: 3/3 fresh-process passes per backend on the head and 3/3 per backend on the main control. Each run reported 1 passed, 0 failed, 0 ignored, 0 skip markers. The test checks the final LDS value in all 64 lanes and 64 distinct returned old values. - Filter `gpu::recomp::tests::gpu_ds_`: 5 passed, 0 failed, 0 ignored, 0 skip markers per revision/backend. - `gpu::dxil::ops_tests::groupshared_barrier_and_atomics_run`: 1 passed, 0 failed, 0 ignored, 0 skip markers per revision. The Windows libtest binaries were invoked directly through the GE-Proton Wine executable, with `--nocapture --test-threads=1` and `--exact` for individual tests. Raw summaries, source inventories, and executable hashes were checked after the runs. This establishes a passing result on this particular stack; it does not explain the RX 6800M result. **Not tested** Native Windows, other GPUs, alternate DXC or driver versions, the full fuzz/workspace suites, retail workloads, smoke runs, or performance. **AI use** OpenAI Codex (GPT-6; exact serving variant not exposed) reviewed the diff, ran and checked the synthetic comparisons, and drafted this report. Publication authorized by the account owner.
Anon64 commented 2026-11-26 13:05:35 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-26T12:15:59Z.


Regression run of efb14e7 on a newer retail title: no device removal, no crash, frames and commit within the limits.

Setup: RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main b49be18 (this PR's base) and of this PR's exact head, scripts/smoke.ps1 -Game <title> for 60 s with XCL_NETWORK=0 and A pressed every 4 s from 20 s. Main was run right after this PR's head, since peak commit on this title drifted up over the day on this machine (main peaked at 19.2 GB this morning).

main:

xcl-smoke v1
commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1476 (PresentX 1476)
presents per 2 s (last 3): 29 6 0
device removals: 0
crashes: 0
peak commit: 23242 MB

this PR:

xcl-smoke v1
commit: efb14e746d6a4367ed56bb5468daa39f87fce4b2
gpu: NVIDIA GeForce RTX 3060
title: 21222967
seconds: 60
exit: 0x0
frames shown: 1499 (PresentX 1500)
presents per 2 s (last 3): 42 9 1
device removals: 0
crashes: 0
peak commit: 24923 MB

102 % of main's frames, 107 % of its peak commit. One run each.

Not tested: the suite on this head; whether the title runs the group-shared/texel sub atomics this PR changes in its first 60 s; AMD.

AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.

<!-- greyfinch-sync:ivall/xcl:comment:7191780466 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7191780466). Originally posted by [Anon64](https://github.com/Anon64) on 2026-11-26T12:15:59Z. --- **Regression run of `efb14e7` on a newer retail title: no device removal, no crash, frames and commit within the limits.** **Setup:** RTX 3060 12 GB (NVIDIA 581.80), i9-14900KF, Windows 11 26200, release builds of main `b49be18` (this PR's base) and of this PR's exact head, `scripts/smoke.ps1 -Game <title>` for 60 s with `XCL_NETWORK=0` and A pressed every 4 s from 20 s. Main was run right after this PR's head, since peak commit on this title drifted up over the day on this machine (main peaked at 19.2 GB this morning). main: ``` xcl-smoke v1 commit: b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1476 (PresentX 1476) presents per 2 s (last 3): 29 6 0 device removals: 0 crashes: 0 peak commit: 23242 MB ``` this PR: ``` xcl-smoke v1 commit: efb14e746d6a4367ed56bb5468daa39f87fce4b2 gpu: NVIDIA GeForce RTX 3060 title: 21222967 seconds: 60 exit: 0x0 frames shown: 1499 (PresentX 1500) presents per 2 s (last 3): 42 9 1 device removals: 0 crashes: 0 peak commit: 24923 MB ``` 102 % of main's frames, 107 % of its peak commit. One run each. **Not tested:** the suite on this head; whether the title runs the group-shared/texel sub atomics this PR changes in its first 60 s; AMD. AI use: Claude Code (Claude Opus 5.5) ran these runs on this machine and wrote this report.
andrewDoing commented 2026-11-26 20:21:26 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by andrewDoing on 2026-11-26T20:21:26Z.


Independent Blackwell test on NVIDIA GeForce RTX 5070, driver 616.92, Ryzen 7 5700X3D, Windows build 26300.10075, Rust 1.100.0 MSVC, SDK DXC/DXIL 1.8.2502.11. Tested clean PR head efb14e746d6a4367ed56bb5468daa39f87fce4b2 (parent b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7).

With XCL_ADAPTER=NVIDIA GeForce RTX 5070 and XCL_REQUIRE_GPU=wave64, ran cargo test --locked -p xcl --lib gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand -- --exact --test-threads=1 --nocapture, first with XCL_DIRECT_DXIL=0, then =1. Each run: 1 passed, 0 failed, 0 ignored, no skips. The test checked that all 64 lanes observed the final shared value and returned distinct prior values.

Not tested: the full suite on this head, a title, or performance.

AI use: OpenAI Codex with GPT-6.2 Astra ran the tests and reported results; Codex coordinated and prepared this summary.

<!-- greyfinch-sync:ivall/xcl:comment:7202577916 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7202577916). Originally posted by [andrewDoing](https://github.com/andrewDoing) on 2026-11-26T20:21:26Z. --- Independent Blackwell test on NVIDIA GeForce RTX 5070, driver 616.92, Ryzen 7 5700X3D, Windows build 26300.10075, Rust 1.100.0 MSVC, SDK DXC/DXIL 1.8.2502.11. Tested clean PR head `efb14e746d6a4367ed56bb5468daa39f87fce4b2` (parent `b49be1836844fe0b0cdb3211dce3cb7fb4e21ac7`). With `XCL_ADAPTER=NVIDIA GeForce RTX 5070` and `XCL_REQUIRE_GPU=wave64`, ran `cargo test --locked -p xcl --lib gpu::recomp::tests::gpu_ds_sub_rtn_u32_with_a_variable_operand -- --exact --test-threads=1 --nocapture`, first with `XCL_DIRECT_DXIL=0`, then `=1`. Each run: 1 passed, 0 failed, 0 ignored, no skips. The test checked that all 64 lanes observed the final shared value and returned distinct prior values. Not tested: the full suite on this head, a title, or performance. AI use: OpenAI Codex with GPT-6.2 Astra ran the tests and reported results; Codex coordinated and prepared this summary.
github-actions[bot] commented 2026-12-01 02:35:33 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by github-actions[bot] on 2026-12-01T02:35:33Z.


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:7298781751 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7298781751). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-12-01T02:35:33Z. --- 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.
Foniass commented 2026-12-01 08:52:33 +00:00 (Migrated from github.com)

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


Triage (#1607) – head efb14e7

Main already fixes the same driver refusal: 5835139 ("Recompiler: LDS ds_sub_u32 hides its negation from the driver") changes ds_sub_u32/ds_sub_rtn_u32 to add (0 - v) | WaveActiveBitOr(0) in emit.rs:rmw32 and lower_mem.rs:rmw32, changes the fuzz test's Sub the same way, and adds gpu_ds_sub_u32_of_a_register. It landed before this PR was opened.
This PR replaces the same lines with a compare-exchange loop, so it conflicts. In emit.rs it also turns texel (At::Ref) image atomic_sub into a CAS loop, but nothing shows a driver refusing those. The description is the empty template. If main's form is still refused on some driver, a new PR with that measurement would be the place for the CAS loop.
Recommendation: close (superseded by main commit 5835139).

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:7305900509 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7305900509). Originally posted by [Foniass](https://github.com/Foniass) on 2026-12-01T08:52:33Z. --- **Triage (#1607)** – head efb14e7 Main already fixes the same driver refusal: 5835139 ("Recompiler: LDS ds_sub_u32 hides its negation from the driver") changes `ds_sub_u32`/`ds_sub_rtn_u32` to add `(0 - v) | WaveActiveBitOr(0)` in `emit.rs:rmw32` and `lower_mem.rs:rmw32`, changes the fuzz test's `Sub` the same way, and adds `gpu_ds_sub_u32_of_a_register`. It landed before this PR was opened. This PR replaces the same lines with a compare-exchange loop, so it conflicts. In `emit.rs` it also turns texel (`At::Ref`) image `atomic_sub` into a CAS loop, but nothing shows a driver refusing those. The description is the empty template. If main's form is still refused on some driver, a new PR with that measurement would be the place for the CAS loop. Recommendation: close (superseded by main commit 5835139). AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
throny commented 2026-12-01 12:59:45 +00:00 (Migrated from github.com)

Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:59:45Z.


Closing as superseded: this change is already on main (5835139). main 5835139 'LDS ds_sub_u32 hides its negation from the driver' fixes the same Blackwell E_OUTOFMEMORY in emit.rs rmw32 and lower_mem.rs rmw32 with fuzz_tests and a GPU test; same four files as this PR (which uses a CAS loop)

Two independent checks found this: Foniass's close list on #1607 and ours against current main. If something here is still missing on main, say so and reopen it, or ask and I will.

AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

<!-- greyfinch-sync:ivall/xcl:comment:7311948887 --> Imported from [ivall/xcl](https://github.com/xcl-dev/xcl/pull/2752#issuecomment-7311948887). Originally posted by [throny](https://github.com/throny) on 2026-12-01T12:59:45Z. --- Closing as superseded: this change is already on `main` (5835139). main 5835139 'LDS ds_sub_u32 hides its negation from the driver' fixes the same Blackwell E_OUTOFMEMORY in emit.rs rmw32 and lower_mem.rs rmw32 with fuzz_tests and a GPU test; same four files as this PR (which uses a CAS loop) Two independent checks found this: Foniass's close list on #1607 and ours against current `main`. If something here is still missing on `main`, say so and reopen it, or ask and I will. AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.

Pull request closed

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!2742
No description provided.