You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Switch: turn on and distribute PGO profiles (follow-up to #87) #90
PR #87 adds profile-guided optimisation for the Switch build (-DWWHD_PGO=GEN|USE, tools/switch/pgo_train.py, docs/pgo.md), but it stays off by default and no release ships a PGO build for now. On a console at stock clocks it gave a further +2.6% to +7.5% fps on top of the recompiler changes (main thread -4.7% to -6.1%), measured at GPU 307 MHz (see docs/pgo-progress.md).
This issue is for turning it on for players later.
Why it is not on yet
A profile only fits the exact sources it was made from. Those sources are each player's own recompile (from their own dump), so a profile depends on the recompiler version, the region (USA/EUR) and the runtime files it covers.
GCC ignores the profile of any function whose flow graph changed (-Wno-coverage-mismatch), so a stale profile silently gives nothing, or only part of the gain.
The GCC version used to build must match the one that made the profile.
To decide / do
Whether a profile made by the maintainers on a reference recompile fits players' recompiles closely enough (same recompiler + same region should give identical generated code; check).
How the profile is stored, pinned to a commit and fetched by build.sh / the installers (and checked against the toolchain version), or a clean fallback to a normal build.
Per-region profiles or one shared profile.
A release step that retrains after any change to the recompiler or a profiled runtime file (pgo_train.py, ~30 min on a console), in docs/release-checklist.md.
Re-time PGO on current main at GPU 384 MHz (perf_test.py ab) to confirm the gain is still worth it.
Activity
Review fixes: clear the preempt flag atomically; say PGO is off by de…