Recompiler: LDS ds_sub_u32 hides its negation from the driver (RTX 50 refuses it) #1919
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1919
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1919"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@PHeitor1 on GitHub · 2026-11-24 23:07 UTC · original
PHeitor1:lds-sub-cas→main· +67 −8 · 4 files · 1 commits · openFixes #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 (616.56 to 621.40 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 @Toons29's, not mine: 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(#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)5835139also run by @siam4201 (RTX 5070 Ti, 32.0.16.2101, report):gpu::dxil::fuzz_tests5 passed, 0 failed,scripts/test.ps10 failures5835139also run by @devilbytes (RTX 5060, 616.56, report): suite 1155 passed, 0 failed; 1153 / 2 withXCL_DIRECT_DXIL=1(the same two), against 1150 / 4 and 1148 / 6 on its merge base; merged intomain1a0bbe3: 1251 / 0 and 1250 / 1 (#1674)a081eb5also run by @KDenKC (RTX 5090, 621.24, report): suite 987 passed, 0 failed, 45 ignored, 986 / 1 (#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): #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
5835139, by @Toons29 (report): RX 9070 (RDNA4), driver 32.0.32029.2010; Ryzen 7 7800X3D, 32 GB; Windows 11 build 26300; release. It is a regression check: it does not show whether the run reaches the code this PR changes. @siam4201 also posted a 30 s pair for5835139on an RTX 5070 Ti, 731 frames against 740 onmain568e7db, no crash (report), and @KDenKC a 60 s pair fora081eb5on an RTX 5090 (report).main:This PR's head:
Not tested
AI use
🤖 Generated with Claude Code
@upipibi on GitHub · 2026-11-24 23:10 UTC · original
A data point on how far the refusal reaches: RTX 3070 (Ampere), driver 616.56, Windows 11, debug. Your
gpu_ds_sub_u32_of_a_registerpasses onmain689f2dbwith only the test copied in, and onb54ac4e, each with and withoutXCL_DIRECT_DXIL=1. So this driver builds the current groupshared add of0 - vand gets the values right. TheE_OUTOFMEMORYlooks specific to RTX 50 or to driver 621.24, and the compare-exchange loop costs a retry loop under contention on cards that would take the single atomic. Whether that is worth a capability check rather than the loop everywhere is your call; the PR is correct on Ampere either way.AI-assisted (Claude Code). Synthetic tests only.
@Skyfrye on GitHub · 2026-11-24 23:14 UTC · original
Test report with the regression pair this draft was waiting for, on an RTX 5080 with a retail title.
Tested
b54ac4e842a365d75ba97dfd07892cb75a0bd20e, clean tree, directly onmain689f2db; tests in debug, smoke runs in releasecargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1: 6 passed, 0 failed, 2 ignored; the same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignoredemit.rsandlower_mem.rstaken frommainand the rest of this PR,gpu_ds_sub_u32_of_a_registerfails withCreateComputePipelineState ... (0x8007000E)on the HLSL path and withXCL_DIRECT_DXIL=1main689f2dbthe fourfuzz_validate_and_gpu_*tests fail here at seeds 70, 545, 1019 and 1507 with0x8007000E, every run, also with 14.7 GB of video memory freecargo test --workspace --no-fail-fast -- --test-threads=4on the PR head: 976 passed, 0 failed, 45 ignoredno wave64cases (gpu::recomp::lower::tests×4,gpu::recomp::lower_dxil::tests×10,gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware); 3lower_dxilper-lane cases refused as unsupported (V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32);pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off);heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)Regression run
main:This PR's head:
Not tested
ds_sub_u32: it stays in the menus, so this pair is a regression check, not evidence that the change fixes something in the titlemainran first, so the second run likely had the first run's caches. I did not rerunmainafterwardsAI use
@PHeitor1 on GitHub · 2026-11-24 23:15 UTC · original
@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).
@PHeitor1 on GitHub · 2026-11-24 23:15 UTC · original
@ruipedro-pinheiro thanks. The fuzz tests emit DXIL directly and don't go through
rmw32, so keepingSubthere wouldn't reach the translators' loop by itself. The new GPU test covers wraparound and 64 lanes subtracting different values from one slot. I can give the fuzz emitter its own compare-exchange loop soSubstays covered, if you think that's worth it.Written with Claude Code (Claude Opus 5.5).
@humicu on GitHub · 2026-11-24 23:38 UTC · original
Additional full-workspace validation for #1905 on my RTX 5060 8 GB, NVIDIA driver 617.42.
Tested PR head
b54ac4e842a365d75ba97dfd07892cb75a0bd20e.Builds
Full workspace tests
cargo test --workspace --no-fail-fast -- --test-threads=1XCL_DIRECT_DXIL=1The sole direct DXIL failure was
offline_compute_pipeline_is_reused_by_a_second_process, consistent with the previously reported #1674 issue.All four originally failing fuzz tests and the new
gpu_ds_sub_u32_of_a_registerregression test passed in both configurations.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.
@guinpereira on GitHub · 2026-11-24 23:42 UTC · original
Independent Windows/NVIDIA test report on PR #1919, exact head
b54ac4e842a365d75ba97dfd07892cb75a0bd20e.Tested
XCL_ADAPTER="rtx 5060 ti" .\scripts\test.ps1(cargo build --workspace, thencargo test --workspace -- --test-threads=4): 976 passed, 0 failed, 45 ignored, exit 0, clean PR head.V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32), one opt-in heap-window case.XCL_SAMPLE_*inputs unset, so optional real-data test bodies did not run.gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1 --nocapture, default path: 6 passed, 0 failed, 2 ignored; same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignored. Each validates 2000 generated programs and GPU-compares 1232.gpu_ds_sub_u32_of_a_registertest into a separate checkout of exact parent689f2db477c3c062cf162649781640ef8a977c18, with its own target directory and unchanged translators.cargo test -p xcl --lib gpu_ds_sub_u32_of_a_register -- --test-threads=1 --nocapture: 0 passed, 1 failed, 0 ignored,CreateComputePipelineState/0x8007000E. Same result withXCL_DIRECT_DXIL=1. On the clean PR head that same test passes on both paths; its assertions check wraparound, returned old values, and 64 lanes subtracting from a shared slot.cargo build --release -p xclsucceeded for PR head andmain20cf13022f764208384c610c2ae6a3f4eed201a2; the smoke executables were retained separately. The main smoke build used its own fresh target directory. Source checkouts used for smoke were clean.Coverage limitation
The fuzz generator in this PR maps its selected
Suboperation toAdd. Its passing fuzz batches therefore do not demonstrate that the original subtract cases now run unchanged. The translator fix is demonstrated here by the identical specific LDS-subtract test failing on the parent translators and passing on the PR. No performance improvement is claimed.Regression run
Same local title, data root and default settings, release,
XCL_ADAPTER="rtx 5060 ti",XCL_PRESS_A_AT=10,14,18,22,26,30,34,38,42,46,50,54,58. Main first, then PR, 60 seconds each; no task-owned builds or other tests ran during either game run. Existing shader/driver caches were reused. Script blocks copied verbatim:main:
PR:
Not tested
XCL_DIRECT_DXIL=1, release test suite, CAS-loop performance/compile cost, gameplay/world loading.ds_sub_u32or that world loading improves. Current main also includes an unrelated upstream MSAA change; the exact-parent specific test is the isolated fail-before comparison.AI use
@PHeitor1 on GitHub · 2026-11-24 23:53 UTC · original
I pushed
a081eb5, which replaces the compare-exchange loop with one atomic:InterlockedAdd(g, (0u - v) | WaveActiveBitOr(0u)). The wave op is always 0, and with it the driver no longer sees a negation.@upipibi's point about the cost was right. Measured here (RTX 5060 Ti, 621.24, synthetic HLSL, 200 000 iterations, median ms):
a081eb5b54ac4e)@ruipedro-pinheiro @guinpereira:
Subis back in the fuzz tests, emitted the same way as the translators do, and all four pass here.@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
a081eb5would help:cargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_testswith and withoutXCL_DIRECT_DXIL=1, on any driver, and one smoke pair (@Skyfrye or @guinpereira). It is also untested on AMD and on older NVIDIA drivers.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).
@regiumlepidi on GitHub · 2026-11-24 23:35 UTC · original · edited 2026-11-24 23:57 UTC
Rerun on
a081eb5(2026-11-25), as asked: RTX 5070 Ti, driver 617.42, all pass on both pathsa081eb52220dbc746b63b9e1eec04ba7481ef59fas it is (onmain62265d3), clean tree, debug, same machine as belowcargo test -p xcl --locked --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --nocapture: 6 passed, 0 failed, 2 ignored (amd_reduced_seeds,debug_seed); the same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignored. NoSKIPPEDline| WaveActiveBitOr(0)form, so its four batches passing shows that 617.42 builds that form; the subtract itself is checked bygpu_ds_sub_u32_of_a_registera081eb5: the whole workspace suite, a fail-before control on62265d3, any smoke pair, releaseAI use for this rerun: Claude Code with Claude Opus 5.5 ran the commands and wrote this section.
Earlier report, on
b54ac4e:RTX 5070 Ti, driver 617.42:
b54ac4eremoves the four fuzz failures, also when merged intomain20cf130Tested
XCL_SAMPLE_*cargo build --workspace --locked, thencargo test --workspace --locked --no-fail-fast -- --test-threads=4 --nocapture, one run per cell, clean trees, one target directory per tree (passed / failed / ignored):XCL_DIRECT_DXIL=1main20cf130b54ac4e(on689f2db)b54ac4emerged into20cf130(local merge, no conflicts)mainarefuzz_validate_and_gpu_0to_3:CreateComputePipelineState0x8007000Eat seeds 70, 545, 1019 and 1507, the same seeds as #1905XCL_DIRECT_DXIL=1isoffline_compute_pipeline_is_reused_by_a_second_process, which fails onmainhere toomain20cf130:gpu_ds_sub_u32_of_a_registeris refused with0x8007000E, both with and withoutXCL_DIRECT_DXIL=1(1 run each). It passes on the PR head and on the mergeSKIPPED(25 lines, on the PR head and the merge): 18 no wave64, 3 per-lane form refused, 1 Developer Mode off, 1 nod3d12SDKLayers.dll, 1 no heap windows, 1 no D3D12 debug layerNot tested
AI use
@regiumlepidi on GitHub · 2026-11-24 23:58 UTC · original
@PHeitor1 reran on
a081eb5(RTX 5070 Ti, driver 617.42, debug):cargo test -p xcl --locked --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_testsgives 6 passed, 0 failed, 2 ignored, both with and withoutXCL_DIRECT_DXIL=1. Details are at the top of my earlier comment, which I edited. No smoke pair from me: I don't have a title to run it on.Claude Code with Claude Opus 5.5 ran the tests and wrote this reply.
@KDenKC on GitHub · 2026-11-25 00:08 UTC · original
Test report on
a081eb5with the smoke pair it was missing: RTX 5090, retail title. The four fuzz tests and the new test pass on both paths; both fail onmainhere.Tested
a081eb52220dbc746b63b9e1eec04ba7481ef59fas it is (onmain62265d3), clean tree; tests in debug aftercargo build --workspace, smoke runs in releasecargo test --workspace --no-fail-fast -- --test-threads=4XCL_DIRECT_DXIL=1main62265d3a081eb5main's failures:fuzz_validate_and_gpu_0to_3(CreateComputePipelineState0x8007000E; on20cf130earlier today seed 70 was the first). The one failure left withXCL_DIRECT_DXIL=1on both isoffline_compute_pipeline_is_reused_by_a_second_process(#1674).cargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1: 6 passed, 0 failed, 2 ignored, with and withoutXCL_DIRECT_DXIL=1.emit.rsandlower_mem.rsfrommain, the rest of the PR as it is:gpu_ds_sub_u32_of_a_registerrefused withCreateComputePipelineState … (0x8007000E)on the HLSL path and withXCL_DIRECT_DXIL=1. Files restored before the smoke run.mainand the PR): 18no wave64, 3per-lane form: refused(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows), andpso_measurement_compiles_an_exact_synthetic_record(Developer Mode).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),
mainfirst:99.6 % of
main's frames, 101 % of its peak commit.Not tested: a run that reaches a program with
ds_sub_u32in the title (these runs stay in the menus); the cost of the wave op on this card; AMD; release test build.AI use: Claude Code (Claude Opus 5.5) ran the builds, tests and smoke runs and wrote this report.
@raylitebull on GitHub · 2026-11-25 01:08 UTC · original
The single-atomic
(0u - v) | WaveActiveBitOr(0u)change ona081eb5cleanly restores fuzz coverage and passes CI (Build and test+PR description) and RTX 5070 Ti / RTX 5090 verification.Remaining before merge:
mainto drop theTRANSLATOR_VERSION = 8bump inkernel.rs(#1950took8, and#1947now auto-hashesgpu/dxilsources viaXCL_DIRECT_DXIL_SOURCE_ID).| WaveActiveBitOr(0u)builds and passesgpu_ds_sub_u32_of_a_register+gpu::dxil::fuzz_testson RDNA.@raylitebull on GitHub · 2026-11-25 02:01 UTC · original
Note after recent
mainmerges:a081eb5now shows a merge conflict (CONFLICTING). Rebase onto currentmainand note that#1947now auto-hashesgpu/dxil/*sources viaXCL_DIRECT_DXIL_SOURCE_ID(kernel.rs:39), so edits outsidegpu/dxil/*or usingXCL_TRANSLATOR_SOURCE_IDdon't need a manualTRANSLATOR_VERSIONbump. Once rebased + CI green + an AMD verification pass lands, this will also unblock Blackwellsplit-w64LDS sub in#1778.@DavidM1911 on GitHub · 2026-11-25 02:24 UTC · original
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!
@AmateurWizrd on GitHub · 2026-11-25 03:19 UTC · original
AMD run on
a081eb5(the head as it is, RDNA2 integrated GPU):gpu_ds_sub_u32_of_a_registerpasses, and so dofuzz_validate_and_gpu_0,_2and_3, with and withoutXCL_DIRECT_DXIL=1.fuzz_validate_and_gpu_1fails on seed 540 (res[833] = 0x7, CPU 0x6), but it fails identically on this PR's merge base62265d3, so this PR does not cause it; it is the RDNA2 failure already reported onmainin #42. This answers point 2 of #1919, before the rebase. On an RTX 5070 Ti with driver 621.01, where the four fuzz tests fail onmain, all six pass.cargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1 --nocapture, debug:a081eb5(PR)fuzz_validate_and_gpu_1, seed 540a081eb5(PR)XCL_DIRECT_DXIL=1fuzz_validate_and_gpu_1, seed 54062265d3(merge base)fuzz_validate_and_gpu_1, seed 54062265d3(merge base)fuzz_validate_and_gpu_1, seed 540a081eb5(PR)a081eb5(PR)XCL_DIRECT_DXIL=1(The merge base has one test fewer:
gpu_ds_sub_u32_of_a_registeris new in this PR.) Each fuzz batch validated 500 seeds; GPU-compared per batch: 299 (seeds 0..500), 313 (500..1000), 314 (1000..1500), 306 (1500..2000).Tested
XCL_ADAPTER=radeon; NVIDIA GeForce RTX 5070 Ti 16 GB, driver 621.01 (32-lane waves only); 32 GB RAM; Windows 11 build 26200; Rust 1.100.0XCL_NETWORK=0main2bdf0477fthe four fuzz tests fail on the 5070 Ti with "Not enough memory resources" for seeds 70, 545, 1019 and 1507, the failure of #1905Not tested
main; RDNA3/RDNA4; the full suite on this head; a retail-title smoke pairAI use: omp. Claude Fable 5.2 read the diff, ran the tests and wrote this report.
@JJAutoCompare on GitHub · 2026-11-25 03:39 UTC · original
PR #1919 | Intel Arc A770 | 2026-11-25 UTC
Tested
Open PR head a081eb52220dbc746b63b9e1eec04ba7481ef59f 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
cargo test --locked -p xcl --lib --no-run
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
$env:XCL_ADAPTER='A770'
$env:XCL_DXC_DIR=Join-Path $env:LOCALAPPDATA 'XclTooling/dxc-1.9.2609/bin/x64'
$env:XCL_DIRECT_DXIL='0'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_ds_sub_u32_of_a_register --exact --nocapture --test-threads=1 }
# In the second process with the same adapter and DXC settings
$env:XCL_DIRECT_DXIL='1'
& 'L:/XclTooling/Invoke-ArcTest.ps1' -Test { & 'L:/XclTooling/pr1512-tiling-edges-fddfa267/target/debug/build/xcl/77aca8ccb20e299f/out/xcl-77aca8ccb20e299f.exe' gpu::recomp::tests::gpu_ds_sub_u32_of_a_register --exact --nocapture --test-threads=1 }
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.
@chemist6913 on GitHub · 2026-11-25 04:31 UTC · original
Test report on
a081eb5: RTX 5090 on two drivers not yet in this thread, 616.92 and 621.40. The fix works on both, andmainis refused on both.Tested
XCL_DXC_DIR; debug;XCL_ADAPTER="rtx 5090"; noXCL_SAMPLE_*seta081eb52220dbc746b63b9e1eec04ba7481ef59fas it is (onmain62265d3), clean tree. Same machine and checkout for both columns; the driver was updated in between.cargo test -p xcl --locked --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_testsXCL_DIRECT_DXIL=1emit.rsandlower_mem.rsfrom62265d3,gpu_ds_sub_u32_of_a_registeronlyCreateComputePipelineState0x8007000E0x8007000Ecargo test --workspace --locked --no-fail-fast -- --test-threads=4XCL_DIRECT_DXIL=1maincbc296a, the fourfuzz_validate_and_gpu_*0x8007000E(default path; whole suite 1150 passed, 4 failed, 46 ignored)XCL_DIRECT_DXIL=1XCL_DIRECT_DXIL=1isoffline_compute_pipeline_is_reused_by_a_second_process(#1674).no wave64, 3per-lane form: refused(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32), 1no heap windows, 1 that needs Windows Developer Mode to turn the driver cache off.0 - v, and both build the| WaveActiveBitOr(0)form.Not tested
a081eb5rebased or merged onto currentmainXCL_SAMPLE_*tests; AMD and IntelAI use
@onlynullpoint on GitHub · 2026-11-25 05:00 UTC · original
Test report on
a081eb5applied onto currentmaincbc296a(the rebase asked for above): RTX 5090 Laptop GPU, driver 616.92. It adds two things the 616.92 / 621.40 report lists as not tested: the whole suite on 616.92, and the change on currentmain.Tested
a081eb5cherry-picked ontomaincbc296a. The only conflict wasTRANSLATOR_VERSIONingpu/dxil/kernel.rs, resolved by keepingmain's 9 (gpu/dxilis hashed byXCL_DIRECT_DXIL_SOURCE_ID,recomp/emit.rsis inXCL_TRANSLATOR_SOURCE_ID). The rest applied unchangedcargo test --workspace --no-fail-fast -- --test-threads=4: 1155 passed, 0 failed, 46 ignored. Oncbc296awithout the change: 1150 passed, 4 failed, 46 ignored, the four beingfuzz_validate_and_gpu_0to_3(0x8007000Eat seeds 70, 545, 1019 and 1507)cargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1: 6 passed, 0 failed, 2 ignored; the same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignoredrecomp/emit.rsanddxil/lower_mem.rsfromcbc296aand the rest of the change,gpu_ds_sub_u32_of_a_registeris refused with0x8007000Eon the HLSL path and withXCL_DIRECT_DXIL=1(1 run each)no wave64; 2 more wave64 cases whose reason was cut off in the log (const_mask,mask_ff0_flbit); 3per-lane form: refused(V_MUL_F16,V_PK_MUL_F16,V_CVT_F16_F32);pso_measurement_compiles_an_exact_synthetic_record(Developer Mode off); 1no heap windowsNot tested
cbc296a), the full suite withXCL_DIRECT_DXIL=1on this tree alone, release, any smoke pair or titleAI use
@dhillonjagdeep650-boop on GitHub · 2026-11-25 05:53 UTC · original
Test report on
a081eb5: RTX 3080 Ti (Ampere) on driver 617.42, the driver version of the RTX 5060 in #1905. All pass on both paths, and this card also buildsmain's form.Tested
XCL_*variable set except the one nameda081eb52220dbc746b63b9e1eec04ba7481ef59fas it is (onmain62265d3), clean treecargo test -p xcl --locked --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1: 6 passed, 0 failed, 2 ignored (amd_reduced_seeds,debug_seed); the same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignored. NoSKIPPEDlinerecomp/emit.rsanddxil/lower_mem.rsfrom62265d3: 6 passed, 0 failed, 2 ignored on both paths. So on the driver version that refuses the pipeline on the RTX 5060 (617.42), this Ampere card builds the groupshared add of0 - vand gets the values right: the refusal follows the GPU generation, not the driver version alonemain6020a33,cargo test --workspace --locked --no-fail-fast -- --test-threads=4: 1154 passed, 0 failed, 46 ignored, the fourfuzz_validate_and_gpu_*among the passesNot tested
a081eb5, the change rebased onto currentmain, a smoke pair, release,XCL_PER_LANE=1,XCL_HEAP_WINDOWS=1AI use: Claude Code with Claude Fable 5.2 ran the tests and wrote this report.
@PHeitor1 on GitHub · 2026-11-25 09:20 UTC · original
@raylitebull thank you for the review. Both points:
main568e7dbas5835139, without theTRANSLATOR_VERSIONbump.kernel.rsis no longer in the diff; the rest is the same asa081eb5. Here (RTX 5060 Ti, 621.24): suite 1155 passed, 0 failed, 46 ignored; withXCL_DIRECT_DXIL=11153 passed, 2 failed, 46 ignored, the two beingoffline_compute_pipeline_is_reused_by_a_second_process(#1674) andgpu_image_get_resinfo_1d_array, which both fail onmainhere too. The new test passes in all 6 modes I ran (3 runs each) and is refused without the translator change.a081eb5on an RDNA2 integrated GPU, both paths. The new test and three of the four fuzz tests pass;fuzz_validate_and_gpu_1fails at seed 540 exactly as on its merge base. That is before the rebase.Still missing: a smoke pair for
5835139, since the push invalidates the one fora081eb5. @KDenKC, @Skyfrye, @guinpereira: if one of you can rerun it once more, that is the last thing the check asks for. Sorry for the repeat.Thanks also to @chemist6913, @onlynullpoint, @dhillonjagdeep650-boop, @JJAutoCompare, @DavidM1911 and @futurepro62 for the runs on
a081eb5; the ones with details are in the description.Run and written with Claude Code (Claude Opus 5.5).
@devilbytes on GitHub · 2026-11-25 12:56 UTC · original
Test report for
5835139on an older Blackwell driver (616.56): it fixes the refused pipelines here too, in every mode, and also merged into today's main.Tested
gpu_ds_sub_u32_of_a_registerandfuzz_validate_and_gpu_0..3,--test-threads=1: 3 of 3 runs pass in each of 6 modes (default,XCL_DIRECT_DXIL=1,=all,=1withXCL_PER_LANE=1,XCL_HEAP_WINDOWS=1,XCL_DIRECT_DXIL=1withXCL_HEAP_WINDOWS=1)cargo test --workspace --no-fail-fast -- --test-threads=4:XCL_DIRECT_DXIL=1568e7dbfuzz_validate_and_gpu_0..3, 0x8007000E)gpu_image_get_resinfo_1d_array,offline_compute_pipeline_is_reused_by_a_second_process)5835139(this PR)gpu_image_get_resinfo_1d_array,offline_compute_pipeline_is_reused_by_a_second_process)5835139merged into main1a0bbe3(no conflicts)offline_compute_pipeline_is_reused_by_a_second_process, #1674)46 ignored in every run. SKIPPED: 20 no wave64, 1 no heap windows, 3 per-lane form: refused (and 1 no xgameruntime.dll on the merge)
(v ^ 0xFFFFFFFF) + 1in the fuzz emitter is refused the same way (56 of 91 Sub programs), so the driver folds that form tooNot tested
@Toons29 on GitHub · 2026-11-25 13:06 UTC · original
Regression run of
58351392on the retail title, for this PR's Regression run section. Both blocks are fromscripts/smoke.ps1as printed, not edited:mainon1a0bbe3a, this PR on its head commit with no uncommitted changes, same title and time.Against the limits in CONTRIBUTING.md: 100 % of
main's frames, 100 % of its peak commit, no crash, no device removal.AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0,
cargo build --release -p xcl, 60 s,XCL_NETWORK=0. This is a regression check only: it does not show whether the run reaches the code this PR changes.AI use: Claude Code (Claude Opus 5.5) built both trees and ran
scripts/smoke.ps1; a script posted this right after the run, with both blocks exactly as printed.@siam4201 on GitHub · 2026-11-25 13:34 UTC · original
Tested on NVIDIA GeForce RTX 5070 Ti (driver
32.0.16.2101, Ryzen 9 7900X, Rust1.97.1):Tested
cargo test -p xcl --lib gpu::dxil::fuzz_tests: 5 passed, 0 failed, 2 ignored (all 4fuzz_validate_and_gpu_0..3tests now pass; onmain568e7dball 4 fail withE_OUTOFMEMORYat seed 70, etc.).\scripts\test.ps1onpr-1919(5835139): 0 failures across the workspace (14 no wave64,3 per-lane form: refused,1 no heap windowsskipped)Regression run (
.\scripts\smoke.ps1, 30s)main:pr-1919:Not tested
AI use
@snrubrm on GitHub · 2026-11-25 14:27 UTC · original
RTX 5070 Ti on driver 621.40 (newest so far here): the new test and the four fuzz tests pass on both paths at
5835139, and the new test fails without the fixTested
XCL_ADAPTER=nvidia, and the GPU engine counters show only the 5070 Ti opened by the test processes); Windows 11 Pro 26300; rustc 1.100.0 MSVC; DXC 1.9.2602.17 (Windows SDK 10.0.26100); debug5835139244ebb0025c431808696fb9567330274bas it is (onmain568e7db), clean worktreecargo test -p xcl --lib -- gpu_ds_sub_u32_of_a_register gpu::dxil::fuzz_tests --test-threads=1: 6 passed, 0 failed, 2 ignored; the same withXCL_DIRECT_DXIL=1: 6 passed, 0 failed, 2 ignoredlower_mem.rsandemit.rstaken from5835139~1(test kept),gpu_ds_sub_u32_of_a_registerfails on both paths withCreateComputePipelineState ... (0x8007000E)cargo test --workspace --no-fail-fast -- --test-threads=4: 1155 passed, 0 failed, 46 ignored.SKIPPEDlines: 13 testsno wave64, 2 per-lane f16 / cvt refusals (wave32 parts),pso_measurement_compiles_an_exact_synthetic_record(no Developer Mode),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows)main(1a0bbe3) this card failsfuzz_validate_and_gpu_0to_3(first seeds 70, 545, 1019, 1507; 56 of 1232 GPU-run seeds) on both 621.01 and 621.40, so 621.40 still refuses the plain0 - vadd. A plain-HLSL kernel compiled by DXC withInterlockedAdd(g[i], -x)on groupshared is refused the same way, and the+xbuild is notRegression run (same retail title, 60 s each, release builds of
main06c9f55and this PR's head, after one 60 s warm-up run; no input; noSystem32\xgameruntime.dllon this machine for either run)The PR run has 99.8 % of
main's frames and 101.4 % of its peak commit, with no device removal or crash.Not tested
0x8007000E), so this title did not compile an LDS subtract in its first 60 s, and the smoke pair is a regression check onlyClaude Code (Claude Opus 5.5) ran the tests and wrote this report.
@FIJI1299 on GitHub · 2026-11-25 18:23 UTC · original
Verified commit
5835139on Windows (NVIDIA RTX 5070, driver621.40, DXC1.8.2502.11):main):cargo test -p xcl --lib fuzz_validate_and_gpufails (E_OUTOFMEMORYon seeds70,545,1019,1507).#1919(5835139): Both default HLSL and direct DXIL (XCL_DIRECT_DXIL=1) paths pass all DXIL GPU fuzz tests (6 passed, 0 failed, 2 ignored) cleanly.@DavidM1911 on GitHub · 2026-11-26 06:41 UTC · original
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: 1 failure under parallel scheduling; clean on--test-threads=1rerun (1306 passed, 0 failed, 27 ignored, 78s). Intermittent single-test flake — tracked in #1978.Thanks!
— Devin
@Melow-code on GitHub · 2026-11-24 23:09 UTC · original · reviewed
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.
@towiice on GitHub · 2026-11-24 23:52 UTC · original · reviewed
Verified on Windows 11 (NVIDIA GeForce GTX 1650 SUPER, 4 GB Turing TU116, wave32, driver 610.88, DXC 1.9.2609.5):
Lowering \ds_sub_u32\ / \ds_sub_rtn_u32\ as a compare-exchange loop passes cleanly on Turing.
@bmjask on GitHub · 2026-11-25 21:52 UTC · original · reviewed
No concrete correctness blocker found. 0u-v preserves modulo-2^32 DS_SUB semantics and zero WaveActiveBitOr is harmless under partial EXEC; both HLSL/Direct-DXIL record required WaveOps. GPU test covers return/non-return, contention and wraparound. Nonblocking gap: runner selects only one backend per run, so test does not deterministically execute both changed paths; add separate backend coverage if practical. I found no blocker.
@luckyteagirl on GitHub · 2026-11-26 10:49 UTC · original
I ran the focused LDS subtraction fixture on the RX 6800M at clean head
5835139244ebb0025c431808696fb9567330274b. The remote head was unchanged after both runs.Tested
Windows 11 Home build 26200, Ryzen 9 5980HX, Radeon RX 6800M driver
30.0.13002.13003, and Rust 1.99.0 MSVC. The log identified Windows SDK DXC/DXIL 1.8.2502.11. I setXCL_ADAPTER=AMD Radeon RX 6800MandXCL_REQUIRE_GPU=1. The fixture does not print the adapter. The runner requires the explicit name match, and a separate DXGI probe identifies this adapter as PCI1002:73df.With
XCL_DIRECT_DXIL=0and again withXCL_DIRECT_DXIL=1, the command exited 0 with 1 passed, 0 failed, 0 ignored, 1,124 filtered out, and no skip markers.Not tested
Blackwell, performance, the workspace suite, and a title. The shared-slot part of this fixture tests the non-returning subtract. It differs from #2752's shared-slot returning test.
AI use
OpenAI Codex (GPT-6.2 Sol) ran the tests, checked the adapter selector, and drafted this report.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.