Repository navigation
Conversation
…port window into the small ranges after it A buffer bound from inside a range larger than the import window, over the ranges that follow it, is joined into one import when those ranges together are no larger than the window. Before, such a buffer was copied on the CPU on every bind, and the copy waited for any GPU work pending over the region.
✅ NVIDIA GPU test: passedPR head
Unstable on main (2, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (3, not counted against this PR)Validation IDs already present on main (8 IDs in 531 tests)Skipped (50)ReproduceAutomated build and test on a contributor's NVIDIA machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
|
Hi mrfelek, The large-first join regression passes with this head and fails at its new join assertion with main's production source. The supplied traces also corroborate the reduction in memory-wait time. To qualify the performance result for
On #5372: thanks for planning the exemption if it lands first; nothing else is needed there now. This is an evidence qualification request; no additional implementation change is identified by the source review. |
|
@oneandonlydean thanks. Here are the three items. 1. Fetchable refs. These are tags on the fork:
2 and 3. A plain warm-cache A/B on current
The frame p50 goes from about 142 to 122 ms on the 3080 Ti and from about 313 to 284 ms on the 780M. GPU busy per present stays about the same (80.7 → 79.1 ms, and 220 → 215 ms). So the gain doesn't depend on #11346. It holds on plain Differences from a fully clean run:
Summary records, last window of each run: RTX 3080 Ti (A1, B1, A2, B2)Summary records, last window of each run: Radeon 780M (A1, B1, A2, B2)AI-assisted. |
✅ AMD GPU test: passedPR head
Unstable on main (1, these also failed in recent main runs on this machine; not counted against this PR)Failing on main too (7, not counted against this PR)Validation IDs already present on main (8 IDs in 544 tests)Skipped (58)ReproduceAutomated build and test on a contributor's AMD machine; it does not replace upstream CI. A new comment is posted for each new push. Full logs. |
What
A buffer bound from inside a registered range that is larger than the import window, running into the ranges after it, had no import:
importRunBoundsreturns the containing range alone, because it is larger than the window, sorunCoversfails at its end andimportAccessreturns beforeimportAllocation.joinedRun(theimportJoinedpre-pass inUploadFinish) joins only when every range in the run is larger than the window, or when the binding starts at the run's base.So such a buffer was copied on the CPU on every bind, and the copy waited for any GPU work pending over it.
joinedRunnow also returns the run when its first range is larger than the window and the ranges after it are, together, no larger than the window. The part a join adds beyond the large range stays within one window. The host-imports entry indocs/dev/debt/libSceAgcDriver.mdgains one clause for this case.PPSA22408 (Hot Wheels Infinite Rush) hits this every frame in its garage menu. A dispatch's build reads a 648,000-byte buffer that starts inside a 12 MiB range and ends 123 to 189 KiB into the 2 MiB range after it (same flags, no gap), while GPU work is pending over it. The CPU copy in
GuestBufferMemory::copyRegion, underUploadFinish, waited about 16 ms per frame in a pending-write sync.Overlap: #5372 changes the same line of
joinedRun(run.bytes <= window). The two conditions are disjoint: #5372's holds only when the whole run fits the window, this one only when the first range alone is larger than it. #5372 also adds a cap inimportJoinedthat refuses a widened run larger than the window unless the old rule gave the same run from its first range's start, and that cap would refuse this case. If #5372 lands first, I'll rebase this and exempt the case from the cap. No other open PR changesjoinedRun(#6197, #6918, #7457 and #10442 touch the import code around it).Tested
Unit test (
agc_driver_graphics,BdaResources.cpp, next toimportJoinTests): 128 KiB window, a 192 KiB range followed by 64 KiB ranges.joinedRunline removed, the suite fails ata buffer bound from inside a range larger than the import window into the small range after it was not imported over both.Focused suites:
agc_driver_graphics,agc_driver_recorderandagc_driver_host_import_{at_map,proofs,teardown,windows}, onmain1c8c0efc8cand on this head, both GPUs below.VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validation,ANYPS5_REQUIRE_VULKAN=1andANYPS5_NO_SHADER_CACHE=1: 6 of 6 pass on each side, noVUID-messages on either side, no missing-layer line.tools/check_conventions.py --base origin/mainpasses.PPSA22408 garage menu: Linux 7.3, Ryzen 9 5950X, RTX 3080 Ti (NVIDIA 615.71.09), 3840x2160, the game's default settings, the same input route into the garage each run.
main1c8c0efc8c+ fix(agc): run an indirect buffer as it is when execution reaches it #11346 (4143f1b4a0), the stack this title's garage runs on. This PR does not depend on fix(agc): run an indirect buffer as it is when execution reaches it #11346. A =a14e471883, B =d8ccb992ac(A + this head).APS5_TRACE_SUMMARY_EVERY=10andAPS5_PROFILE_GPU=1.APS5_TRACE_SECONDS=150:10 APS5_TRACE_EVENTS=2097152, no otherAPS5_TRACE_*/APS5_PROFILE_*. The game's output went to a file (headless run).Traces: A · B
Summary lines (aps5-summary.jsonl)
trace_digest.py
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)AI-assisted.