Skip to content

Tests: the split compute test's piece limit leaves room for the thread limit test - #2854

Open
MarcosMDev wants to merge 1 commit into
xcl-dev:nvidia-devfrom
MarcosMDev:tests-thread-limits-on-gpu
Open

MarcosMDev wants to merge 1 commit into
xcl-dev:nvidia-devfrom
MarcosMDev:tests-thread-limits-on-gpu

Conversation

@MarcosMDev

@MarcosMDev MarcosMDev commented Nov 26, 2026 •

Copy link
Copy Markdown

Updated: rebased onto nvidia-dev d1be810. The wave64: false half of this PR landed separately as ecc0bb5, so the PR now holds only the split test's change. The title and this description are updated to match; the comments below were on the earlier head 080e973, which had both changes.

split_compute_prefers_the_offline_whole_pipeline fails on every GPU since f9bcafd (direct DXIL compute leaves the lanes past a thread limit out), which was tested on a software adapter, where the GPU parts skip. It is a test problem; the runtime is unchanged.

The test's child run sets XCL_DIRECT_SPLIT_INSTRUCTIONS=12 to force a dispatch chain. f9bcafd put the thread limit test in the entry block, which in this program is now 52 instructions. dispatch_plan keeps a program whole when one block is over 4 x the limit (48), so no chain is made and the child fails at assert!(compiled.dispatch_chain.is_some()). The limit is now 16, with a comment on why. With the default limit (12 500) a 52-instruction entry makes no difference.

Found by bisecting af2cecc..eae0150 with this test: f9bcafd is the first bad commit, and its parent 12758ed passes.

What is in it

  • crates/xcl/tests/gpu_compute_e2e.rs: the split test's piece limit 12 → 16, and a comment.

Tested

Regression run

  • Not needed: only crates/xcl/tests/ changes.

Not tested

  • On this head: AMD, Intel, WARP, Linux/Wine, a release build, any title. On Wine with RADV the test's hit case stops at its GPU readback (SzczepanGrela's report below), past the assertion this PR fixes.

AI use

  • Claude Code (Claude Opus 5.5) found the cause, wrote the change and ran the tests. I read every line of the diff.

🤖 Generated with Claude Code

@DarkPanda69

Copy link
Copy Markdown

AMD run (listed as untested), with an RTX 3060 in the same PC: both tests fail on nvidia-dev on both cards and pass with this PR.

Tested: pass, head 080e973 applied on its base nvidia-dev eae0150, debug, Rust 1.100.0, Windows 11 Pro 26200, Ryzen 7 5800X, DXC 1.9.2602.17, cargo build --workspace first, card picked with XCL_ADAPTER, --nocapture:

Test RX 9070 XT (RDNA4, 32.0.32029.2010), base / PR RTX 3060 (32.0.16.1088), base / PR
gpu_compute_thread_limits_leave_the_lanes_past_them_out FAILED / ok FAILED / ok
gpu_compute_e2e split_compute_prefers_the_offline_whole_pipeline FAILED / ok FAILED / ok

No SKIPPED lines in any of these runs. The RX 9070 XT supports 32- and 64-lane waves, so the "HLSL wave32" case now running as a wave32 program there passes too. The wave64 cases in the thread-limit test are the split forms, so this does not cover native wave64.

Not tested: the XCL_DIRECT_SPLIT_INSTRUCTIONS=12 test from #2794, release, Intel, WARP, Linux / Wine, a title.

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

@Decodere

Copy link
Copy Markdown
Contributor

Independent RTX 4060 (8 GB, Wave32-only) / Windows 11 release verification of PR #2854 at 080e973da2c414030096b5b4df92c055f8037888 (exact parent & merge-base nvidia-dev eae015021c639866ab061cdff2e9daf8ba9daac5). Before-vs-after Wave32-only GPU test reproduction only (test-only PR; no runtime source changes, not a full source review).

Setup

  • GPU: NVIDIA GeForce RTX 4060 (8 GB / 7956 MiB reported by D3D12, Wave32-only Ada), driver 32.0.16.2114 (NVIDIA 621.14, WDDM 3.2)
  • CPU / RAM / OS: Intel Core i5-11400F (6 cores / 12 threads), 32 GB RAM (31.9 GiB usable), Windows 11 Home 26200
  • Toolchain / caches: rustc 1.100.0 (0ef1bc386 2026-11-09), DXC 1.9.2609.5, release builds, quiet machine (zero concurrent builds/tests during runs)

Direct before-vs-after Wave32-only RTX 4060 test results (eae01502 vs 080e973d)

Test (--release) Exact parent eae01502 (before) PR #2854 080e973d (after, 3 consecutive runs)
gpu::recomp::tests::gpu_compute_thread_limits_leave_the_lanes_past_them_out (--lib) FAILED (0.23 s, HLSL wave32: CreateComputePipelineState 0x80070057 E_INVALIDARG at tests.rs:8420) 3/3 PASSED (0.61 s / 0.47 s / 0.47 s, 0 SKIPPED)
split_compute_prefers_the_offline_whole_pipeline (--test gpu_compute_e2e) FAILED (1.04 s, assertion failed: compiled.dispatch_chain.is_some() at gpu_compute_e2e.rs:119) 3/3 PASSED (1.77 s / 1.76 s / 1.76 s, 0 SKIPPED)
  • Running the full gpu_compute_e2e binary serially (cargo test --release -p xcl --test gpu_compute_e2e -- --test-threads=1) on 080e973d passed 6/7 tests (1 opt-in SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows); the sole failure was unrelated pre-existing async_compute_pso_registers_real_pso_and_not_standin (forgetting released async compute PSO must clean up TRANSLATED_COMPUTE), which failed identically on unmodified parent eae01502 (gpu_compute_e2e.rs:535, 0.40 s, exit 101).

Limits of coverage

  • Test-only PR (edits only crates/xcl/src/gpu/recomp/tests.rs and crates/xcl/tests/gpu_compute_e2e.rs); no separate retail title smoke run was needed beyond the eae01502 baseline.
  • Single Wave32-only discrete NVIDIA GPU (RTX 4060) on native Windows 11; no Wave64 AMD/Intel GPU or Linux/Wine run on this host.

AI use

Ran the before-vs-after release test comparisons on RTX 4060 with assistance from Google Antigravity (Gemini 4 Neon); all pass/fail results, panic lines, and timings were extracted directly from cargo test outputs.

@Aniseto

Aniseto commented Nov 26, 2026

Copy link
Copy Markdown

Ran the two wave32-only thread-limit tests at 080e973 on an NVIDIA Blackwell desktop part:

Environment: Windows 11 Pro build 26200 x64, NVIDIA GeForce RTX 5070 Ti (Blackwell, wave32 only, 16 GB) driver 32.0.16.2124, Intel Core i5-12400F, 64 GB RAM, rustc 1.100.0 (0ef1bc386 2026-11-09), MSVC 14.44.35207, DXC 1.9.2609.5, debug build.

XCL_ADAPTER=NVIDIA cargo test -p xcl --lib gpu_compute_thread_limits_leave_the_lanes_past_them_out -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 1719 filtered out      (exit 0)

XCL_ADAPTER=NVIDIA cargo test -p xcl --test gpu_compute_e2e split_compute_prefers_the_offline_whole_pipeline -- --test-threads=1
1 passed; 0 failed; 0 ignored; 0 measured; 6 filtered out      (exit 0)

Both tests pass on a natively 32-lane GPU here: the HLSL wave32 form now builds with wave64: false and no longer gets E_INVALIDARG at pipeline creation, and the forced split-chain child succeeds with the 16-instruction piece limit. The thread has an AMD/RTX 3060 run and an RTX 4060 release run, but no 5070 Ti; this adds a second Blackwell part with driver 32.0.16.2124 and DXC 1.9.2609.5.

Not tested: the full workspace suite, a paired smoke run, AMD and Intel GPUs, native wave64 hosts, Wine, release profile, game data.

AI-assisted (OpenCode), model: DeepSeek V4.1 Flash Free - checked out the PR's head commit in a detached worktree, built it, ran the tests, wrote this report; the worktree was not modified; no game data was used.

@andrewDoing

Copy link
Copy Markdown

Checked the interaction with #2794's worker fixture at the original split limit of 12 on an RTX 5070 / NVIDIA 616.92, Ryzen 7 5700X3D, Windows build 26300.10075, Rust 1.100.0 MSVC debug, DXC/DXIL 1.8.2502.11.

On #2854 head 080e973da2c414030096b5b4df92c055f8037888 with #2794 commit 3c4891dd4cf7d249d7f818aec05c7150a347504a applied locally, cargo test --locked -p xcl --test gpu_compute_e2e a_preparation_worker_also_builds_a_split_programs_whole_form -- --exact --nocapture passed: 1 passed, 0 failed, 0 ignored, no reported skips (2.66 s).

The test requires at least two pieces, exactly pieces + 1 created pipelines, zero refused, and a nonempty driver blob for every piece and the whole form. This is an uncommitted local integration, not an exact-head test of either PR. On this configuration it does not establish a need to raise #2794's fixture limit; no GTA title run was performed.

AI use: OpenAI Codex with GPT-6.2 Astra ran the test and reported the result; Codex coordinated and posted it.

rootw0rm pushed a commit to rootw0rm/xcl that referenced this pull request Nov 26, 2026
@JJAutoCompare

Copy link
Copy Markdown

Tested: Clean 080e973da2c414030096b5b4df92c055f8037888, Windows 11 build 26200.9974, Ryzen 7 3800X, Intel Arc A770 driver 32.0.101.9175, Rust 1.100.0 MSVC debug. cargo test --locked -j 2 -p xcl --lib --test gpu_compute_e2e --no-run, followed by exact gpu_compute_thread_limits_leave_the_lanes_past_them_out and split_compute_prefers_the_offline_whole_pipeline with --nocapture --test-threads=1 and XCL_ADAPTER=A770. Two GPU tests passed, zero failed, ignored or reported skips. The thread-limit test read back three wave32 and three split-wave64 forms; native-wave64 subcases were gated out. The integration fixture covered the cache hit, stale and miss cases, with GPU readback for the hit.

Not tested: Native wave64, parent comparison, full workspace suite and retail smoke.

AI use: T3 Code / Codex (gpt-6.2-sol) ran and reran the checks and wrote this report.

@SzczepanGrela

Copy link
Copy Markdown

RX 9070 / RADV / Wine release comparison: the thread-limit test is fixed here, including all nine forms with native wave64. The offline-whole test gets past the parent's chain assertion but remains blocked at the hit-case GPU readback on this Wine stack.

Tested

  • Exact head 080e973da2c414030096b5b4df92c055f8037888 and its exact parent eae015021c639866ab061cdff2e9daf8ba9daac5, targeting nvidia-dev. Separate source copies with test-only observations before unchanged upstream assertions. Production source is unchanged by this PR.
  • RX 9070 16 GB, RADV GFX1201, Mesa 26.3.1-arch3.5; Ryzen 7 7700, CachyOS 7.3.0-5-cachyos. Windows GNU release executables through GE-Proton11-12 / Wine 11.0 Staging, native D3D12 through vkd3d-proton 8293130ebe370b1+ (local asserts-disabled build). DXC/DXIL 1.9.2602.17, Rust 1.97.1.
  • Build each copy: cargo test --offline --locked --release --target x86_64-pc-windows-gnu -p xcl --lib --test gpu_compute_e2e --bin xcl --no-run --message-format=json-render-diagnostics.

Thread-limit executable filter: gpu_compute_thread_limits_leave_the_lanes_past_them_out --nocapture --test-threads=1, then --test-threads=4.

  • Parent: 0 passed, 1 failed with either thread count. In the named HLSL wave32 form, saved DXIL actually specifies WaveSize 64. At limit 232, words 224 through 231 of the EXEC-count readback are 32 instead of 8. Both parent runs have this same eight-word mismatch; the preceding index readback is correct.
  • Head: 1 passed, 0 failed with either thread count, plus two more fresh serial runs with the same result. Saved DXIL for HLSL wave32 now specifies WaveSize 32.
  • Every head run executes all nine forms: HLSL/direct/per-lane, each in wave32, split wave64 and native wave64. Each form has ten dispatches covering indices, EXEC counts, zero limits, folded groups and two-dimensional limits. Across four head runs: 360 dispatches, including 120 native wave64, and 18,957,024 readback u32 values, all independently recomputed, including untouched 0xffffffff words. All captured head files are byte-identical across repetitions. Native wave sizes are checked in disassembled DXIL.

Integration executable filter: split_compute_prefers_the_offline_whole_pipeline --nocapture --test-threads=1.

  • Parent: 0 passed, 1 failed, also repeated with --test-threads=4. Offline preparation reports one GPU pipeline made and zero refused; the hit child fails at compiled.dispatch_chain.is_some().
  • Head: 0 passed, 1 failed. Offline preparation again makes one GPU pipeline with zero refused. The hit child gets past the chain/root-signature assertions and logs one pipeline made from the earlier driver blob, then runner::dispatch_on(...) returns Invalid parameter. (0x80070057) at the original readback call. No hit output buffer was obtained. Stale/miss cases were not reached; further repetitions of this blocked path were omitted. This is partial cache-path coverage, not a passing integration result.

Runtime: inherited XCL_* variables cleared; XCL_NETWORK=0, XCL_ADAPTER=AMD Radeon RX 9070, XCL_REQUIRE_GPU=wave64, XCL_DXC_THREADS=1. Separate enabled XCL/vkd3d/Mesa caches per top-level process; the original integration fixture creates its own private cache. The executed harnesses report 0 ignored, 0 skipped.

Not tested

Integration onto main, native Windows, other GPUs, #2794's worker fixture, the full suite, retail workloads, scripts/smoke.ps1, performance or FPS. The blocked integration test does not verify hit-case GPU output or stale/miss behavior.

AI use

OpenAI Codex (GPT-6; exact serving variant not exposed) added test-only capture observations, ran the comparisons, independently verified the raw readbacks and drafted this report. Publication authorized by the account owner.

…d limit test

f9bcafd put the thread limit test in a compute program's entry block,
which in split_compute_prefers_the_offline_whole_pipeline's program is
now 52 instructions. With the test's piece limit of 12, dispatch_plan
keeps a program whole when one block is over 4 x the limit (48), so no
dispatch chain is made and the child run fails at
assert!(compiled.dispatch_chain.is_some()) on every GPU. The limit is
now 16. The default limit (12 500) is unaffected.

The other test f9bcafd broke on a GPU,
gpu_compute_thread_limits_leave_the_lanes_past_them_out, was fixed in
ecc0bb5.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@MarcosMDev
MarcosMDev force-pushed the tests-thread-limits-on-gpu branch from 080e973 to 1051db2 Compare November 27, 2026 13:22
@MarcosMDev MarcosMDev changed the title Tests: the thread limit tests of f9bcafd run on a wave32-only GPU Tests: the split compute test's piece limit leaves room for the thread limit test Nov 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants