Repository navigation
Conversation
A bind of a pipeline that is not built yet waits in resolve_wait, and builds it itself when no worker has started it - until it is built unless XCL_PSO_WAIT_MS sets a limit (xcl-dev#891), and with no trace in the log. On an NVIDIA GPU a retail title's threads sat there for 3 - 23 s at a time in the driver's compiler; it took a profiler of the title's threads to see it, and the title's hang watchdog ended the run (xcl-dev#505, xcl-dev#675). resolve_wait now counts the calls that found their pipeline not built, for graphics and compute apart: how many, their total and longest time, and how many built it in the call. A wait with a limit is counted with the time it waited; a late pipeline's later binds, which do not wait, are not. The counts are logged at every power of two, and each wait of a second or more is logged (the first 32). Nothing else changes. Measured with it on that title (RTX 5080, XCL_NETWORK=0, 240 s): 16 compute binds built their pipeline in the call, 92.7 s in all, the longest 22.7 s; no graphics bind waited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
Author
|
Upstream PR xcl-dev#899 was closed or merged. |
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.
A bind of a pipeline that is not built yet waits in
resolve_wait, and builds it itself when no worker has started it – until it is built unlessXCL_PSO_WAIT_MSsets a limit (xcl-dev#891), and with no trace in the log. On an NVIDIA GPU the retail title of xcl-dev#505 had its threads sit there for 3 – 23 s at a time in the driver's compiler; it took a profiler of the title's threads to see it, and the title's hang watchdog ended the run (xcl-dev#505, xcl-dev#675). This counts those waits and logs them, so a run's log says whether pipeline builds held the title up. Nothing else changes. Part of xcl-dev#505.What is in it
crates/xcl/src/hle/d3d12x/pso_async.rs:resolve_waitcounts the calls that found their pipeline not built, graphics and compute apart – how many, their total and longest time, how many built it in the call (blocked()). Logged at every power of two:pipelines waited for at a bind so far: N graphics (… ms, longest … ms, … built in the call), M compute (…); each wait of a second or more is logged on its own (the first 32). Tests:a_wait_that_builds_the_pipeline_is_counted_with_its_time,a_bounded_wait_is_counted_with_the_time_it_waited.mainwith D3D12.X: XCL_PSO_WAIT_MS bounds how long a bind waits for a pipeline being built (retail world renders) xcl-dev/xcl#891: a wait withXCL_PSO_WAIT_MSis counted with the time it waited; the later binds of a late pipeline, which do not wait, are not.Tested
cargo test --workspace -- --test-threads=4on f3b7dd6: 729 passed, 0 failed, 41 ignored (SKIPPED:gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware– no wave64)XCL_NETWORK=0, 240 s, on main e50836b with this change (before the rebase):16 compute (92695 ms, longest 22694 ms, 16 built in the call),0 graphics, and a line for each long one (a compute pipeline held up its caller for 22694 ms (built in the call)); the watchdog ended the run at 125 s. With D3D12.X: compute pipelines are built ahead of their first bind xcl-dev/xcl#889 as well, the same run logged1 compute (2 ms …). IvyNotFound used it on D3D12.X: compute pipelines are built ahead of their first bind xcl-dev/xcl#889 the same way (second RTX 5080).Regression run
Both with
XCL_COHERENT_MB=4095(without it the window is 512 MB or 4 GB depending on the commit free at the start, #284), one after the other. main's run stood still at its end (0 presents in its last 6 s), with a higher peak commit; I did not look into why (likely cold shader compiles for that build, not checked). This change only counts and logs: it is not expected to make the title faster, and the PR's run shows it does not slow it down.main:
PR:
Not tested
XCL_PSO_WAIT_MSset (the bounded path is covered by the test only)AI use
Mirror of xcl-dev#899 (auto-synced, do not edit).