Repository navigation
feat(agc): add opt-in bounded submission progress - #7307
Conversation
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.
|
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for splitting this out. The mechanism reads as bounded and safe (timeout, prefix-only REWIND ack, flips/conditionals excluded), but a few things need fixing before it can merge:
- No measurement on current main. The PR body says the numbers come from a frozen integration binary with other PRs and local changes, and are "not current-main versus PR measurements". A performance change needs the main vs PR summary lines from the same machine and scene, with traces, as the PR template asks. Please add that (ideally with
APS5_SUBMIT_PROGRESSon and off on the same build), or say what the feature gives without the other patches. - Scheduler-dependent assertions in
tests/execution/SubmitProgress.cpp:89(ready >= 48of 64) and:122(prefixesReady >= 12of 16). The PR body notes they are sensitive to host scheduling; on shared CI runners and lavapipe they will flake. Keep the invariants that hold regardless of timing (no lost completion store, no early REWIND continuation, bounded return) and drop or loosen the readiness counts. - Technical debt placement.
docs/dev/debt/libSceAgcDriver.mdgets a new### Experimental submission progresssection at the top, which isn't one of the file's headings, and the text describes the feature rather than a gap. Keep only what is actually unverified or deviating (e.g. the 2 ms budget is a guess, no hardware validation across titles) as short lines under the existing headings.
|
Follow-up to this review: the rebased fixes are now pushed at
Clean 60-second lead-in / 120-second-window captures are now summarized in the PR body: main 1.377 FPS, PR-off 1.306, PR-on 1.445. All three traces are complete. This is one capture per arm and clean main reproduces black scenery, so these results do not establish a repeatable playable-performance gain. Raw traces remain local under the no-upload instruction; public raw-trace evidence is still outstanding. The earlier playable 12–14 FPS was observed in a combined local runtime, not this standalone PR: our #6759 and #6820, MichonGoddijn231849's #1191, local ownership work, and TheAggie's separate shader revision. Their individual/cumulative speed contributions were not isolated. The old short progress-off/on comparison held those other changes constant, but did not establish repeatability. The PR body now credits the combined runtime and distinguishes it from standalone evidence. The path remains off by default. No fresh cross-title, completed-race or extended stability acceptance is claimed for this rebased revision. |
544d5ae to
a2ca686
Compare
adriadam10
left a comment
There was a problem hiding this comment.
Thanks for the fixes: the readiness thresholds are gone, the debt line sits under ### Functional, and APS5_SUBMIT_PROGRESS is in ENVIRONMENT.md.
One point from the previous review is still open:
- No measurement on current main. The PR body still only has the frozen-integration numbers, which you say are not main-vs-PR. A performance change needs the main vs PR summary lines (feature off/on on the same build, same machine and scene) with traces, as the PR template asks. You mention these captures are in progress: please put them in the PR body when done (the Abyss black-scenery limitation is fine to state), or, if you can't get a clean pair, say so and reduce the description to what the mechanism does without a performance claim.
Once the body has that, this is ready to go through the merge queue.
|
The clean measurements are now complete and added to Tested → Clean-build timing captures in the PR description, following the latest review. Same machine and Abyss starting-grid setup, complete Release runtimes, warmed caches and separate restarts, 60-second lead-in followed by a 120-second capture:
All three traces report no dropped events. The description includes the The earlier playable 12–14 FPS observation came from a combined integration runtime containing #6759, MichonGoddijn231849's #1191, #6820, local ownership work and TheAggie's shader revision The review fixes are pushed at |
|
Thanks for clarifying the measurement requirements. We hadn’t understood that performance evidence needs a clean main-versus-PR comparison; our earlier numbers came from a combined integration runtime. We’ll keep this in mind for future PRs and compare equivalent builds on the same machine and scene, clearly separating integration observations from gains attributable to the individual change. |
|
@adriadam10 the last point in your change request (clean main-vs-PR numbers) now looks answered in the PR description on the current head (a2ca686). The off path is identical to |
a2ca686 to
7cab8fc
Compare
…guous Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
7cab8fc to
954bed0
Compare
|
Re-checked against current |
What
Add experimental, off-by-default
APS5_SUBMIT_PROGRESS=1pacing for eligible graphics-queue submissions. A guest that immediately polls a terminal GPU release can otherwise return from submit before its small batch is recorded, miss the release, and enter another sleep/poll cycle.An internal per-submission ticket acknowledges the recorded prefix and its actual recorder timeline. The submitting call shares a nominal two-millisecond budget between waiting for that acknowledgement and waiting for that specific timeline value. Expiry or an unavailable timeline retains asynchronous acceptance; neither reports GPU completion nor retires work. OS scheduling can overshoot the requested timeout. No whole-device wait, guest sleep change, exported API/NID change, or shader change is added.
Eligibility excludes flips, conditional ranges and unproven CP waits. A preceding nonpredicated literal memory write may prove a 32/64-bit wait's compared bytes using the existing PM4 comparison; the real wait still executes. Unknown writes and intervening GPU draw/dispatch work discard that proof. A final REWIND acknowledges only its finite prefix: its continuation and logical completion remain blocked until the guest releases them. Current-main queue-zero completion wakeups are retained.
This is a standalone extraction of the local SuperTuxKart PPSA69421 experiment. No resource-ownership, residency, selected-image-import, write-watch, game configuration or shader experiment is included. No dependency on our earlier PRs is needed.
Overlap: #6507 is now merged and its queue-zero behavior is retained after rebasing. #6867 remains separate work on waiting for shader preparations referenced by a submission; it is not included and is not a dependency.
Tested
Rebased onto upstream main
85029a00f526a80318dfd1ead199cf021a99236b; candidatea2ca686a7d06d1b00fd36af1f051c1ee1e4acab3.Windows 11 Pro 10.0.26200, Core i7-13700, 32 GiB RAM, NVIDIA RTX 4070 12 GiB, NVIDIA driver 610.88. GCC 15.2.0 (WinLibs MinGW-w64 UCRT), CMake/Ninja, Release,
BUILD_TESTING=ON,ANYPS5_ENABLE_SPIRV_TOOLS=ON,ANYPS5_VIDEO_OUT_TEST_DRIVER=windows, bundled dependencies. Complete libraries and matching relinkers were rebuilt and frozen separately; executable, converter and all 356 runtime-library/DLL hashes were checked locally before each launch.Review fixes:
ready >= 48andprefixesReady >= 12timing thresholds. Readiness counts are observations only. Genuine completion stores, neighboring-byte preservation, CPU-written high words, finite REWIND prefix/continuation sequencing, genuine CPU-dependent waits, and bounded return remain checked.APS5_SUBMIT_PROGRESSin the environment documentation. The feature remains off by default.Fresh source validation on the same machine/GPU used
ANYPS5_REQUIRE_VULKAN=1,ANYPS5_NO_SHADER_CACHE=1,VK_INSTANCE_LAYERS=VK_LAYER_KHRONOS_validationand verbose CTest:agc_submit_progress,agc_submit_progress_no_timeline,agc_driver_submit_progress,agc_driver_pm4,guest_nanosleep,guest_nanosleep_timer_self_test).VUID-errors and no missing requested validation layer. No shader guard or guest sleep/completion semantics was weakened.git diff --checkand conventions against fetchedupstream/mainpass. The required conventions invocation against this fork's staleorigin/mainreports 204 inherited findings / 8 errors across the upstream history; it is not reported as a pass. No unrelated upstream files were changed to suppress them.Clean-build timing captures
Official Marice/stk-ps5 SuperTuxKart PPSA69421, release
00.001.000; Abyss, Tux, difficulty 0, four karts, AIgnu,hexley,konqi, seed 7307, 1920×1080, fixed starting grid with no input. Original homebrew inputs were unwrapped and converted with each build's matching relinker using--windows --to-intel --registry --trap-sdk-syscall-stubs. The last flag traps recognized SDK syscall stubs if executed; syscall checking was not skipped. Assets and game code were not patched.Main and candidate use complete clean-source runtimes, identical copied game configuration, warmed caches and separate restarts. No residency, ownership, shader or other local integration patch is included. Each capture uses only
APS5_TRACE_SECONDS=60:120, plus presence ofAPS5_SUBMIT_PROGRESS=1in the enabled arm. No diagnostic profiler/frame dumps, redirected game logs or input during the window. Shared GPU/font/language launch selections are identical.Rendering limitation: clean main reaches the Abyss grid but reproduces black scenery/surfaces. The PR's timing runs reach the same launch/scene setup, but separate visual correctness acceptance was not completed. These are timings of the clean-source broken-rendering workload, not playable-performance acceptance. There is only one capture per arm; no repeatability or statistically established gain is claimed. Historical mixed-integration 12–14 FPS observations have been removed from the performance evidence.
The previously observed playable 12-14 FPS came from a combined local runtime (
2f26d7b4051f), including our write-watch repair #6759, MichonGoddijn231849's resident linear-target implementation #1191, our selected-range import fix #6820, a local resource-ownership experiment, and TheAggie's separate flat-input shader patch45944fbbe0dc. Those contributions are credited as integration context, not dependencies of this standalone PR. Their individual or cumulative speed contributions were not isolated. The old short progress-off/on pair held these other changes constant, but did not establish repeatability; it does not show that #7307 alone delivers that playable FPS on main.tools/trace_digest.pysummary lines for these captures:These captures do not establish a repeatable standalone FPS benefit. The synthetic test demonstrates the bounded opportunity for a real eligible prefix to finish before submit returns; the costs and usefulness of that policy remain workload-dependent. Pacing can reduce useful CPU/GPU overlap. The two-millisecond budget is nominal, not hardware-derived, and host scheduling can overshoot it.
Raw traces, digests, test logs, configuration and full hash manifests are retained locally. They are not attached publicly because evidence uploads are not authorized; public raw-trace evidence requested by the template therefore remains outstanding. No fresh Linux, cross-title, completed-race or extended stability acceptance is claimed for this rebased revision. Earlier Linux/lavapipe checks were on the previous revision, not this build. This remains an opt-in experiment, not a request for default enablement.
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)