GPU: configurable write-watch range grouping with synthetic benchmarks #70

Open
github-bot wants to merge 4 commits from github-bot/gh-70 into main AGit
Owner

@⁠vascomfduarte on GitHub · 2026-11-26 05:08 UTC · original
vascomfduarte:contribution/write-watch-grouping → main · +729 −1 · 3 files · 4 commits · open

<html>

Motivation

The current write-watch grouping strategy uses a fixed 8 MiB gap threshold. While grouping nearby ranges reduces kernel calls, grouping widely dispersed ranges can introduce significant query amplification.

This PR introduces an optional configuration parameter to investigate that trade-off without changing the default behaviour.

Changes

  • Introduce VICTORY_AHEAD_GAP_KIB, accepting values from 0 to 8192 KiB in 64 KiB increments.

  • Preserve the existing 8192 KiB default, including fallback for invalid values.

  • Add synthetic tests covering write coherence and allocation lifecycle.

  • Add grouping and integrated shadow-buffer scaling benchmarks, with test-only kernel query instrumentation.

  • Document the experimental methodology, results and limitations.

Performance results

Tested against commit 64bd58f on Windows 11, Ryzen 5 5600X, RX 6700 XT (12 GB) and 32 GB RAM.

Comparing 512 KiB against the existing 8192 KiB threshold:

Metric | 32 buffers | 128 buffers -- | -- | -- Geometric mean submission time reduction | 1.12% | 3.64% Geometric mean kernel query time reduction | 38.85% | 41.48% Dispersed range query volume reduction | 96.88% | 96.95%

The strongest measured kernel query time reduction was 71.64%. For 128 dispersed buffers, total synthetic submission time improved by 8.27–12.74%, depending on the dirty-memory workload.

The integrated benchmark comprised 40 independent executions, 360 scenario measurements and 10,800 timed samples, with no readback or recorded kernel query failures.

Validation

  • Full sequential workspace suite: 708 passed, 0 failed.

  • GPU sequential suite after formatting: 240 passed, 0 failed.

  • Isolated coherence and allocation lifecycle tests: 50/50 passed across five grouping thresholds.

  • Workspace Clippy with -D warnings: passed with both default and all features.

  • Asset policy: passed.

  • Existing repository formatting differences preserved.

Limitations

The 512 KiB threshold is not universally optimal. Contiguous workloads showed small measured slowdowns despite identical query counts and queried volumes. The existing default is therefore unchanged.

Parallel GPU test execution exhibited intermittent failures in both the unmodified baseline and the proposed implementation. Each configuration completed 8 out of 10 runs successfully. This limited sample does not establish concurrency equivalence.

These are synthetic performance measurements, not claims of improved in-game FPS.

Full methodology, reproduction commands and detailed results are available in docs/research/E02-write-watch-grouping.md.

Additional notes

This contribution was developed with AI assistance for code implementation, experimental design, analysis and documentation. Compilation, tests and benchmarks were executed locally on physical hardware.

The PR adds only source code, synthetic tests and documentation. No proprietary assets or external runtime captures are included.

Feedback on the grouping strategy and benchmark methodology is welcome.

</html>
**@⁠vascomfduarte** on GitHub · 2026-11-26 05:08 UTC · [original](https://github.com/DexNom/VIctory/pull/70) `vascomfduarte:contribution/write-watch-grouping` → `main` · +729 −1 · 3 files · 4 commits · open <html> <body> <!--StartFragment--><h2><span>Motivation</span></h2><p><span>The current write-watch grouping strategy uses a fixed 8 MiB gap threshold. While grouping nearby ranges reduces kernel calls, grouping widely dispersed ranges can introduce significant query amplification.</span></p><p><span>This PR introduces an optional configuration parameter to investigate that trade-off without changing the default behaviour.</span></p><h2><span>Changes</span></h2><ul><li><p><span>Introduce </span><code><span>VICTORY_AHEAD_GAP_KIB</span></code><span>, accepting values from 0 to 8192 KiB in 64 KiB increments.</span></p></li><li><p><span>Preserve the existing 8192 KiB default, including fallback for invalid values.</span></p></li><li><p><span>Add synthetic tests covering write coherence and allocation lifecycle.</span></p></li><li><p><span>Add grouping and integrated shadow-buffer scaling benchmarks, with test-only kernel query instrumentation.</span></p></li><li><p><span>Document the experimental methodology, results and limitations.</span></p></li></ul><h2><span>Performance results</span></h2><p><span>Tested against commit </span><code><span>64bd58f</span></code><span> on Windows 11, Ryzen 5 5600X, RX 6700 XT (12 GB) and 32 GB RAM.</span></p><p><span>Comparing 512 KiB against the existing 8192 KiB threshold:</span></p> Metric | 32 buffers | 128 buffers -- | -- | -- Geometric mean submission time reduction | 1.12% | 3.64% Geometric mean kernel query time reduction | 38.85% | 41.48% Dispersed range query volume reduction | 96.88% | 96.95% <p><span>The strongest measured kernel query time reduction was 71.64%. For 128 dispersed buffers, total synthetic submission time improved by 8.27–12.74%, depending on the dirty-memory workload.</span></p><p><span>The integrated benchmark comprised 40 independent executions, 360 scenario measurements and 10,800 timed samples, with no readback or recorded kernel query failures.</span></p><h2><span>Validation</span></h2><ul><li><p><span>Full sequential workspace suite: 708 passed, 0 failed.</span></p></li><li><p><span>GPU sequential suite after formatting: 240 passed, 0 failed.</span></p></li><li><p><span>Isolated coherence and allocation lifecycle tests: 50/50 passed across five grouping thresholds.</span></p></li><li><p><span>Workspace Clippy with </span><code><span>-D warnings</span></code><span>: passed with both default and all features.</span></p></li><li><p><span>Asset policy: passed.</span></p></li><li><p><span>Existing repository formatting differences preserved.</span></p></li></ul><h2><span>Limitations</span></h2><p><span>The 512 KiB threshold is not universally optimal. Contiguous workloads showed small measured slowdowns despite identical query counts and queried volumes. The existing default is therefore unchanged.</span></p><p><span>Parallel GPU test execution exhibited intermittent failures in both the unmodified baseline and the proposed implementation. Each configuration completed 8 out of 10 runs successfully. This limited sample does not establish concurrency equivalence.</span></p><p><span>These are synthetic performance measurements, not claims of improved in-game FPS.</span></p><p><span>Full methodology, reproduction commands and detailed results are available in </span><code><span>docs/research/E02-write-watch-grouping.md</span></code><span>.</span></p><h2><span>Additional notes</span></h2><p><span>This contribution was developed with AI assistance for code implementation, experimental design, analysis and documentation. Compilation, tests and benchmarks were executed locally on physical hardware.</span></p><p><span>The PR adds only source code, synthetic tests and documentation. No proprietary assets or external runtime captures are included.</span></p><p><span>Feedback on the grouping strategy and benchmark methodology is welcome.</span></p><!--EndFragment--> </body> </html>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:25:15 +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/70/head:github-bot/gh-70'
git switch 'github-bot/gh-70'

Merge

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