Recompiler: add an opt-in thread-limit mask for direct compute #3015
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3015"
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?
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-27T12:21:18Z.
Stacked on #2610 (review only the last commit)
What is in it
Add an opt-in direct-DXIL compute entry that masks lanes outside the requested thread dimensions. It ballots the per-axis bounds after the existing padding mask and intersects the result with EXEC. #2610 supplies the rounded dispatch counts and thread limits. The runtime selection will use this entry for partial groups in a follow-up.
Related: #1751 (BVH rehydration passes issue thread-dimension
DispatchXwith partial last groups), #1833 (world-load roadmap).Why
A 200-second diagnostic run counted 2,999 partial-group dispatches in 3,009 thread-dimension
DispatchXcalls, across four pipelines in the last logged sample. The first appeared at world load. The unguarded-store test shows how extra lanes can write past the requested extent and checks that the mask suppresses them. The ordinary entry emits byte-identical DXIL. This translator source change triggers a one-time rebuild of existing direct-DXIL cache entries.Tested
All at this head,
1208606b, release.SKIPPEDhere.cargo build --workspacepassed.cargo test --workspace --no-fail-fast -- --test-threads=4(XCL_NETWORK=0, RTX 5090): 1,430 passed, 4 failed, 47 ignored, 27 SKIPPED. The 4 failures are the knownfuzz_validate_and_gpu_0..3(#1905). The SKIPPED include the native-wave64 case on this GPU.Regression run
main(08db8020, the base under #2610 and this change; the same block as in #2610's description):This PR (
1208606b):Both: the retail title,
-Seconds 200, RTX 5090, a copy of the same precompiled cache, the same scripted input to the world load, full-size frame dumps. Themainrun used a never-used exe name; this head's run reused a warm one. The ordinary compute translation is unchanged (byte-identical DXIL) and the masked entry is not selected yet, so this is a regression check only.AMD testing requested
On an AMD adapter with native wave64, run this from the branch in PowerShell with DXC available.
Please share the adapter, driver and result, including whether
dispatchx_native_wave64_masks_excess_lanesran without aSKIPPEDline.Not tested
In-title behavior and first-use compile timing are for the runtime follow-up.
AI use
Codex (GPT-6.2-Sol) wrote the change, tests and description. Claude Code (Claude Opus 5.5) ran the independent validation on both adapters and the smoke pair.
🤖 Generated with Claude Code
https://claude.ai/code/session_013oPUFCA9W9F8Qb5MPK33bR
Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-28T16:16:26Z.
Closing this together with #2610, which it was stacked on:
mainhandles DispatchX thread limits inline now (bmjask'sd9403543and #3157), a different design from this opt-in mask. Thank you @bmjask.Nobody tested this one on its own. The masking question was answered on #2610 and #3066, by jennydeth, minimalhipster990 and CharlyRien. Thank you for that.
The one gap left on
main: the opt-in per-lane path still ignores the thread limits.AI use: an agent swarm: Claude Fable 5.2, Claude Opus 5.5, GPT-6.2-Sol and Gemini 4 Neon.
Pull request closed