Skip to content

perf(agc): time compute pipeline creation - #6896

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:perf/compute-pipeline-timer
Oct 19, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
milescoviello:perf/compute-pipeline-timer

Conversation

@milescoviello

@milescoviello milescoviello commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What

Traces (APS5_TRACE_SECONDS, APS5_TRACE_FRAMES) and frame timing name graphics pipeline builds (Vulkan.GraphicsPipeline, ...Library, ...Link, ...Prebuild), but not compute pipeline builds. VulkanDevice::createComputePipeline, which dispatches and the pipeline journal's replay both use, had no timer. A dispatch that compiles its pipeline therefore showed up as Driver.Dispatch time with nothing under it, and tools/trace_digest.py could not say where it went.

MXGP 26 (PPSA30839) is an example, on Linux/NVIDIA with the PRs it needs to get this far (#6814, #6094, #6160). In a 10 s window 120 s in, the title presented 2 frames. Driver.Dispatch took 8.9 s across the two queue workers, and 5.3 s of that was under no slice. Its longest dispatch took 2.9 s, of which recording took 1.1 ms. gdb samples during the stalls found the worker inside createComputePipeline, in NVIDIA's compiler.

This adds PerformanceTimer timing("Vulkan.ComputePipeline") at the top of createComputePipeline, as Pipeline's constructor has for graphics.

Tested

Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99.02).

Build Driver.Dispatch in the window under no child slice largest child slice
without this change 8,859 ms (1,777 dispatches) 5,332 ms Resources.Prepare 1,930 ms
with it 41,782 ms (1,853 dispatches) 86 ms Vulkan.ComputePipeline 38,148 ms

The summary line's top_phases_ms_per_frame now lists Vulkan.ComputePipeline (38,148 ms of a 40,912 ms frame).

  • On main 66e290f: the 7 tests matching journal|performance_trace|compute_pipeline pass 3 of 3. The 501 tests matching ^agc_driver_|^agc_vertex_barrier|recompiler|shader_cache|request_serializer|spirv|^agc_shader|bda|journal pass except agc_driver_store_over_untracked, which fails on main too.

When no trace or frame timing is active, the timer only checks whether one is, as the other timers do. A pipeline build costs milliseconds to seconds, so this is negligible.

@LeandroLP23 ran it on Windows 11 with an AMD Radeon 860M (RDNA 3.5, driver 32.0.13058.8001) (comment), in one build of main 6efb726 with this PR and six other pull requests: it builds cleanly and agc_driver_store_over_untracked passes 3 runs of 3.

Not checked: macOS, Intel (the change is platform-independent).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Unblocks: none (diagnostics)
  • GPUs tested: NVIDIA GeForce RTX 4070 Ti, driver 595.99, Ubuntu 24.04; AMD Radeon 860M, driver 32.0.13058.8001, Windows 11 (tests, by @LeandroLP23)
  • AI-assisted: yes

🤖 Generated with Claude Code

VulkanDevice::createComputePipeline, used by dispatches and the pipeline
journal's replay, had no PerformanceTimer, so a dispatch that compiles its
pipeline showed up in traces and frame timing as Driver.Dispatch time with
no slice under it. It is now Vulkan.ComputePipeline, as graphics pipeline
builds already are Vulkan.GraphicsPipeline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LeandroLP23

Copy link
Copy Markdown
Contributor

AMD on Windows run. Radeon 860M (RDNA 3.5, driver 32.0.13058.8001), Windows 11 26300, WinLibs GCC 15.2.0 r7, Release, BUILD_TESTING=ON. Build: main 6efb7261b with #7524, #7006, #6612, #6929, #7119, #6896 and #6856 merged together (each merge clean, built once).

The build is clean and agc_driver_store_over_untracked passes 3 runs of 3.

AI-assisted

@milescoviello

Copy link
Copy Markdown
Contributor Author

Thanks @LeandroLP23 for the AMD run on Windows. I added it to the description.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added perf Performance change perf numbers missing perf pull request without a before and after summary line labels Oct 18, 2026
@adriadam10 adriadam10 self-assigned this Oct 19, 2026
@adriadam10
adriadam10 merged commit ea3e930 into boykopovar:main Oct 19, 2026
9 checks passed
@adriadam10

Copy link
Copy Markdown
Collaborator

Checked the one-line timer in createComputePipeline against the other PerformanceTimer uses in the file (header already included, no behaviour change, applies cleanly on current main); merged.

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

Labels

agc libSceAgc* 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.

3 participants