Repository navigation
Conversation
|
A first AMD run, on native Windows: the split form forced on 64-lane hardware, and the native path. Tested
Not tested
AI use
|
|
Hardware check of Tested
Regression run PR ( Not tested
AI use
|
|
Update for head AMD run with native 64-lane waves, plus NVIDIA. Updated for head Tested: pass, head
Not tested: retail gameplay; performance. Note: these runs check that the translated HLSL matches the test's reference model, in 64-lane and in 32-lane waves. They cannot show that the model matches the hardware. AI use: Claude Code (Claude Opus 5.5) ran the tests on this machine and wrote this report. |
|
Linux / AMD RDNA3 datapoint. Merged state: head Full suite, Not tested: retail titles (none here), Windows, RDNA4. Machine: RX 7900 XT (RADV NAVI31), Mesa 26.2.5, kernel 7.2 (Arch), Proton Experimental (wine-11.0), patched vkd3d-proton v3.1, Rust cross AI use: Hermes agent (local Qwen-class) ran the suite and drafted this; I checked it before posting. |
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti; Rust stable MSVC, debug; DXC 1.8.2502.11.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
pvfreis
left a comment
There was a problem hiding this comment.
Review of e7199ca (merge base 09940bb), by reading the code; nothing was built or run here. I checked that each batched read sees what the unbatched xcl_x_rla_uniform sequence would (lane indices, first_lane(exec) and the reads are all computed before the first SGPR write, emit.rs:972-990; dependent reads split the batch, :890-937), and that the GPU test compares against independent values. No defect found.
Questions for the author
- For a program whose exchange slot was 1 before, the larger
XCL_X_SLOTmovesXCL_X_LDS_TOPdown (emit.rs:4345): for a 1024-thread group from word 8094 to 7902 (arithmetic), and LDS accesses above the top are clamped onto it. Did the shader-pack scan check that no LDS-using program reaches between the old and new top? - Which command produced the exchange counts and the DXC/PSO times, so they can be rerun on another pack? (18,049 + 1,281 is 19,330; the description says 19,334.)
Review by Claude Code (written by Claude Opus 5.5, second read by Claude Fable 5.2); each point checked by a person before posting.
|
Thanks for the code review! Answering both questions:
AI use: Antigravity (Gemini 4 Neon) helped draft this reply from the code and measurement logs. |
|
Thanks, that answers both (and the 4 are the mesh shaders, understood). On the LDS top: since the scan checked translation and compilation rather than the LDS offsets programs reach at run time, the cap you describe (no batching beyond today's slot size when On the numbers: the harness could live in the tree as an Reply by Claude Code (Claude Opus 5.5); checked by a person before posting. |
|
Tested on NVIDIA Blackwell: this PR's head
Since #798 the exchange this PR removes is also the bounded-spin one in one-wave groups, which costs about Not tested
AI use
|
|
How much the batching saves on NVIDIA, since nobody has timed it yet. A local benchmark (not for a PR,
So four reads in a row run about 3x faster, and a lone read is unchanged. The wave64 output of every case Tested
Not tested
AI use
|
e7199ca to
e6a94f5
Compare
|
Follow-up on the LDS cap at head I added a synthetic 512-thread translation regression locally. It fails on the PR head ( Suggested bound: classify possible guest LDS use over the decoded program before emitting instructions, then keep lane-read batching at the existing one-word slot for that class at every group size. Exclude AI use: Codex (GPT-6.2 Sol) reviewed the source, wrote and ran the synthetic regression and local guard, and drafted this comment. |
|
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
Thanks! — Devin |
e6a94f5 to
e22a0a6
Compare
|
Rebased onto current
Full workspace suite on |
|
Independent Windows/NVIDIA check of #944 head
This verifies the current head's test behavior on this adapter. I did not repeat the earlier shader-corpus timing or run a retail title, so I cannot confirm the current head's compile-time gain or retail behavior. AI use: Codex (GPT-6.2 Sol) inspected the revision, ran the tests, and drafted this report. |
|
merge-check claim |
|
merge-check |
|
merge-check claim |
|
merge-check |
|
No open or merged PR makes the same change for the HLSL path. #2343 (same author) is the direct-DXIL counterpart ( AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
merge-check |
In split-wave64 mode (two hardware wave32 halves per console wave64), consecutive independent
v_readfirstlane_b32andv_readlane_b32instructions (for example, 4-dword V# or 8-dword T# descriptor waterfalls in wave64 mesh and compute shaders) previously each emitted a separatexcl_x_rla_uniformcall — inlining a full cross-halfxcl_x_meet()barrier/spin-wait exchange per instruction.PRELUDE_X64already supports multi-word exchanges (xcl_x_put(i, ...)/xcl_x_meet()/xcl_x_get(i), as used by coherents_load_dwordx4andds_bpermute). This batches consecutive dependency-freev_readfirstlane_b32/v_readlane_b32instructions inside each basic block into a single multi-wordxcl_x_meet()(sharing onefirst_lane(exec_lo, exec_hi)call across the batch), reducing DXIL size, DXC compile time, and NVIDIA driver (nvgpucomp64.dll) pipeline compile time. Native wave64 and wave32 HLSL are unchanged, and this is orthogonal to #917 (v_writelane_b32spill shadows).What is in it
crates/xcl/src/gpu/recomp/emit.rs:Em::emit_instsfor consecutive plainv_readfirstlane_b32/v_readlane_b32instructions within a basic block. Splits on any SGPR/EXEC read-after-write dependency, skips reads already resolved byupper_lanes, and caps batch width at(64 / waves).clamp(2, 8)so per-wave exchange storage stays<= 256dwords (1 KiB).Em::configure_round_modes(may_use_lds) for guest LDS use (Mode::Geometry(_)or anyENC_DSinstruction other thands_swizzle_b32/ds_bpermute_b32withGDS == 0), and keep lane-read batching at the existing 1-word slot (XCL_X_SLOT 1u) for those programs at every group size soXCL_X_LDS_TOPis never shrunk into guest LDS space.crates/xcl/src/gpu/recomp/tests.rs:split_wave64_readlane_batching_rules: covers 4-word batching, SGPR andEXECdependency splits, jump-target splits, 64- and 1024-thread slot caps, and native wave64 invariance.split_wave64_readlane_batch_preserves_guest_lds_top: 512-thread regression verifying that 8v_readfirstlane_b32beforeDS_WRITE_B32keepXCL_X_SLOT 1uandXCL_X_LDS_TOP 8142u, whileDS_SWIZZLE_B32still batches (XCL_X_SLOT 8u).gpu_split_wave64_batched_readlanes: GPU test verifying upper-half active lanes, mixed lower/upper lane batches, SGPR dependency split, andEXEC-modifying split.Across 10,447 wave64 CS/MS programs in a retail shader pack (measured pre-rebase), this removed 19,334
xcl_x_meet()exchanges (18,049 from consecutivev_readfirstlane_b32and 1,281 from consecutivev_readlane_b32).Measured on four retail wave64 shaders on
origin/main(09940bb) -> pre-rebase commit (e7199ca) (RTX 3060 Ti, DXC 1.9.2609.5):75 -> 25(-66.7%), DXIL345.6 -> 332.2 KB(-3.9%), DXC4549 -> 3853 ms(-15.3%), cold PSO7149 -> 6191 ms(-13.4%)258 -> 101(-60.9%), DXIL328.4 -> 279.7 KB(-14.8%), DXC7865 -> 5366 ms(-31.8%), PSO5551 -> 5409 ms(4481 ms first cold run)310 -> 131(-57.7%), DXIL426.7 -> 382.3 KB(-10.4%), DXC10468 -> 8867 ms(-15.3%), PSO9406 -> 8077 ms(-14.1%)505 -> 361(-28.5%), DXIL1028.9 -> 994.8 KB(-3.3%), DXC25564 -> 22523 ms(-11.9%), PSO24487 -> 21444 ms(-12.4%)Tested
x86_64-pc-windows-msvc), debug + release.origin/main(b49be183).cargo test --workspace -- --test-threads=4one22a0a6: 1438 passed, 0 failed, 47 ignored across 37 test binaries (29 runtimeSKIPPEDnotices from adapter-gated tests); all three tests (split_wave64_readlane_batching_rules,split_wave64_readlane_batch_preserves_guest_lds_top,gpu_split_wave64_batched_readlanes) ran and passed.Regression run
main:
PR:
Not tested
split_wave64is false there so emitted HLSL is unchanged).e7199ca; shaders without guest LDS are unaffected).AI use