Repository navigation
Conversation
|
Tested: current PR head merged onto current No Linux/Wine report in the thread yet; adding one.
Not tested: retail titles (no title data on this lane, counts only). AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting. |
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.
What is in it
Follow-up to #2203 addressing @tiagonleal's
XCL_PER_LANE=1memory-spike report on giant compute programs (such as56c0cd3b82a00c6e):56c0cd3b82a00c6e(488,744 B guest code, 14,377 blocks) became accepted byrecomp::lower_dxil::compute_with. Because the per-lane form has no compact loop-switch lowering, it emitted 4,563,088 B of plain DXIL (9.5× larger than gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426's 478,764 B compact form), causing the NVIDIA driver compiler to spike +18 GiB RAM and OOM.crates/xcl/src/gpu/recomp/lower_dxil.rs:MAX_INSTS = 20_000(matchingdxil::compact::large's 20,000-instruction threshold): checked right after decode before spawning the 256 MB worker thread or constructing IR, so giant programs immediately fall back to gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426's compact form.MAX_DXIL_BYTES = 1 << 20(1 MiB): post-lowering safety cap incompute_with(all 39 normal per-lane compute shaders in the 2,000-program sample are<= 197 KB).lower_dxil.rsadvancesXCL_PER_LANE_SOURCE_IDautomatically so any cached multi-megabyte per-lane entries are invalidated on disk.compute_with_refuses_giant_programs_for_compact_fallbackcovering both caps.Impact:
56c0cd3b82a00c6ewith--direct --lanes --split 1: immediately refused ("program too large for the per-lane form") and translated via gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426 compact form (478 KB DXIL instead of 4.56 MB DXIL; total sweep time 0.7 s vs 3.2 s).--direct --lanes --split 1 --sample 2000 --max-bytes 0): all 39 / 205 normal per-lane compute shaders continue to translate (0 regressions); 4 giant compute programs (>= 20,000instructions) are routed to gpu: direct RDNA2 -> DXIL backend (no HLSL / DXC), behind XCL_DIRECT_DXIL #1426's compact form.Tested
rustc 1.100.0, DXC /dxil.dll1.9.2602.17, debug & release builds.cargo test --workspace -- --test-threads=4: 1273 passed, 0 failed, 46 ignored (SKIPPED: 20 native wave64 GPU tests on 32-lane NVIDIA GPU, 3 pre-existing f16/f32-to-f16 per-lane refusals, 1 driver-cache test without Windows Developer Mode, 1 heap-window test, 1 D3D12 debug-layer test, 2 other adapter-gated skips).xcl shaders <pack> --direct --hash 56c0cd3b82a00c6e --lanes --split 1: refused by per-lane (program too large for the per-lane form), compact form 478 KB DXIL, 0 errors.xcl shaders <pack> --direct --lanes --split 1 --sample 2000 --max-bytes 0: 39/205 per-lane compute programs unchanged, 4 giant compute programs capped, 0 validator/panic errors.Regression run
Baseline (
main568e7db):PR (
92437bd, run withXCL_PER_LANE=1):Not tested
XCL_PER_LANE=1(verified via single-hash56c0cd3b82a00c6erouting to compact form + 60-secondXCL_PER_LANE=1smoke run).AI use
56c0cd3b82a00c6eand the 2,000-program per-lane size distribution, implementingMAX_INSTS/MAX_DXIL_BYTESand the unit test inlower_dxil.rs, and running the test and smoke suites.