Repository navigation
pso_gpu: the profile names the GPU families the offline pipeline archive is made for - #653
oliverames wants to merge 2 commits into
Conversation
regress.py check (quick), this branch as the candidate
The boot-smoke leg could not run: The changed-variants count needs the read that follows: every one of the 343 differs in bytes only — |
ca47dbf to
bb906f7
Compare
bb906f7 to
482c1b7
Compare
…ive is made for (the A19 default holds without it)
482c1b7 to
17e9622
Compare
The iOS archive default targeted only g18p, so another GPU family needed an explicit build override. Read optional pso_gpu targets in both packers behind the existing pso_mtl4 opt-in gate, retaining explicit overrides and the previous defaults when the key is absent. Keep game settings unchanged. Record the contributor's Wonder archive probe in its game note and clarify archive selection and device validation. Validation: 50 targeted tests run, one Metal compiler test skipped; all 121 profile headers unchanged; shell syntax valid. Pinned Python lint reports the same pre-existing reportArgumentType at dm/tools/tests/test_shader_toolchain_cache.py:134 on fresh origin/main and this commit (393 findings, 392 in its baseline); no additional finding. Regression risk is low: no shipped profile uses pso_gpu and the host and shader chain are unchanged. Co-authored-by: Oliver Ames <7366664+oliverames@users.noreply.github.com>
|
Landed on Both iOS packaging paths now read Validation after rebasing onto fresh
Regression risk is low: no shipped profile uses the new key, and this change modifies neither the host nor the shader chain, so no multi-game regression run was performed. Confidence is high in the tested packaging behavior. This is a generalized archive-target selection fix at the packaging source, with no game-specific host branch or runtime workaround; it makes no claim of measured on-device performance or memory improvement. The original implementation and design survive meaningfully, so the commit includes #651 remains deferred pending device performance and memory validation. iOS remains opt-in. |
The offline pipeline archive follows the device's GPU family, but the defaults in both build paths named only one. This change adds an optional game-profile key,
pso_gpu, that names the GPU architectures the app gets the archive for, read bydm/games/game.py,dm/ios/tools/build_ipa.shandscripts/build_ipa_from_nsp.py. The problem it answers is a hardcoded one: a Duo foldable reportsMTLDevice.architectureapplegpu_g19p, while the hardcoded defaultg18pis the A19 / A19 Pro of the iPhone 17 family, so an app built without an explicit--gpu/DM_PSO_GPUSvalue carried an archive made for a family the device never asked for. The profile key lets a profile name the families it serves instead (pso_gpu g18p g19pnames both in one build), where previously a per-build flag was the only way.The key and its validation
In
dm/games/game.pythe key validates as whitespace-separated tokens, each matching[A-Za-z0-9]+with theapplegpu_prefix optional, at most 1–4 tokens;noneis not a value. When the key is absent the existing default applies unchanged: it is the absence of the key that means unset.In
dm/ios/tools/build_ipa.shthe existing chainDM_PSO_GPUSenv →g18pwhenpso_mtl4on →nonenow consults the key's list before the hardcodedg18pstep.scripts/build_ipa_from_nsp.pyapplies the same fallback order at its--gpudefault; the--gpubuild flag still wins over all defaults. Help text and comments updated in both places.The build order
The order is exactly preserved: the
--gpuflag first, thenDM_PSO_GPUSin the shell chain, then thepso_gpukey, theng18pfor a profile withpso_mtl4 on, thennone. Nothing a profile sets displaces an explicit build-flag value; the key only takes the placeg18pheld alone.Why a profile key
Each family's archive costs its own
metal-ttrun, so a profile names exactly the devices it serves, not a superset built on spec. The archive side is proven for the new family: runningdm/gfx/tools/pso_offline.py --gpu g19pover Super Mario Bros. Wonder's actual pair tables on this Mac (Apple M2 Pro, toolchainmetalfe-32023.922) compiled 3,697 bases into a 67 MB.mtl4ain 113 s, planning 27.5 s of that, with 1 pair left to the device and 0 function-constant pairs. Both families,pso_gpu g18p g19p, therefore cost two such runs in one build, where the key makes that a property of the profile rather than of every invocation's flags.Tests
The profile loader accepts profiles with and without the key. The validation cases the loader already had are extended where the neighbouring test pattern allowed: a single token, two tokens, an invalid token rejected and the absent key read as unset. The NSP script now consults
pso_gpuonly whenpso_mtl4is on, matching the shell build. A regression check covers both profile modes, whitespace-separated GPU families, explicit--gpuvalues and thePSO_GPUSsetting. The newdm/tools/tests/test_game_profile.pycovers the rejection cases on a synthetic profile (none, punctuation in a token, five tokens, comma-joined tokens).dm/gameshas no runtime code in this change;scripts/regress.py check --quickruns over Breath of the Wild's stored route (the only local game with a route and a baseline) as the header/packaging check of the same loaders, and its report lands here as the baseline-vs-candidate compare of the merge base and this branch.What this alone does not do
No shipped game changes: no profile in
dm/gamessets the key yet; the companion Super Mario Bros. Wonder profile PR does, and its device checks carry the open-on-device run. The device-side stamp/coverage probe of ag19parchive is the same mechanism every family's archive goes through; its run on the device belongs to that profile PR. One Oct 28 deployment-log note in the companion repository claimedg19parchives did not compile; the current toolchain compiles them fine (the run above), so that note is a record of an older attempt, not a current limit of this change.The branch is rebased onto
a662f29, which includes the upstreamt_fpslocksanitizer fix. The 32 pipeline-archive, profile-validation, documentation and environment-switch tests pass (one existing skip), and the pinned lint ratchet reports 392 baseline findings with no new findings.