Pack & pool: pack tiny before-twin hash buffers in 4 MiB chunks (VICTORY_PACK_SMALL) and trim idle pools (VICTORY_POOL_TRIM) #11
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/ImTaneax--VIctory-RTX3050-4gb!11
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-11"
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?
@adib-cyber007 on GitHub · 2026-12-02 16:30 UTC · original
adib-cyber007:pr/10-pack-small-and-pool-trim→main· +623 −21 · 5 files · 1 commits · openPort of
trustno1-coder/VIctory-NVIDIA8f7f28a7(GPL-3.0), adapted cleanly for 4 GB VRAM GPUs without requiringcardledger.rs.Why (~200 MB real VRAM + host pool savings)
before-twinhash buffers (VICTORY_PACK_SMALL=1, off by default):D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT). Each 64 KiB card copy'sbeforehash table is only 48 bytes, yet ~3,200 of them burn ~200 MB of real VRAM (and Issue #1's log showed 4,775 committed card buffers).VICTORY_PACK_SMALL=1,crate::pack::BEFOREsub-allocates power-of-two slots (256 B ..= 32 KiB) inside shared 4 MiB UAV chunks (3,200 typicalbefore-twintables fit in one 4 MiB chunk).COMMON(implicit UAV promotion per command list), are only accessed via root UAV GPU virtual addresses (shadow.card_before_gpu()), and dropped slots return safely throughhost::retirebehind in-flight submissions +bury_lag.VICTORY_POOL_TRIM=1, off by default):Pool::grewon every block allocation; onceVICTORY_POOL_TRIM_SECS(default10s) passes without growth, staging releases empty blocks down to at most1.0whenever VRAM usage exceedsVICTORY_POOL_TRIM_CARD_MB(defaults to 85% of DXGI budget on ≤6 GiB GPUs, or10,000 MBon larger cards).Toggles
VICTORY_PACK_SMALL=1(default off for clean A/B testing)VICTORY_POOL_TRIM=1(default off; optionalVICTORY_POOL_TRIM_SECS=<n>,VICTORY_POOL_TRIM_CARD_MB=<mb>)Verification
host::tests::packed_hash_slots_compare_as_buffers_of_their_ownpassed (verifying bit-exact compute shader hashing/comparison across multiple packed slots in one 4 MiB chunk + clean slot reuse).pack::tests(power-of-two classes, 20,000-op randomized non-overlap/alignment fuzz, 3,200 downtown hashes fitting 1 chunk, alignment gap splitting) passed.pool::tests(includingtrimmed_pools_keep_empty_blocks_only_after_recent_growthandcard_over_target_scales_for_4gb_gpus) passed.--features diagnosticschecks compile with zero new warnings.VICTORY_PACK_SMALL=1andVICTORY_POOL_TRIM=1.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.