perf(vk): cut the upscaler network 38% (+4.5-6.3% FPS) on RADV RDNA 2 (Steam Deck) via f16 pair dot products and B through workgroup memory #2439
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/renderer
area/saves
area/tooling
area/upscaling
beanstalk: approved
beanstalk: failed
beanstalk: needs approval
beanstalk: running
beanstalk: tested
ci: approved
good first issue
gpu/amd
gpu/igpu
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
needs measurements
platform/linux
platform/macos
platform/steam-deck
platform/windows
preview
priority
critical
priority
high
priority
low
regression
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
4 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2439
Loadingβ¦
Reference in a new issue
No description provided.
Delete branch "dantopa/Longshot:perf/radv-software-mma-dot2"
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?
Summary
On GPUs without suitable cooperative matrices, the game's upscaler networks (
9dc98871eb7fc101at 100 % render,fd029a317a9a4b94at 75 %) run their HMMA in software. On RDNA 2 with RADV (Steam Deck, RX 6000 on Linux) none ofthe fast paths apply: WMMA16 needs RDNA 3/4, and #2329 emits main's SPIR-V on RDNA 2. The unrolled form spends most of
its time on separate f16 multiplies and adds, and on the 16 shuffles that hand each lane its B words.
This PR adds two self-test-gated steps to the software HMMA lowering:
SoftwareMmaForm::Dot2): each K pair is oneOpFDot2MixAcc32VALVE(
VK_VALVE_shader_mixed_float_dot_product,v_dot2c_f32_f16on RADV), with A's quad broadcast folded in.On a Steam Deck LCD the 100 % network drops from 2.50 to 1.56 ms a dispatch (β38 %), and the frame rate rises
+4.5 % (Kokiri Forest), +6.3 % (Hyrule Field), +4.5 % (Market). Each step helps alone and more together.
Read first:
mma_software.h(the two forms),vk_coopmat.cpp(choose_software_form,choose_staged_band theirself-tests),
device_policy.h(mma_stage_b_try), thentests/test_mma_software.py.Testing
Tested: Steam Deck LCD, SteamOS, Mesa RADV (VANGOGH), in the game from the
kokiri-startsave in Kokiri Forest,Hyrule Field and the Market,
Upscaling = Gameat 100 % and at 75 % (RX_VK_TAAU_KEYS=-, so the 75 % network runs).The log shows both forms chosen after their self-tests:
The picture is the same as main's at the same spot (screenshots and 2x crops in a comment).
Checks:
test_mma_software.py(the self-test's and the emitter's modules through spirv-val, the word comparison cutfrom
vk_coopmat.cpp),test_wmma16_spirv_val.py,test_wmma16_zero_c_kchain.py,test_device_policy.py,test_switch_table.py,test_program_stamp_knobs.pyand the other checks that read these files pass.mise run test(tests/run_all.py --strict) on the head,6b5aafc8on main6123c76a: 948 pass, 13 fail, 18 skipped (Windows only). The same 12 fail on main6123c76aon this PC, for its tools: the AddressSanitizer runtime is missing from the clang used here (audio_source,game_layout,game_menu_mouse_buttons,input_movie,mods_list,obj_cache_size,option_ids,options_path,pads_after_menu,settings_atomic,tracy_funcs) and there is no dav1d (dav1d_av1). The 13th,test_prepare_stall, is a timing watchdog that timed out with 8 checks at once and passes alone, here and on main.Windows:
longshot_vk.dllcross-compiled with llvm-mingw (tools.lock's 20261104, as CI'swindows-vulkanjob:RX_TARGET=windows RX_VK_ONLY=1 RX_RELEASE=1 nx2/build.py --standalone) on the head,dd69bccaon main9046a8d7. That build foundnearandfar, which windows.h defines as macros, as names invk_coopmat.cpp;dd69bccarenames them. After it,tests/run_all.py --strict --changedpasses buttest_input_movie(the AddressSanitizer runtime above).Still to test:
Measurements
Verdict: faster on the Steam Deck: the upscaler network β38 % (2.50 β 1.56 ms a dispatch), +4.5 to +6.3 % fps.
Measured on main
90fae88c; main has moved since only in code this PR does not touch (CI, release tooling, input, thenear/farrename), so the numbers still hold.Setup: Steam Deck LCD, SteamOS, Mesa RADV (VANGOGH), GPU held at its peak clock; 1280x800 output,
Upscaling = Game100 %, frame generation and V-Sync off,
HOS_FPS_MAX=1000; thekokiri-startsave, teleported to each scene, 25 s tosettle, then the median of 12 fps samples 2.5 s apart; runs interleaved main, PR, main, PR. Network times from
RX_VK_PASS_TIMING=2, the median per-dispatch time of the run.90fae88c38315b629dc98871(100 %), ms a dispatch9dc98871withRX_VK_MMA_DOT2=0(B through workgroup memory alone)9dc98871withRX_VK_MMA_STAGE_B=0(pair dot products alone)fd029a31(75 %), ms a dispatchBoth switches ship on where their self-tests pass: each step is faster alone, and the two together are faster still.
For scale: a hand-written core of the same maths, kept local (it is not part of this PR), reaches 0.91 ms for
9dc98871and 0.63 ms forfd029a31on the same Deck. That is the headroom a follow-up could go after.Risks
the loop's by one f32 rounding of that partial sum. The self-test bounds its own inputs (within 2 f16 ulps, the same
sign, infinity and NaN where the loop has them); the screenshots are the evidence for the game's picture.
RX_VK_MMA_DOT2=0keeps the unrolled form, word for word the loop's.(
computeFullSubgroups) and is skipped where its self-test's words differ.RX_VK_MMA_STAGE_B=0keeps the shuffles.before (the extension is asked for only where the unrolled forms are tried).
Checklist
Ready for review
main; the title is a Conventional Commit.mise run testpasses (any failure that also fails onmainis named).main, or Measurements says why there is nothing to measure.third_party/untouched; nothing GPL-incompatible.When it applies
gpu/vk/switches.def.tests/that reads changed source is updated, not weakened.mainand here, for a change that shows on screen.Assisted-by:/Co-Authored-By:trailers.Ready to merge
main, measured again or a comment says why the numbers still hold.π€ Generated with Claude Code
Tested in game: Steam Deck LCD, SteamOS, Mesa RADV (VANGOGH): Kokiri Forest, Hyrule Field and the Market from the kokiri-start save, Upscaling = Game at 100 % and 75 %; both forms pass their self-tests and are chosen (log lines in Testing); 9dc98871 2.50 -> 1.56 ms a dispatch; the picture matches main by eye.
41839265854136df5883Rebased onto main
8aa5ab87(the only new commit is.tooling-rev, release tooling): no code change, the measurements at90fae88cstill hold. Head is now4136df58.4136df588338315b629aPushed
38315b62: a readability pass, no change in behaviour.mma_software.h: the staged-B load is its own helper (load_b_from_tile); named constantskSoftwareMmaTileVectors/kSoftwareMmaTileBytesreplace the bare 16 and 256; the comment now says two word stores (what the SPIR-V has).vk_coopmat.cpp:software_forms_agreefolded intosoftware_form_words+software_words_compare; one "use this form" branch inchoose_software_form; the loop's own run goes through the same helper; a stale comment about Dot2's rounding corrected.emit_spirv_warp.cpp: the staged-B condition split into named parts (full_subgroups,stage_b), a redundant% 32test dropped.vk_shader.cpp: the stamp bits written as2097152u/4194304ulike their neighbours, so the mesh-fallback stamp-collision checks see them.tests/test_mma_software.py: shared helpers instead of copies, and it now checks the staged module's store count.All 38 SPIR-V modules the fixtures build (24 self-test, 14 emitter) are byte-identical before and after, and the stamp values are unchanged, so the measurements still hold.
test_mma_software.py(44 PASS),test_wmma16_spirv_val.py,test_wmma16_zero_c_kchain.py,test_device_policy.py,test_switch_table.py,test_program_stamp_knobs.py,test_coopmat_probe_failures.pyand thetest_mesh_fallback_*stamp checks pass.Screenshots, Steam Deck LCD, the same spot on main @
90fae88cand on this PR (1280x800,Upscaling = Game100 %, so9dc98871draws the picture):2x crops (nearest neighbour) of Link and the path, main on the left, this PR on the right:
Edges, the tunic's texture, grass and the HUD are the same. What moves between the two captures is the scene itself (the drifting fog and the fireflies are animated), not the upscale.
Also measured:
fd029a31at 75 % (RX_VK_TAAU_KEYS=-) goes from 1.64 to 1.09 ms a dispatch (β34 %).@Beanstalk on Linux RADV with an RDNA 2 card (RX 6000), Upscaling = Game at 100 %: the time of the upscaler network pass (prog 9dc98871, RX_VK_PASS_TIMING=2) and the frame rate against main, and that the picture is unchanged; the log should say 'f16 pair dot products' and 'B through workgroup memory'. On RDNA 3/4 with RADV and on Windows (any GPU), expect no change: WMMA16 stays first, and the extension is not asked for.
@dantopa only members of
BigBeanscan start the farm.One of them can approve this request by reacting π to it or to this comment.This request was for38315b6, and the PR has changed since (6b5aafc), so a π no longer approves it. Comment@Beanstalkagain to ask for the new commit.38315b629a6b5aafc86aRebased onto main
6123c76a(two CI commits since8aa5ab87, no code this PR touches): head6b5aafc8, the same diff, so the measurements at90fae88cstill hold.mise run test(tests/run_all.py --strict) on the head: 948 pass, 13 fail. The same 12 fail on main6123c76aon this PC, for its tools (no AddressSanitizer runtime in its clang, no dav1d);test_prepare_stalltimed out under load and passes alone, here and on main. The list is in Testing. Marking it ready for review.WIP: perf(vk): cut the upscaler network 38% (+4.5-6.3% FPS) on RADV RDNA 2 (Steam Deck) via f16 pair dot products and B through workgroup memoryto perf(vk): cut the upscaler network 38% (+4.5-6.3% FPS) on RADV RDNA 2 (Steam Deck) via f16 pair dot products and B through workgroup memory@Beanstalk on Linux RADV with an RDNA 2 card (RX 6000), Upscaling = Game at 100 %: the time of the upscaler network pass (prog 9dc98871, RX_VK_PASS_TIMING=2) and the frame rate against main, and that the picture is unchanged; the log should say 'f16 pair dot products' and 'B through workgroup memory'. Head is now
6b5aafc8.@dantopa only members of
BigBeanscan start the farm.One of them can approve this request by reacting π to it or to this comment.This request was for6b5aafc, and the PR has changed since (dd69bcc), so a π no longer approves it. Comment@Beanstalkagain to ask for the new commit.6b5aafc86add69bcca0dPushed
dd69bcca, rebased onto main9046a8d7: a Windows build fix.Cross-compiling
longshot_vk.dllwith llvm-mingw the way CI'swindows-vulkanjob does failed invk_coopmat.cpp: windows.h definesnearandfaras empty macros, and the self-test's comparison used both as names (SoftwareWords::far, thenearlambda). They are nowoffandwithin, andtest_mma_software.pyreads the new names. With that the DLL builds, andtests/run_all.py --strict --changedpasses buttest_input_movie(no AddressSanitizer runtime in this PC's clang, as on main). No change in behaviour on Linux; the measurements at90fae88cstill hold (Measurements says why).@Beanstalk on Linux RADV with an RDNA 2 card (RX 6000), Upscaling = Game at 100 %: the time of the upscaler network pass (prog 9dc98871, RX_VK_PASS_TIMING=2) and the frame rate against main, and that the picture is unchanged; the log should say 'f16 pair dot products' and 'B through workgroup memory'. Head is now
dd69bcca.@dantopa only members of
BigBeanscan start the farm.One of them can approve this request by reacting π to it or to this comment.This request was fordd69bcc, and the PR has changed since (d9e3238), so a π no longer approves it. Comment@Beanstalkagain to ask for the new commit.dd69bcca0dd9e3238597Pushed
d9e32385, rebased onto main7eb53d1a(no conflicts). It adds one commit, from a cold review of the branch (the project's review guide, run by our own agent):make_profileleavessupport_explicit_workgroup_layoutoff and somma_software_staged_b_blockwas never set. The emitter path, the self-test's layout and stamp bit 22 are gone. A program with an explicit layout and workgroup memory of its own keeps the shuffles; the emitter cases still check that.software_tile_*inmma_software.h.DefineSoftwareMmaemits them, andtest_mma_software.pyruns them on plain numbers: every lane of 4 subgroups reads the words the shuffles would have handed it. The two index mutations the review tried now fail the check.create_deviceasks for it by the same ruleschoose_software_formuses (software_dot2_extension_wanted) instead of a copy, soRX_VK_MMA_DOT2=2no longer asks for nothing and logs that the GPU lacks it.pin_subgroup).mma_stage_b_tryonly where it can be used. It is on only where compute can be pinned to 32 lanes, so not on GCN or Vega, matchingsoftware_stage_b_wanted.Checked on the Steam Deck (LCD, RDNA 2), with the PR's files on nightly-797 (main
90fae88c). Main has changed four of those files since, in other places (#2286, #2411), and the rebase merged them without conflicts:f16 pair dot products ... all within 2 f16 ulpsandB through workgroup memory, 256 bytes a subgroup.RX_VK_PASS_TIMING=2) is 1.555 ms a dispatch (median of 8), against 1.557 ms before this commit and 2.495 ms on main.On the rebased head,
longshot_vk.dllcross-compiles with llvm-mingw the waywindows-vulkandoes (longshot-builder compile --only renderer,RX_TARGET=windows), andtests/run_all.py --strict --changedgives 178 pass, 1 fail:test_native_zstd, which needs the Pythonzstandardmodule this PC does not have.@Beanstalk on Linux RADV with an RDNA 2 card (RX 6000), Upscaling = Game at 100 %: the time of the upscaler network pass (prog 9dc98871, RX_VK_PASS_TIMING=2) and the frame rate against main, and that the picture is unchanged; the log should say 'f16 pair dot products' and 'B through workgroup memory'. Head is now
d9e32385.@dantopa only members of
BigBeanscan start the farm. One of them can approve this request by reacting π to it or to this comment.@beanstalk
Beanstalk test farm Β· π testing (9 of 6 reports so far)
Commit
d9e3238Β· approved by HumanBean (reviewed) Β· dashboardβ οΈ Note: The GPU pass probe measures aggregate GPU time, not the named network's per-dispatch time, so the claimed 38% network reduction cannot be judged directly.
β οΈ Note: The plan does not select the 75% network because the supplied settings do not identify its render-resolution value; it also cannot reproduce the Deck's 1280Γ800 output.
β οΈ Note: Selection logs can legitimately be absent on WMMA16 and other fallback paths, so missing lines are unjudged; the RX 7000/9000 RADV target also waits if no matching Linux RADV tester is available.
Started at 17:47 UTC.
linux+radv+gpu-rx-6*(GPU "rx 6*")linux+radv+gpu-rx-7*_rx-9*(GPU "rx 7*" or "rx 9*")steamdeckwindows+amdnvidiaintelCouldn't be judged: the tester's PC could not finish the test. The farm tries another PC, or the same one after a fix; it says nothing about the PR on its own.
linux+radv+gpu-rx-7*_rx-9*, report 1:main's longshot-builder failed (exit 1): Traceback (most recent call last):linux+radv+gpu-rx-7*_rx-9*, report 2:main's longshot-builder failed (exit 1): Traceback (most recent call last):steamdeck, report 1:main's longshot-builder failed (exit 1): Traceback (most recent call last):windows+amd, report 1:main's longshot-builder failed (exit 1): longshot_builder: no llvm-mingw: pass --llvm-mingw <folder> or set LONGSHOT_MINGW (Z:\builder\tools\tools\llvm-mingw\bin\x86_64-w64-mingw32-clang.exe is not there)windows+amd, report 2:main's longshot-builder failed (exit 1): longshot_builder: no llvm-mingw: pass --llvm-mingw <folder> or set LONGSHOT_MINGW (Z:\builder\tools\tools\llvm-mingw\bin\x86_64-w64-mingw32-clang.exe is not there)nvidia, report 1:main's longshot-builder failed (exit 1): longshot_builder: no llvm-mingw: pass --llvm-mingw <folder> or set LONGSHOT_MINGW (Z:\builder\tools\tools\llvm-mingw\bin\x86_64-w64-mingw32-clang.exe is not there)nvidia, report 2:main's longshot-builder failed (exit 1): longshot_builder: no llvm-mingw: pass --llvm-mingw <folder> or set LONGSHOT_MINGW (Y:\builder\tools\tools\llvm-mingw\bin\x86_64-w64-mingw32-clang.exe is not there)intel, report 1:main's longshot-builder failed (exit 1): Traceback (most recent call last):What was tested
What will be tested Β· AI plan (
gpt-6.1-terra)Main and the pull request will be compared in Kokiri Forest, Hyrule Field and Market using the game upscaler, with three starts per side and 25-second measurements at each location. The plan measures frame times, frame rate and aggregate GPU pass time, and compares stationary pictures and self-test selection logs. Crashes, substantial frame-time or GPU-time regressions, and picture differences beyond the tolerance fail the pull request; missing selection logs are reported as unjudged. The requested RX 6000 RADV target has no matching GPU listed online and will wait for a tester. No tester online now matches linux+radv+gpu-rx-6*: that target waits for one.
kokiri-start(settings dlss=0, frame_rate_cap=6, frame_generation=0), then teleport to Kokiri Forest, take the picture forest to compare with main, measure forest for 25 s (after 25 s warm-up), teleport to Hyrule Field, take the picture field to compare with main, measure field for 25 s (after 25 s warm-up), teleport to Market, take the picture market to compare with main, measure market for 25 s (after 25 s warm-up); 3 runs on each side.Measurements on `linux+radv+gpu-rx-7*_rx-9*`, for the PR description
Verdict: could not be judged on linux+radv+gpu-rx-7*_rx-9* (2 reports).
Hardware: 1: linux+amd+radv+dgpu
AMD Radeon RX 9070 (RADV GFX1201), 26.0.8AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAM; 2: linux+amd+radv+dgpuAMD Radeon RX 9070 XT (RADV GFX1201), 26.2.7AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAMScene: upscaler-scenes, from the repository's save kokiri-start (dlss=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); upscaler-scenes: 3 game starts a side, forest 25 s after 25 s warm-up, field 25 s after 25 s warm-up, market 25 s after 25 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `steamdeck`, for the PR description
Verdict: queued on steamdeck (1 report).
Hardware: 1: linux+amd+radv+igpu+handheld
AMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMScene: upscaler-scenes, from the repository's save kokiri-start (dlss=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); upscaler-scenes: 3 game starts a side, forest 25 s after 25 s warm-up, field 25 s after 25 s warm-up, market 25 s after 25 s warm-up; each number the median of the runs, then of 1 report
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `windows+amd`, for the PR description
Verdict: could not be judged on windows+amd (2 reports).
Hardware: 1: windows+amd+amd-proprietary+dgpu
AMD Radeon RX 9070 XT, 2.0.416AMD Ryzen 7 7700 8-Core Processor, 32 GB RAM; 2: windows+amd+amd-proprietary+igpuAMD Radeon Graphics, 2.0.388AMD Ryzen Z1 Extreme, 16 GB RAMScene: upscaler-scenes, from the repository's save kokiri-start (dlss=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); upscaler-scenes: 3 game starts a side, forest 25 s after 25 s warm-up, field 25 s after 25 s warm-up, market 25 s after 25 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `nvidia`, for the PR description
Verdict: could not be judged on nvidia (2 reports).
Hardware: 1: windows+nvidia+nvidia-proprietary+dgpu+dlss+xess
NVIDIA GeForce RTX 3080 Ti, 621.24.0AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAM; 2: windows+nvidia+nvidia-proprietary+dgpuNVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMScene: upscaler-scenes, from the repository's save kokiri-start (dlss=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); upscaler-scenes: 3 game starts a side, forest 25 s after 25 s warm-up, field 25 s after 25 s warm-up, market 25 s after 25 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
Measurements on `intel`, for the PR description
Verdict: could not be judged on intel (2 reports).
Hardware: 1: linux+intel+anv+dgpu
Intel(R) Arc(tm) B580 Graphics (BMG G21), 26.2.4AMD Ryzen 7 9700X 8-Core Processor, 32 GB RAM; 2: windows+intel+intel-proprietary+dgpu+xessIntel(R) Arc(TM) B580 Graphics, 0.406.983AMD Ryzen 5 9600X 6-Core Processor, 16 GB RAMScene: upscaler-scenes, from the repository's save kokiri-start (dlss=0, frame_rate_cap=6, frame_generation=0); each cell's settings and switches as the table names them
Method: the Beanstalk test farm: main and this PR built and run on the same PC in one session, game starts alternating (ABBA); upscaler-scenes: 3 game starts a side, forest 25 s after 25 s warm-up, field 25 s after 25 s warm-up, market 25 s after 25 s warm-up; each number the median of the runs, then of 2 reports
How to reproduce: the farm's plan above (
@Beanstalkon this PR runs it again)Nothing was measured: no metric came back.
Flags and settings
None: the plan varied no setting, switch or build option.
As Markdown for the PR description:
The testers' hardware
linux+radv+gpu-rx-7*_rx-9*AMD Radeon RX 9070 (RADV GFX1201), 26.0.8AMD Ryzen 7 5800X 8-Core Processor, 32 GB RAMlinux+radv+gpu-rx-7*_rx-9*AMD Radeon RX 9070 XT (RADV GFX1201), 26.2.7AMD Ryzen 7 5700X3D 8-Core Processor, 32 GB RAMsteamdeckAMD Custom GPU 0405 (RADV VANGOGH), 26.1.99AMD Custom APU 0405, 12 GB RAMwindows+amdAMD Radeon RX 9070 XT, 2.0.416AMD Ryzen 7 7700 8-Core Processor, 32 GB RAMwindows+amdAMD Radeon Graphics, 2.0.388AMD Ryzen Z1 Extreme, 16 GB RAMnvidiaNVIDIA GeForce RTX 3080 Ti, 621.24.0AMD Ryzen 9 5900X 12-Core Processor, 64 GB RAMnvidiaNVIDIA GeForce RTX 4070, 621.24.0AMD Ryzen 9 7900X 12-Core Processor, 64 GB RAMintelIntel(R) Arc(tm) B580 Graphics (BMG G21), 26.2.4AMD Ryzen 7 9700X 8-Core Processor, 32 GB RAMintelIntel(R) Arc(TM) B580 Graphics, 0.406.983AMD Ryzen 5 9600X 6-Core Processor, 16 GB RAM@review
Recommendation: Approve. The code is ready: only testing is left. The Steam Deck measurements show a large reduction in the targeted dispatch time, but frame pacing and the default on other affected RADV hardware remain unmeasured. The review was also unable to read every changed file and its surrounding code in full. Recommend approval; not approved on the forge.
The change accelerates software matrix multiplies used by the upscaler with pair dot products and workgroup memory, gated by device self-tests. It adds shader-generation and startup-probe complexity and changes floating-point rounding.
Nits (1): optional.
Testing before merging (2) (runs on the systems it can change; it doesn't hold the recommendation)
gpu/vk/vk_coopmat.cpp:674: The staged-B default also applies to eligible RADV GPUs beyond the tested Deck. (more on the line) Do: Run the requested RX 6000 base-versus-head game and dispatch-time comparison, including frame pacing and picture correctness.@fixcan do L3.Checks: Still running: 13 checks.
More: does it help, other systems, switches, what was read
Does it help: Unproven for overall player performance: the author's interleaved Steam Deck runs report 2.50 to 1.56 ms per 100% network dispatch and higher sampled FPS, but do not report 1% lows or frame times. The 75% network reports 1.64 to 1.09 ms per dispatch.
Other systems: The new default can affect software matrix multiplies on RADV devices with suitable features, including RX 6000; their game and performance runs are pending. RDNA 3/4 normally retain WMMA16, and Windows normally does not request the extension, but the requested confirmation runs are pending. The tile path uses shared memory and subgroup barriers; its self-test compares its output with the shuffle path.
Switches: RX_VK_MMA_DOT2 defaults to trying Dot2 where software unrolling and the extension are available; RX_VK_MMA_STAGE_B defaults to trying staged B on RADV with pinned full subgroups. Both have switch-table rows and self-test gates. Their defaults are supported by the Deck dispatch measurements, but the staged-B default on other RADV hardware needs measurement.
Reviewed:
d9e3238597against7eb53d1a0a: Read AGENTS.md, CONTRIBUTING.md, the PR template and standards; docs/review-checklist.md and ../Tooling/AGENTS.md were absent. Read the main shader-generation and probe changes and relevant pinning, capability and cache code; skimmed the other changed files, tests, commits and recorded runs. The large diff and all changed code files were not read in full.; nothing run (a code review).Checked and fine:
Testing: No code or tests were run, as requested. The author reports the Deck runs and cross-build; CI is still running.
Overlaps and merge order: Not determined; the network was closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@ -564,0 +671,4 @@"B through shuffles", r.differ, 2 * kSoftwareTestLanes);return;}spirv::mma_software_staged_b = dev.props.limits.maxComputeSharedMemorySize;L2 (should fix): The staged-B default also applies to eligible RADV GPUs beyond the tested Deck.
When: An RX 6000 on RADV can pass the word comparison and use the tile path, but that comparison does not measure whether its stores, loads and barriers improve performance on that GPU.
Do: Run the requested RX 6000 base-versus-head game and dispatch-time comparison, including frame pacing and picture correctness.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.