Skip to content

Tests: the thread limit tests of f9bcafd run on a wave32-only GPU - #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

Copy link
Copy Markdown

f9bcafd (direct DXIL compute leaves the lanes past a thread limit out) was tested on a software adapter, where the GPU parts skip. On a GPU, two tests fail on nvidia-dev eae0150, every run. Both are test problems; the runtime is unchanged.

  • gpu_compute_thread_limits_leave_the_lanes_past_them_out (new in f9bcafd): the "HLSL wave32" form builds its Options from ..Default::default(), whose wave64 is true, so its program is [WaveSize(64)]. A GPU with only 32-lane waves refuses it: HLSL wave32: CreateComputePipelineState: Parâmetro incorreto. (0x80070057) (E_INVALIDARG). The form now sets wave64: false, as its name and the false next to it say.
  • split_compute_prefers_the_offline_whole_pipeline (unchanged by f9bcafd): its child run sets XCL_DIRECT_SPLIT_INSTRUCTIONS=12 to force a dispatch chain. The entry block now holds the thread limit test and is 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 the split test: f9bcafd is the first bad commit, and its parent 12758ed passes.

What is in it

  • crates/xcl/src/gpu/recomp/tests.rs (test module): wave64: false on the "HLSL wave32" form.
  • crates/xcl/tests/gpu_compute_e2e.rs: the split test's piece limit 12 → 16, and a comment.

Tested

Regression run

  • Not needed: only tests change (crates/xcl/tests/ and the #[cfg(test)] module gpu/recomp/tests.rs).

Not tested

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

f9bcafd's two test failures on a GPU (its own run was on a software
adapter, where the GPU parts skip):

- gpu_compute_thread_limits_leave_the_lanes_past_them_out: the
  "HLSL wave32" form took Options' default wave64: true, so its program
  was [WaveSize(64)], which a GPU with only 32-lane waves refuses
  (CreateComputePipelineState: E_INVALIDARG). It now asks for wave32.
- split_compute_prefers_the_offline_whole_pipeline: the entry block's
  thread limit test makes it 52 instructions; with the test's piece
  limit of 12, a block over 4 x 12 keeps the program whole and no
  dispatch chain is made. The limit is now 16.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@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.

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.

2 participants