Repository navigation
Direct DXIL: TG_SIZE counts a partial last wave - #1950
Merged
raylitebull merged 2 commits intoNov 25, 2026
Merged
Conversation
The direct translator set TG_SIZE's wave count to threads / lanes, so a group of 96 threads in wave64 read 1 wave where the console (and the HLSL path) give 2. It is now threads.div_ceil(lanes). The existing test gpu_compute_tg_size_counts_a_partial_last_wave now runs through direct_or, so XCL_DIRECT_DXIL=1 covers this path; it fails without the fix (left: 1, right: 2 for 96 threads in wave64). Found with xcl-dev#1934's XCL_DXIL_DIFF=1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…IZE change Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
Hardware test report — commit
|
This was referenced Nov 25, 2026
anoyarou
added a commit
to anoyarou/xcl
that referenced
this pull request
Nov 25, 2026
Brings main to full parity with upstream/main (7994cd1): - xcl-dev#1950: Direct DXIL TG_SIZE counts a partial last wave (TRANSLATOR_VERSION 8) Assisted-by: Antigravity (Gemini 4)
Contributor
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The direct DXIL translator sets TG_SIZE's wave count to
threads / lanes. A compute group that is not a whole number of waves therefore reads one wave too few. 96 threads in wave64 give 1 where the console, and the HLSL path, give 2. Found by running #1934'sXCL_DXIL_DIFF=1mode (comment there): HLSL and direct differed in all 96 stored words ofgpu_compute_tg_size_counts_a_partial_last_wave.What is in it
crates/xcl/src/gpu/dxil/kernel.rs: the wave count istotal.div_ceil(lanes), andTRANSLATOR_VERSIONgoes from 7 to 8 so cached kernels pick up the change. Direct DXIL: lower i64 min/max as compare/select #1946 and Direct DXIL: fix compute init and metadata #1952 also bump it to 8, so whichever merges later takes the next number.crates/xcl/src/gpu/recomp/tests.rs:gpu_compute_tg_size_counts_a_partial_last_wavebuilds its kernel throughdirect_or, so withXCL_DIRECT_DXIL=1it runs the direct translator. Until now it compiled only the HLSL path. The test's expectations are unchanged.Tested
NVIDIA GeForce RTX 3070 8 GB (32-lane waves, split wave64), driver 616.56; Windows 11 Pro 26100; Rust 1.100.0 MSVC; debug; on
main95ae589.gpu_compute_tg_size_counts_a_partial_last_wave: passes with and withoutXCL_DIRECT_DXIL=1. With thekernel.rsline reverted andXCL_DIRECT_DXIL=1it fails:left: 1, 96 threads, wave64, thread 0.XCL_DIRECT_DXIL=1 cargo test -p xcl --lib -- gpu_ --skip gpu_sparse_vram --test-threads=4: 110 passed, 0 failed, 1 ignored (the same asmain). The sparse test was skipped because of Direct DXIL: split wave64 uses a group barrier for 1-wave groups – GPU hangs in parallel test runs on NVIDIA (RTX 5070) #1727.cargo test -p xcl --lib -- gpu::dxil --test-threads=4: 101 passed, 0 failed, 3 ignored.Regression run
The change is one constant in the direct translator's compute prologue; the HLSL path is unchanged. Run by eizispark on an AMD Radeon RX 9070 XT (RDNA4), 60 s,
main20cf130and this head415fc5e(their report is in the comments):main:
PR:
Not tested
AI use
🤖 Generated with Claude Code