perf(agc): time compute pipeline creation #6896
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/6896"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-16T17:03:27Z.
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 asDriver.Dispatchtime with nothing under it, andtools/trace_digest.pycould 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.Dispatchtook 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 insidecreateComputePipeline, in NVIDIA's compiler.This adds
PerformanceTimer timing("Vulkan.ComputePipeline")at the top ofcreateComputePipeline, asPipeline's constructor has for graphics.Tested
Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti (NVIDIA 595.99.02).
APS5_TRACE_SECONDS=120:10, pad input. Both runs usemain+ #6814 + #6094 + #6160; the second also has this change and a cold cache:Driver.Dispatchin the windowResources.Prepare1,930 msVulkan.ComputePipeline38,148 msThe summary line's
top_phases_ms_per_framenow listsVulkan.ComputePipeline(38,148 ms of a 40,912 ms frame).main66e290f1c: the 7 tests matchingjournal|performance_trace|compute_pipelinepass 3 of 3. The 501 tests matching^agc_driver_|^agc_vertex_barrier|recompiler|shader_cache|request_serializer|spirv|^agc_shader|bda|journalpass exceptagc_driver_store_over_untracked, which fails onmaintoo.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
main6efb7261bwith this PR and six other pull requests: it builds cleanly andagc_driver_store_over_untrackedpasses 3 runs of 3.Not checked: macOS, Intel (the change is platform-independent).
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-18T17:10:45Z.
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:main6efb7261bwith #7524, #7006, #6612, #6929, #7119, #6896 and #6856 merged together (each merge clean, built once).The build is clean and
agc_driver_store_over_untrackedpasses 3 runs of 3.AI-assisted
Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-18T18:46:08Z.
Thanks @LeandroLP23 for the AMD run on Windows. I added it to the description.
AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-19T17:37:29Z.
Checked the one-line timer in
createComputePipelineagainst the otherPerformanceTimeruses in the file (header already included, no behaviour change, applies cleanly on current main); merged.