Repository navigation
Conversation
Melow-code
left a comment
There was a problem hiding this comment.
The CAS loop for ds_sub_u32 is the right fix — InterlockedAdd of a negated value relies on the driver treating the negate-then-add as a single atomic, which Blackwell does not.
One concern: the fuzz generator now rewrites Sub to Add before it reaches emit, so group-shared Sub lost its fuzz coverage. The new GPU test covers the happy path, but fuzz would catch edge cases (overflow, concurrent writes). Consider keeping Sub in the generator and letting it hit the new CAS path.
The TRANSLATOR_VERSION bump to 8 is correct — cached output from version 7 would still use the old negate-add path.
|
A data point on how far the refusal reaches: RTX 3070 (Ampere), driver 616.56, Windows 11, debug. Your AI-assisted (Claude Code). Synthetic tests only. |
|
Test report with the regression pair this draft was waiting for, on an RTX 5080 with a retail title. Tested
Regression run
This PR's head: Not tested
AI use
|
|
@upipibi thanks, that's useful. It doesn't look like 621.24 alone: RTX 50 cards with 617.14, 617.42 (#1905) and 621.01 (@Skyfrye above) refuse the same fuzz seeds, and a 5070 Ti on 610.74 runs them. I kept one path for all GPUs because it's the simplest. If a maintainer prefers a check for RTX 50, I can look into it. Written with Claude Code (Claude Opus 5.5). |
|
@ruipedro-pinheiro thanks. The fuzz tests emit DXIL directly and don't go through Written with Claude Code (Claude Opus 5.5). |
|
Rerun on
AI use for this rerun: Claude Code with Claude Opus 5.5 ran the commands and wrote this section. Earlier report, on RTX 5070 Ti, driver 617.42: Tested
Not tested
AI use
|
|
Additional full-workspace validation for #1905 on my RTX 5060 8 GB, NVIDIA driver 617.42. Tested PR head Builds
Full workspace tests
The sole direct DXIL failure was All four originally failing fuzz tests and the new No additional failures observed. Retail-title smoke testing has not yet been performed on this machine. Tests executed locally by me; report prepared with ChatGPT assistance. |
|
Independent Windows/NVIDIA test report on PR #1919, exact head Tested
Coverage limitation Regression run main: PR: Not tested
AI use
|
towiice
left a comment
There was a problem hiding this comment.
Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, wave32, driver 610.88, DXC 1.9.2609.5):
- \cargo test -p xcl --lib gpu_ds_sub_u32_of_a_register: 1 passed; 0 failed (0.65s)
Lowering \ds_sub_u32\ / \ds_sub_rtn_u32\ as a compare-exchange loop passes cleanly on Turing.
b54ac4e to
a081eb5
Compare
|
I pushed @upipibi's point about the cost was right. Measured here (RTX 5060 Ti, 621.24, synthetic HLSL, 200 000 iterations, median ms):
@ruipedro-pinheiro @guinpereira: @Skyfrye @regiumlepidi @humicu @guinpereira @towiice thank you for the quick runs, and sorry that they were on the head this replaces. If one of you has time, a rerun on If a maintainer prefers the loop, because it doesn't rely on the driver not seeing the negation, I can go back to it. Run and written with Claude Code (Claude Opus 5.5). |
|
@PHeitor1 reran on Claude Code with Claude Opus 5.5 ran the tests and wrote this reply. |
|
Test report on Tested
Regression run Same title, 60 s each, no input (it stays in its first menus, so this is a regression check, not a test of the change), 99.6 % of Not tested: a run that reaches a program with AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and smoke runs and wrote this report. |
|
The single-atomic Remaining before merge:
|
|
Note after recent |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
AMD run on
(The merge base has one test fewer: Tested
Not tested
AI use: omp. Claude Fable 5.2 read the diff, ran the tests and wrote this report. |
|
PR #1919 | Intel Arc A770 | 2026-11-25 UTC Tested Open PR head a081eb5 matched the clean, detached reused checkout before and after the test. The PR discussion and issue #42 contained no equivalent Intel report for this head. STOR-WINLAB, Intel Arc A770 (driver 32.0.101.9175), AMD Ryzen 7 3800X, Windows 11 Enterprise Evaluation 26200.9974. rustc 1.100.0 (0ef1bc386), x86_64-pc-windows-msvc, cargo 1.100.0. Both processes loaded dxcompiler and dxil 1.9.2609.5 from the selected DXC directory. Build command, outside the Arc lock Build succeeded in 42.00 s with two Rust deprecation warnings. CARGO_TARGET_DIR=L:/XclTooling/pr1512-tiling-edges-fddfa267/target, CARGO_BUILD_JOBS=2, CARGO_INCREMENTAL=0, CARGO_PROFILE_DEV_DEBUG=0, CARGO_PROFILE_TEST_DEBUG=0. TEMP and TMP were L:/XclTooling/pr1919/run-20261125T033208461Z. Exact test invocations, each in its own powershell.exe -NoProfile -ExecutionPolicy RemoteSigned process
Each run matched 256 GPU readback values against expected integers (four values per logical lane across 64 lanes, 512 total). For lane l, the subtrahend was 3*l + 100.
Both processes logged mutex release. The assigned Cargo target and detached checkout slot are idle. Evidence is in build.log, direct-dxil-0.log and direct-dxil-1.log in this directory. Not tested Native wave64 hardware, other adapters or drivers, ancestor and negative controls, fuzz or random tests, other backend settings, the workspace suite, retail smoke tests, and crash investigations. AI use T3 Code / Codex gpt-6.2-sol ran the commands, checked the fixture and output, and wrote this report. |
|
Test report on Tested
Not tested
AI use
|
|
Test report on Tested
Not tested
AI use
|
|
Test report on Tested
Not tested
AI use: Claude Code with Claude Fable 5.2 ran the tests and wrote this report. |
# Conflicts: # crates/xcl/src/gpu/dxil/kernel.rs
NVIDIA's RTX 50 (Blackwell) drivers refuse a compute pipeline with E_OUTOFMEMORY when it has a groupshared atomic subtract, and newer ones (seen from 617.14 to 621.24) also when it has a groupshared atomic add of a negated, non-constant value, the form both translators emit for ds_sub_u32. DXC's InterlockedAdd(g, 0u - v) is refused the same way. ds_sub_u32 / ds_sub_rtn_u32 now add (0 - v) | WaveActiveBitOr(0), on the HLSL and the direct DXIL path. The wave op is always 0; with it the driver does not see the negation, and it stays one atomic. The fuzz tests emit their Sub the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a081eb5 to
5835139
Compare
|
@raylitebull thank you for the review. Both points:
Still missing: a smoke pair for Thanks also to @chemist6913, @onlynullpoint, @dhillonjagdeep650-boop, @JJAutoCompare, @DavidM1911 and @futurepro62 for the runs on Run and written with Claude Code (Claude Opus 5.5). |
Fixes #1905. On RTX 50 (Blackwell) cards, a compute program with an LDS subtract of a register (
ds_sub_u32,ds_sub_rtn_u32) does not build: the NVIDIA driver refuses the pipeline withE_OUTOFMEMORY. Both translators emit a groupshared atomic add of0 - v. #1426's55e9c3bchose that form becauseatomicrmw subwas refused; newer drivers (617.14 to 621.24 in the reports) refuse it the same way (@Kalmarv inferred why; the runs that confirm it).5835139isa081eb5rebased ontomain568e7dbwithout theTRANSLATOR_VERSIONbump (#1947 hashesgpu/dxilnow), as @raylitebull asked; the rest of the diff is the same. The first head,b54ac4e, used a compare-exchange loop. It worked, but it is up to 33 times slower under contention (table below), on every GPU. The smoke pair is @KDenKC's fora081eb5;5835139needs a new one, and I have no title I can run it with.What is in it
recomp/emit.rs,dxil/lower_mem.rs: LDSsub_u32adds(0 - v) | WaveActiveBitOr(0). The wave op is always 0; with it the driver does not see the negation. Buffer, flat and imagesubare unchangeddxil/fuzz_tests.rs:Subis emitted the same way, so it stays coveredrecomp/tests.rs:gpu_ds_sub_u32_of_a_register, values of both instructions (wrap, old value, one slot that all 64 lanes subtract from)Tested
5835139onmain568e7dbXCL_DIRECT_DXIL=1,=all,=1withXCL_PER_LANE=1,XCL_HEAP_WINDOWS=1, both). Withemit.rsandlower_mem.rsfrommain: refused (0x8007000E) 3 of 3, on the HLSL path and withXCL_DIRECT_DXIL=1fuzz_validate_and_gpu_0to_3: pass,Subincludedcargo test --workspace --no-fail-fast -- --test-threads=4: 1155 passed, 0 failed, 46 ignored; withXCL_DIRECT_DXIL=1: 1153 passed, 2 failed, 46 ignored, the two beingoffline_compute_pipeline_is_reused_by_a_second_process(Tests: offline compute pipeline test finds the driver blob with XCL_D… #1674) andgpu_image_get_resinfo_1d_array, which both fail onmainhere too. SKIPPED: theno wave64cases, threeper-lane form: refusedcases,no heap windows, and the Developer Mode onedirect_dxil_lds_atomics_and_barrier_parity, ona081eb5: 3 of 3 passcs_6_6, 32 threads, 200 000 iterations of one atomic, median ms of 15 calls over 3 rounds; first call = compile and run of a shader with 200 sites, 3 rounds):InterlockedAdd(g, v)b54ac4e)a081eb5also run by @KDenKC (RTX 5090, 621.24, report): suite 987 passed, 0 failed, 45 ignored, 986 / 1 (Tests: offline compute pipeline test finds the driver blob with XCL_D… #1674) / 45 withXCL_DIRECT_DXIL=1, against 982 / 4 and 981 / 5 onmain; by @regiumlepidi (RTX 5070 Ti, 617.42, report): the new test and the fuzz tests pass on both pathsa081eb5: @AmateurWizrd, RDNA2 integrated GPU (report): the new test and three of the four fuzz tests pass on both paths;fuzz_validate_and_gpu_1fails at seed 540, the same on its merge basea081eb5: @chemist6913 (RTX 5090, 616.92 and 621.40, report), @onlynullpoint (RTX 5090 Laptop, 616.92, rebased ontocbc296a: 1155 passed, 0 failed, 46 ignored, report), @dhillonjagdeep650-boop (RTX 3080 Ti, 617.42, report): the new test and the fuzz tests pass on both paths; @futurepro62 (RTX 5070 Ti, 621.40): Tests: verify direct DXIL vs HLSL GPU parity for wave, LDS atomic, and MIMG ops #1778's three tests pass with this PR merged in; @JJAutoCompare (Intel Arc A770): the new test passes on both paths (report)b54ac4e, the same fix idea as a loop, so evidence for the refusal and the new test only: @Skyfrye (RTX 5080, 621.01, smoke pair), @guinpereira (RTX 5060 Ti, 617.14, smoke pair), @regiumlepidi (RTX 5070 Ti, 617.42), @humicu (RTX 5060, 617.42), @upipibi (RTX 3070, 616.56), @towiice (GTX 1650 SUPER, 610.88)Regression run
On
a081eb5, not yet on5835139. By @KDenKC (report): RTX 5090 32 GB, driver 621.24; Ryzen 7 9800X3D; Windows 11 25H2; release,mainfirst. The runs stay in the title's first menus, so this is a regression check, not a test of the change.main:This PR's head:
Not tested
AI use
🤖 Generated with Claude Code