WIP: perf(vk): a network an earlier session left out is left out again without its translation (RX_VK_REMEMBER_LEFT_OUT) #2823
No reviewers
Labels
No labels
area/accessibility
area/audio
area/input
area/install
area/menu
area/mods
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
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/Longshot!2823
Loading…
Reference in a new issue
No description provided.
Delete branch "Simaude/Longshot:pr/networks-left-out-remembered"
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 a card that runs cooperative-matrix multiplies in software (
networks_left_out: every vendor but NVIDIA, and NVIDIA before Turing),translate_intoleaves the upscale networks out witha network left out on this card. A failure is kept nowhere, so every session translated each of them whole at its first dispatch, on the replay thread, only to leave it out again: 11 of them on a GTX 1070 (Pascal), 2-60 ms each, ~200 ms a session, most during the opening movie and one on the way into Hyrule Field.Their keys now go to
longshot_networks_left_out.txtbeside the program cache, under the program cache's stamp (the translator, the device's translation settings and policy, and theRX_VK_NETWORK*/RX_VK_NO_F16switches it takes) and the device's f16 support.program_pickleaves a listed compute program out at once, failed and ready, as its translation would end; nothing else changes (the dispatch takes the sameupscale_stubroute by the code's key). A list made under another stamp is not read, and is replaced at the next left-out network. The shader preparation fills the list at the build (71 networks on this card), so even a first session in play skips them.gpu/vk/vk_shader.cpp:left_out_known/left_out_note, the check inprogram_pickbeforemiss_note, the note intranslate_into's catch (not for an answerseed_computeonly tries).gpu/vk/switches.def:RX_VK_REMEMBER_LEFT_OUT=0turns it off (named off theRX_VK_NETWORKprefix, which the translator's stamp takes: setting it would drop the program cache).tests/test_networks_left_out_remembered.py(new; fails onmain),tests/test_not_translated_counts.py(its fixture now counts the notes: the 69 networks, not the trial nor the other failures).Testing
Tested: Windows 11 23H2 (22631), NVIDIA GeForce GTX 1070, driver 582.78, i7-9700K, 32 GB, 1920x1080, Compile shaders: All,
RX_VK_LOAD=start,RX_VK_SLOW_DISPATCH=1. One build of this branch; four interleaved pairs,RX_VK_REMEMBER_LEFT_OUT=0against unset, each run a fresh profile from the repository'scastle-gatesave through the title and over the drawbridge into Hyrule Field (driven byscripts/longshot_ctl.py), 0 crashes.longshot_networks_left_out.txtwritten by the preparation: 71 keys; every run with the list says71 networks left out in an earlier session.drawn by the typed fallback) and the movie's linear upscale are taken in every run, both ways.main @ e4801d6a(head8a24b9c8) and run again, one run each way: 0 against 11 networks translated,71 networks left out in an earlier session, and the same stand-in lines both ways (movie upscaling uses the linear compute path,typed upscale helper generic RGB9E5 fallback, the same 11rejected computedispatches), 0 crashes.python -I -B tests/run_all.py --changed origin/main: everything this touches passes;test_switch_table(LONGSHOT_LAUNCHER_STARTUP, from #2683),test_dev_abandtest_input_moviefail the same onmainon Windows.Still to test:
Measurements
Verdict: ~185 ms of replay-thread translation gone from every session on a card that leaves the networks out, most of it from the opening movie; frame times in play unchanged (the one network met in play cost 13 ms).
22d0d200(RX_VK_REMEMBER_LEFT_OUT=0)8a24b9c8)RX_VK_SLOW_DISPATCH), in allThe numbers still hold on
main @ e4801d6a: none of the 34 commits since touches the translation or the program cache, and one pair there gave the same 11 against 0 networks translated.Risks
network_left_outverdict, and it is dropped whenever the program cache's stamp changes (translator, policy, the network switches, f16 support).RX_VK_REMEMBER_LEFT_OUT=0.Checklist
Ready for review
main. The title is a Conventional Commit.mise run testpasses: the changed-file checks pass; three failures are pre-existing onmainon Windows (named above).main, or Measurements says why there is nothing to measure.When it applies
tests/that reads changed source is updated, not weakened.gpu/vk/switches.def.Assisted-by:trailer.Assisted-by: Claude Opus 5.5
Tested in game: Windows 11 23H2, NVIDIA GeForce GTX 1070 (Pascal), driver 582.78: castle-gate save through the title and into Hyrule Field, RX_VK_REMEMBER_LEFT_OUT=0 against unset (4 pairs on Friday's main, one pair again on main @
e4801d6a): 11 networks translated and left out against 0, ~185 ms less replay-thread translation a session, the same stand-in lines both ways, no crash.Possibly related, for context:
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.