Repository navigation
fix(agc): detect AMD proprietary narrow clock - #1632
Conversation
klosixgaming-arch
left a comment
There was a problem hiding this comment.
LGTM. Targeted fix that correctly identifies the AMD proprietary driver's 20-bit subgroup clock issue on device 0x1114 (Radeon 860M) while leaving other devices unchanged until measured. The test coverage is good - adding cases for the reported device, a neighboring device ID to verify specificity, and confirming other drivers aren't affected. Good update to TechnicalDebt documenting the measured behavior and remaining uncertainty about other AMD proprietary devices.
12340bf to
97cc19e
Compare
|
Thanks for the review and approval! |
97cc19e to
258c85a
Compare
|
Rebased the approved change onto current upstream |
|
The Build/Conventions workflow runs for current head |
258c85a to
85959bc
Compare
|
The latest main merge (#533) touched TechnicalDebt.md; I rebased this PR again onto |
85959bc to
73f30f1
Compare
|
Rebased onto current upstream |
|
Rebased head |
|
The fork Build for current head |
73f30f1 to
88c546c
Compare
|
Found and fixed the prior Conventions failure: the PR body did not fill the required Depends on field. The updated body states |
|
Latest fork Build completed with the same baseline failure on Linux and Windows: |
88c546c to
378c25b
Compare
|
Updated to current upstream |
aac9313 to
f4fec65
Compare
|
I reproduced #1615's clock wrap on an RX 7900 XT and tested a small extension to this PR for measured device ID 0x744c. Environment: Windows 11 Pro 10.0.26200, Ryzen 7 7700X, 32 GB DDR5, RX 7900 XT, AMD driver 32.0.31041.1004, Vulkan 1.4.349. WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7, Release, BUILD_TESTING=ON, SPIRV-Tools OFF. ANYPS5_GPU=7900 XT and ANYPS5_REQUIRE_VULKAN=1. On unchanged main Applied your PR head
The device-clock timing approximation is recorded in TechnicalDebt. No title testing or other 0x744c boards tested. I can share the extension patch if useful. |
|
Thanks for the RX 7900 XT measurement and test report. I incorporated device ID |
504ac89 to
a230723
Compare
|
Rebased #1632 onto current upstream main d70b899 after the RX 7900 XT update. The new exact head is a230723. The focused agc_subgroup_clock CTest passes 1/1, Conventions and diff checks pass, and the PR now records the measured 0x744c behavior and the reported full-suite result (including its unrelated #825 failure). Under CONTRIBUTING, could an authorized collaborator run Actions → Build for this current head? The previous request was for the pre-rebase head. |
|
A data point for an unmeasured device on AMD's Windows driver: the RDNA 2 iGPU of a Ryzen 5 7600 (gfx1036, device Windows 11 Pro 10.0.26300, MinGW-w64 GCC 15.2.0 (WinLibs r7), Release,
AI-assisted: yes (Claude Code). |
|
Thanks for the Windows 0x164e data point and the 600/600 run record. I added it to the PR description as a boundary measurement: it supports leaving that device unmatched, without generalizing the result to all gfx1036 hardware or AMD proprietary drivers. No detector change is needed for this device. |
a230723 to
df3efca
Compare
|
Rebased this PR onto current |
|
The PR description now reflects current head The RX 7900 XT measurement is documented in the linked report, with positive and adjacent-ID negative coverage in the current diff. Could a maintainer review the added |
df3efca to
d8f4f20
Compare
|
Rebased the existing PR linearly onto current |
d8f4f20 to
e7f2e31
Compare
Updated head and evidenceI rebased the existing branch linearly onto upstream The existing approval predates the measured |
|
Tested on the device this PR names first, the Radeon 860M (RDNA 3.5,
|
|
RX 7800 XT (device Windows 11 Pro 10.0.26200, AMD driver 32.0.31041.1004, Vulkan 1.4.349, WinLibs GCC 15.2.0 UCRT/POSIX/SEH r7, Release, BUILD_TESTING=ON.
Every failure has the first read just under 2^20 (1,029,437 to 1,047,608) and the second small; the step back plus the wrap is about 22,300 cycles in every run. The change tested, on top of - if (driver == VK_DRIVER_ID_AMD_PROPRIETARY && (deviceId == 0x1114u || deviceId == 0x744cu)) return true;
+ if (driver == VK_DRIVER_ID_AMD_PROPRIETARY && (deviceId == 0x1114u || deviceId == 0x744cu || deviceId == 0x747eu)) return true;plus With 0x1114, 0x744c and now 0x747e (RDNA 3.5 and two RDNA 3 boards on the same driver) all wrapping, matching device IDs one at a time may not scale; #1615's option 2 (a GFX11 device-ID range) might be worth reconsidering. No title tested. AI-assisted: yes (Claude Code). |
e7f2e31 to
afae311
Compare
|
I updated the Tested section with Leandro's Radeon 860M report on the exact previous head: the main baseline failed 32/100 shader-clock runs, while this PR passed 100/100 and selected the narrow subgroup clock. The report is identified as pre-rebase evidence. GitHub marked the PR conflicting after The 100-run hardware report is still from the prior head, and the official upstream Build/relinker matrix plus maintainer review of the |
afae311 to
02005c8
Compare
|
Thanks for the RX 7800 XT measurements. I updated the existing PR with the measured |
|
Retested exact head
No title tested. |
Follow-up on the
|
…-subgroup-clock fix(agc): detect AMD proprietary narrow clock
Closes #1615.
What
Pass the Vulkan physical-device ID into
NarrowSubgroupClock. On AMD's proprietary Vulkan driver, select the device clock only for devices with measured 20-bit subgroup clocks:0x1114— Radeon 860M, measured in s_memtime goes backwards on AMD's Windows driver too: #1383's narrow-clock check only matches RADV #1615.0x744c— Radeon RX 7900 XT, measured in the report on this PR.0x747e— Radeon RX 7800 XT, measured in the report on this PR.Other device IDs and driver IDs keep their existing behavior. Tests cover all three measured devices, adjacent unmatched IDs, and other driver IDs. TechnicalDebt records the measurements and the limits of what they establish.
Tested
Current head is
02005c86d27d7ffa36ce7a9c426e2e4510166b94, based on upstreammainatfff9bd31852ae605ede355ad230a50321b4b4ec9.libSceAgcDriverandagc_subgroup_clock_tests; focused CTestagc_subgroup_clockpasses (1/1).python3 tools/check_conventions.py --base upstream/mainandgit diff --check upstream/main...HEADpass locally.0x747e), AMD driver32.0.31041.1004, WinLibs GCC 15.2.0 r7, Release: a contributor tested this exact head without local changes. The log reportsnarrowSubgroupClock=1;agc_driver_shader_clockpassed 100/100 andagc_subgroup_clockpassed. Full CTest reported 536 passed, 2 failed, 1 skipped (539 total):agc_driver_vopc_compare_table(agc_driver_vopc_compare_table fails in wave32 for LG compares in the e32 encoding on AMD RDNA 3.5 #825),patched_libraries(the existing Windows VideoOut duplicate-export issue Windows build fails onmain:duplicate patched export name: LibwuIonIBwin libSceVideoOut (since #1339) #2462), andguest_video_out_wqhd_detection_no_vulkanskipped. The Windows run usedninja -k 0after the unrelated patching failure. See the exact-head RX 7800 XT report. No title tested.0x1114) and RX 7900 XT (0x744c) are from previous heads and remain linked below; they are not current-head retests.0x744cand0x747eadditions, so those extensions still need maintainer review.Evidence for
0x744cOn Windows 11 with an RX 7900 XT and AMD driver
32.0.31041.1004, the unmodified detector reproduced the clock wrap. The contributor's extension to0x744cfixed the regression; an adjacent device ID and non-proprietary driver cases retained the existing behavior. Their report and test results are in the hardware report and the exact-head retest. No title testing was reported.Evidence for
0x747eA contributor tested the Radeon RX 7800 XT (
0x747e, RDNA 3) on Windows 11 with AMD driver32.0.31041.1004. On the reportedmainhead5694d3fd,agc_driver_shader_clockfailed 8/8 runs withnarrowSubgroupClock=0; on earlier PR heade7f2e31e, it failed 47/50. Adding0x747emade the detector lognarrowSubgroupClock=1and the test pass 100/100. An adjacent0x747fnegative case was added andagc_subgroup_clockpassed. A subsequent run on current exact head02005c86passedagc_driver_shader_clock100/100 andagc_subgroup_clock; the contributor's full CTest result and unrelated failures are summarized in Tested above. See the initial hardware report and exact-head RX 7800 XT report. No title was tested.Checklist
main; no other open PR implements the same detector change