test(agc): split the gated dispatch producer spin into short dispatches #3833
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3833"
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 David-cmrg on 2026-10-11T17:20:46Z.
What
Fixes #3345.
agc_driver_gated_dispatch_captureran its producer spin as one dispatch of 2^26 iterations, doubled per slot. On Intel HD Graphics 520 (Gen9, i915) that dispatch runs for about 3.1 s. i915 cannot preempt it withinpreempt_timeout_ms(640 ms) and resets the context, with the sameResetting rcs0 for preemption time outandGPU HANG: ecode 9:1:85ddfffaas in the issue. The test then fails withvkWaitForFences recorder: Vulkan result -4.The producer now issues the same iterations as 64 dispatches of 2^20 each before its label write, and doubles the number of dispatches per slot. The 300 ms fill delay, the iterations per slot and the fresh, stale and inconclusive checks are unchanged.
Tested
Fedora 44 (toolbox container), GCC 16.2.1, Release,
BUILD_TESTING=ON, Mesa 26.2.4,ANYPS5_REQUIRE_VULKAN=1. Host kernel 6.19.10, i915, rcs0preempt_timeout_ms640.maina11c8f7f_short_timeoutfails 1/1:dropped 1 queued labels,Vulkan result -4, i915 reset on every runGALLIUM_OVERRIDE_CPU_CAPS=avxBoth variants finish on their first slot on both devices. On the HD 520, one dispatch of 2^20 iterations takes 50 ms. 64 of them, 2^26 in total, take 3.15 s with no reset.
tools/check_conventions.pypasses. Not tested on Windows or other GPUs.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by Silverash-i8 on 2026-10-11T17:37:33Z.
Windows run of this branch (
6200b8c7, onmaina11c8f7f) on the Arrow Lake iGPU from #3345: Windows 11 Home 26200, Intel driver 101.8991, WinLibs GCC 15.2.0 r7, Release,ANYPS5_GPU=Intel,ANYPS5_NO_SHADER_CACHE=1.maina11c8f7f(my earlier rerun on #3345)agc_driver_gated_dispatch_capturedropped 1 queued labels,Vulkan result -4and a burst ofLiveKernelEvent 141(GPU watchdog)agc_driver_gated_dispatch_capture_short_timeoutThe event log has no
LiveKernelEventat all across the 40 runs on the branch. Sincemainonly failed 1 in 20 here, 40 clean runs are consistent with the fix rather than proof of it. The shorter run time does fit the GPU no longer sitting in one long dispatch.On the RTX 5060 Laptop (driver 617.42), both variants pass 5 of 5 (about 1.3 s each).
AI-assisted (Claude Code); I ran the above on my machine.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T22:08:15Z.
Checked the diff (same total iterations, 64 dispatches of 2^20 instead of one of 2^26; fresh/stale/inconclusive checks unchanged), build and ctest of the libSceAgcDriver scope on Linux (both
agc_driver_gated_dispatch_capturevariants pass), and the hardware results in the thread: HD 520 23/23 and Silverash-i8's Arrow Lake run on Windows 20/20, versus the i915 reset / watchdog onmain. Merging.