GPU tests: a memory bench that drives the layer through the title's interface, without the game #111
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!111
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-111"
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?
@simbaui4life on GitHub · 2026-11-27 18:18 UTC · original
test/memory-bench→main· +878 −7 · 7 files · 1 commits · closed without mergingA memory bench for
victory-gpu. It drives the layer through the title-facing interface with synthetic frames, without the game, and reads what each memory class holds. One commit on29d8dbf. Test-only: the production changes are test hooks.This is a port of work originally made for avatarmanz/VIctory-7900XTX (that repository is no longer reachable). The numbers below were measured on this fork.
Why: memory changes are hard to judge without the game. This gives a repeatable footprint check that needs no game data, so a memory change can be measured before and after on any PC with a GPU.
What it drives (
crates/victory-gpu/src/host/membench.rs)queue::create,fence::create,list::create_allocator/create_list, andresource::test_bufferbuffers. Title memory comes from a write-watchedVirtualAllocallocator installed withresource::use_allocator.place_copy, so scratch, host copies and card copies are used.list::with_state+shadow::find/refreshcreate and read 4 MiB windows.release_held,frame::test_advance).VICTORY_THIN=1) are out of reach.Tests (ignored; each in a process of its own, because the bench installs the title allocator process-wide)
memory_bench_steady_state: 60 warm-up frames and 240 measured. It prints a table per class (host lists, scratch, host copies, windows, snapshots, fetch buffers, staging, blocks, made buffers, private bytes) and asserts that nothing grows.memory_bench_pressure_lets_idle_go: a spike, then idle with the PC's own free RAM (kept), then "1 GiB free" injected (let go). It lists what pressure does not reach.VICTORY_MEMBENCH_STRICT=1asserts that too.cargo test -p victory-gpu --lib memory_bench_steady_state -- --ignored --nocapture. AddVICTORY_RELAY=2 VICTORY_RELAY_COPY=1for the relay paths thatscripts/play-foxhound.ps1(andplay-nvidia.ps1,Play-VIctory.cmd) set.Test hooks (all
cfg(test))list::idle()reports the pool's count and bytes.host::FREE_RAM_SAIDoverridesavailable_physical_ram(). Unlike the original, it also reachesresidency::memory_status(), because on this forkresidency::pressured()is on by default and is what the sweep uses to sense low RAM.shadow::memory/windows,texture::memory/let_goandpool::memoryare nowcfg(any(test, feature = "diagnostics")).list::with_stateis nowpub(crate). The bench reads the process's memory itself, becausecopystatis diagnostics-only here.Numbers (RTX 4070 Ti, driver 621.01, Windows 11 26200, debug build, 32 GB RAM)
VICTORY_RELAY=2 VICTORY_RELAY_COPY=1)The bury lag is 16 submissions on this PC, not 64, because
residency::limited_host_ram()counts 32 GB or less as limited. On a bigger PC the landed lists and their scratch would be about four times as many.The launcher's full settings (every switch
play-foxhound.ps1sets by default,VICTORY_THIN=1among them;VICTORY_PIPELINE_BOOKleft out because it writes files): private bytes 714–911 MB after the warm-up, 110–159 host lists alive, 42–53 landed lists holding 130–169 MB. In 2 of 4 runs the steady-state check failed. Each time there was a single step of about +64 MB of shared memory, from 2 or 3 upload buffers made after the warm-up, and the other runs were flat. The thin path is outside what the bench drives (windows stay at 0 there), so I take these numbers as indicative only. I did not find what makes those buffers.Does it catch faults? I put in a scratch-chunk leak at reset on purpose. The steady-state test failed: private bytes went from 1.93 to 8.20 GB, with and without the relay. The injection was reverted.
What it shows on this fork (none of these grows across frames; they are plateaus that never come down)
simbaui4life:fix/scratch-at-landing.IDLE_MOST.1) never applies, because pooled lists hand back their scratch. Their allocators are kept for up to 512 lists.residency::pressured(), on by default here), but not the list pool or the fetch buffers. Pressure test, relay: windows 8 → 1, spare scratch 128 → 26 MB, pooled lists 68 → 68, relay fetch buffer 32 MB kept.Tested (RTX 4070 Ti)
cargo test -p victory-gpu: 418 passed, 2 failed, 37 ignored (the two bench tests among them). Onorigin/main(29d8dbf): 418 passed, 2 failed, 35 ignored.indirect::tests::host_list_budget_starts_empty_at_each_submissionandindirect::tests::warp_batch_charges_every_execution.watch::tests::what_is_put_in_beside_the_guards_is_told_at_every_viewfailed once in a full run on main and passed alone.-p victory-gpu --all-targets -D warningsadds nothing. main already fails it (26 errors in the lib, 28 in the lib tests:host/indirects.rs,host/send.rs,land.rs,shadow.rsand others).Not tested: other GPUs and AMD; a PC with more than 32 GB of RAM (bury lag 64); anything the bench cannot reach (see above).
No game data in the commits.
🤖 Generated with Claude Code
Pull request closed