perf(gpu): resolve eligible copied compute texture records at bind time #601

Open
github-bot wants to merge 31 commits from github-bot/gh-601 into main AGit
Owner

@⁠tommiehansen on GitHub · 2026-12-05 15:38 UTC · original
tommiehansen:perf/phase10-resolved-production-20261205 → main · +1174 −31 · 11 files · 31 commits · draft

Why

Repeated shader-side resolution of static compute texture descriptors requires redundant record/slot lookups, especially with divergent threads. Binding known immutable records ahead of dispatch may remove part of that work.

What changes

Opt-in VICTORY_RECORD_RESOLVED=1 resolves up to four distinct static compute texture SRVs in a copied table via existing canonical keys. Reuse prepared table/slot only when complete copied words, epoch and generation match. Dynamic/indexed, changed, ambiguous, unready, unavailable or exhausted entries use original lookup. Fence-held leases exclude reclaim/remirror; 16 MiB subarena within existing 64 MiB arena. Default off, cache identity v2.

Benchmark results

Historical synthetic Standard at 16323cf, WARP lookup fixture:

Workload Original Prepared Change
Mixed divergent 16-step lookup 59.321 ms 19.220 ms −67.6% raw medians
Snapshot CPU preparation, 256 KiB — 0.519–0.613 ms isolated cost

Six-method Quick/Standard: 96/96 paired snapshot wins versus carried lookup, −62.9% median paired change for Standard mixed divergent 16-step. Generic hints regressed and are not enabled. Current head has no measured production binder net time.

Why this should be merged

Prepared lookup shows strong synthetic potential, but full host-bind/dispatch cost and lifetime must justify it. Keep draft until actual patched-UM activation and representative benefit.

Validation

Initial exact outputs, four-record tests: 18 exact single/two-texture WARP cases including late updates/fallback. Lifetime/reuse and current reconciled 1f3f689 pass shader exactness, lease exclusion, cache identity, ABI and compile. Unchanged-main descriptor PSO control reproduces existing failure.
Actual State::bind + Dispatch fixture with 1–4 textures and late updates is compiled, not executed. Pinned AMD runner: patched UM, VICTORY_RECORD_PLACES=1, resolved 0/1, four Quick or eight Standard ABBA/BAAB blocks, exact RESOLVED_BIND_EXACT rows.

Compatibility and dependencies

Independent of HWRT and #606; not a general submission snapshot or direct-index replacement. Base 8c4e663; warm caches after changing modes. Physical SM6.6 and patched AMD UM required for full binder execution.

Archived previous description, checklist and historical measurements.

2026-12-06 — production preparation follow-up

The production resolved-record accumulator, copied snapshots and cached slot list now use the existing inline Few<_,4> storage; >4 entries retain the Vec overflow path. Existing exact keys, epochs, invalidation and fence-held leases are unchanged. CI 47598918321 passed the new inline/overflow test, existing ABI/lifetime controls and production compilation. The actual binder fixture now reports bind, record and full dispatch time separately. Paired CPU accumulator benchmark is not yet complete; it is not the full binder net-cost measurement. Patched AMD UM execution is still required. No promotion.

**@⁠tommiehansen** on GitHub · 2026-12-05 15:38 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/601) `tommiehansen:perf/phase10-resolved-production-20261205` → `main` · +1174 −31 · 11 files · 31 commits · draft ## Why Repeated shader-side resolution of static compute texture descriptors requires redundant record/slot lookups, especially with divergent threads. Binding known immutable records ahead of dispatch may remove part of that work. ## What changes Opt-in VICTORY_RECORD_RESOLVED=1 resolves up to four distinct static compute texture SRVs in a copied table via existing canonical keys. Reuse prepared table/slot only when complete copied words, epoch and generation match. Dynamic/indexed, changed, ambiguous, unready, unavailable or exhausted entries use original lookup. Fence-held leases exclude reclaim/remirror; 16 MiB subarena within existing 64 MiB arena. Default off, cache identity v2. ## Benchmark results Historical [synthetic Standard](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47530656944) at 16323cf, WARP lookup fixture: | Workload | Original | Prepared | Change | |---|---:|---:|---:| | Mixed divergent 16-step lookup | 59.321 ms | 19.220 ms | **−67.6% raw medians** | | Snapshot CPU preparation, 256 KiB | — | 0.519–0.613 ms | isolated cost | [Six-method Quick/Standard](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47542038788): 96/96 paired snapshot wins versus carried lookup, −62.9% median paired change for Standard mixed divergent 16-step. Generic hints regressed and are not enabled. Current head has no measured production binder net time. ## Why this should be merged Prepared lookup shows strong synthetic potential, but full host-bind/dispatch cost and lifetime must justify it. Keep draft until actual patched-UM activation and representative benefit. ## Validation [Initial exact outputs](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47535701868), [four-record tests](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47563663535): 18 exact single/two-texture WARP cases including late updates/fallback. [Lifetime/reuse](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47567632219) and [current reconciled 1f3f689](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47577257669) pass shader exactness, lease exclusion, cache identity, ABI and compile. [Unchanged-main descriptor PSO control](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47577277910) reproduces existing failure. Actual State::bind + Dispatch fixture with 1–4 textures and late updates is compiled, not executed. [Pinned AMD runner](https://github.com/tommiehansen/VIctory-xmem/blob/tracking/phases-8-10/validation/amd-production-gates.sh): patched UM, VICTORY_RECORD_PLACES=1, resolved 0/1, four Quick or eight Standard ABBA/BAAB blocks, exact RESOLVED_BIND_EXACT rows. ## Compatibility and dependencies Independent of HWRT and #606; not a general submission snapshot or direct-index replacement. Base 8c4e663; warm caches after changing modes. Physical SM6.6 and patched AMD UM required for full binder execution. [Archived previous description, checklist and historical measurements](https://github.com/tommiehansen/VIctory-xmem/blob/04dd44857abe222961157663b89a4dfed4c7277c/archive/pr-descriptions-20261206.md). ### 2026-12-06 — production preparation follow-up The production resolved-record accumulator, copied snapshots and cached slot list now use the existing inline `Few<_,4>` storage; >4 entries retain the Vec overflow path. Existing exact keys, epochs, invalidation and fence-held leases are unchanged. [CI 47598918321](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47598918321) passed the new inline/overflow test, existing ABI/lifetime controls and production compilation. The actual binder fixture now reports bind, record and full dispatch time separately. [Paired CPU accumulator benchmark](https://github.com/tommiehansen/VIctory-xmem/actions/runs/47600056533) is not yet complete; it is not the full binder net-cost measurement. Patched AMD UM execution is still required. No promotion.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-05 15:39:18 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/601/head:github-bot/gh-601'
git switch 'github-bot/gh-601'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-601'
git switch 'github-bot/gh-601'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-601'
git switch 'github-bot/gh-601'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-601'
git switch 'main'
git merge --squash 'github-bot/gh-601'
git switch 'main'
git merge --ff-only 'github-bot/gh-601'
git switch 'main'
git merge 'github-bot/gh-601'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.