Repository navigation
Conversation
…-oom dxil: eliminate giant-shader IR and CFG blowup in FormatLoad and multi-window memory
The direct compute path bypasses DXC and its cached-only check. Defer after a translated-cache miss so async creation can return a stand-in. Translate or fall back when the PSO build runs. On an RTX 5060 Ti with a warm driver cache, synthetic p95 CreateComputePipelineState fell from 2.02–2.12 ms to 0.40–0.41 ms. Immediate first bind rose from 9–13 us to 1.81–2.08 ms. Assisted-by: Codex (GPT-6.2 Sol)
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.
Part of xcl-dev#1269. On a translated-cache miss, direct DXIL compute translation now defers during the cached-only probe. This lets async
CreateComputePipelineStatereturn a stand-in while keeping RAM and disk cache hits inline. Basemaincommit:4178e888c0b5be50a2887eda45cdb832763b68a4.What is in it
pso.rscallsdxc::defer()after the translation cache lookup and before direct compute translation.gpu_compute_e2e.rsexercises probe, cache, bind, and HLSL fallback behavior with synthetic shaders and GPU readback.README.mddocuments async direct compute support.Tested
x86_64-pc-windows-gnu).cargo test --workspace -- --test-threads=4viascripts/test.ps1on03d321d: 892 passed, 0 failed, 42 ignored. GPU skips reported by the harness: two native wave64, one heap windows.XCL_SAMPLE_*unset.cargo test --release -p xcl --test gpu_compute_e2e direct_compute_pso_cached_only -- --exact --nocapture: 1 passed with no skips. The cold probe and cold creation assertions both failed onmainwith the same test.CreateComputePipelineStatereturn fell from 2.02–2.12 ms to 0.40–0.41 ms. Time to the real PSO rose from 2.02–2.12 ms to 2.51–2.60 ms. Immediate firstSetPipelineStaterose from 9–13 µs to 1.81–2.08 ms.Regression run
@vitor127wt ran the independent retail smoke pair on Linux under Proton using
scripts/linux/smoke.shfrom #257. Both runs used the same title, 150 seconds,XCL_DIRECT_DXIL=1,XCL_HEAP_WINDOWS=1, and default lazy PSOs.The main run showed 2,126 frames and the PR run showed 1,822 frames (−14.3%). Linux cgroup peak memory rose from 14.72 GiB to 15.70 GiB. Both runs exited normally with zero crashes, device removals, or OOM kills. All 24 matching compute cache keys had byte-identical DXIL, with zero HLSL fallbacks.
The blocks below preserve the report's measurements and use the anonymized title identifier
9cc6a39e. Wine reportedpeak commit: 0 MBfor both runs. The Linux cgroup peaks are a separate measurement. This is one pair under Proton with default lazy PSOs, so the cause of the lower frame count is undetermined. Maintainer confirmation is pending on whether the Proton smoke pair satisfies the Windowsscripts/smoke.ps1requirement.main:
PR:
Follow-up with
XCL_LAZY_PSO=0In the updated independent report, @vitor127wt reran the same title and settings under Proton with
XCL_LAZY_PSO=0on both revisions. Each attempt used a fresh prefix and empty cache. The memory scope was capped at 16 GiB with no swap.main(4178e88)0x3at 100.915 smainretry (4178e88)0x3at 101.073 s03d321d)0x0after 150 sBoth baseline attempts logged the same stack through
d3d12core.dll+0x87333andwinevulkan.dll+0x11050. The early exits prevented the smoke script from producing end-of-run summaries or blocks formain. The PR's last active present interval ended at 124.035 s. The PR reached the cgroup cap and completed with zero OOM kills, crashes, or device removals.The PR logged 117 direct compute translations and zero HLSL fallbacks. For each baseline attempt, all 100 shared compute cache keys had byte-identical DXIL. The different run lengths and frame-count sources prevent a like-for-like 150 s frame or FPS comparison. The cgroup peaks cover different amounts of runtime work. The cause of the baseline exits and of the higher PR memory peak remains open. The standalone follow-up block is in the linked report. The paired blocks above are from the original default-lazy run.
Not tested
scripts/smoke.ps1on native Windows. The Proton follow-up did not yield a completed 150 s baseline withXCL_LAZY_PSO=0.AI use
Mirror of xcl-dev#1788 (auto-synced, do not edit).