Skip to content

perf(agc): optionally prefetch compute pipelines off the queue - #10400

Closed
daviaaze wants to merge 2 commits into
boykopovar:mainfrom
daviaaze:pr/async-compute-prefetch-2
Closed

daviaaze wants to merge 2 commits into
boykopovar:mainfrom
daviaaze:pr/async-compute-prefetch-2

Conversation

@daviaaze

@daviaaze daviaaze commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Status

Superseded by upstream commit dd3a510bb2, present in main b44265efb6. The existing library-prebuild pool already prepares resolved compute dispatches with single-flight cache ownership. This PR remains closed to avoid a duplicate worker pool. The capture-fixture count-cap correction is retained in #10389.

Summary

  • Add opt-in APS5_PARALLEL_COMPUTE_COMPILE=1 to queue registered compute pipeline preparation before first dispatch. The pipeline cache remains the owner/singleflight for the final Vulkan pipeline; when disabled, avoid prefetch bookkeeping.
  • Keep the switch default off. This changes timing of pipeline construction, not shader semantics or GPU work ordering.
  • Remove the compute-capture fixture's arbitrary maximum of 12 generated variants; outputs, full identity and replay assertions remain. Upstream current main produced 14 valid variants, so the count cap made the test flaky on valid input.

Validation

  • RelWithDebInfo build, ANYPS5_ENABLE_SPIRV_TOOLS=ON.
  • 59 focused compute-pipeline, graphics, recorder, shader and SPIR-V CTests passed on the rebased branch. Khronos validation enabled; 0 VUID/validation errors.
  • Existing fixture evidence records worker-thread pipeline construction and expected GPU counter; this PR makes no gameplay/FPS improvement claim.

The option remains opt-in pending title-level performance and shutdown-lifetime validation.

Extracted from perf/parallel-compute-compile at f02214f; original history preserved. No same-scene game performance claim.

(cherry picked from commit d448d5852a127c4c53083ab2532d1856c1e02580)
@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 23, 2026
@github-actions

Copy link
Copy Markdown

This pull request is labeled perf, so it needs the summary line of a capture on main and one with the change, from the same title, scene and machine, as the Performance report form asks. Please paste both aps5-summary.jsonl lines, attach the two traces and add the output of tools/trace_digest.py.

@github-actions github-actions Bot added the open PR limit Closed over the open PR limit: 1 without merged PRs, 20 with at least 1, none from 20 label Oct 23, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

@github-actions github-actions Bot closed this Oct 23, 2026
@daviaaze

Copy link
Copy Markdown
Contributor Author

@adriadam10 #9961 has now merged, satisfying the first-merged-PR requirement. Could a maintainer please reopen this PR, which was automatically closed for the open PR limit? Both the CLI reopen operation and REST update were rejected by GitHub, so I cannot reopen it directly. I am refreshing the branch and verification against current main. AI-assisted: yes.

@daviaaze

Copy link
Copy Markdown
Contributor Author

Update after checking current upstream main (b44265efb6): this proposal has been superseded by dd3a510bb2 (perf(agc): add VulkanDevice::PrebuildComputePipeline and prebuild resolved dispatches). Current Dispatch already schedules resolved compute pipelines on the existing library-prebuild worker pool, and computePipeline shares in-flight builds through its future cache. Reapplying this proposal would add a second pool scheduling the same preparation at the same dispatch site, with no demonstrated additional benefit. Please disregard my reopening request above; we will keep this PR closed rather than reintroduce redundant infrastructure. The separate capture-fixture upper-count correction is being carried with #10389. AI-assisted: yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open PR limit Closed over the open PR limit: 1 without merged PRs, 20 with at least 1, none from 20 perf numbers missing perf pull request without a before and after summary line perf Performance change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant