perf: release-profile flags, AVX2 baseline, gate diagnostics allocato… #537
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/537"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by hqjake on 2026-11-28T00:31:20Z.
…r, cache single-flight
Four zero-code-risk changes aimed at the submission-prep wall (findings.md: 48 ms of a 55 ms water-scene frame).
Cargo.toml [profile.release]
lto = "thin", codegen-units = 1, panic = "abort", incremental = false.
Cross-crate inlining on the hot CPU path; drops landing pads from every
function in the hot command-list code.
.cargo/config.toml
target-cpu = x86-64-v3 for x86_64. The fork already assumes AVX2
(findings.md's title-byte compares); this lets rustc emit AVX2, BMI1/2
and FMA throughout, which is exactly what auto-vectorizes the prep
thread's dword scans and hashing.
crates/victory-gpu/src/copystat.rs
Gate the Counting global allocator and its backing arrays behind
cfg(any(feature = "diagnostics", test)). The allocator's own docstring
said "diagnostics builds only" but it was active in release, so every
allocation paid two atomics plus a small-block branch for stats nobody
reads outside the diagnostics build. Release now uses the system
allocator directly. Tests still install Counting under cfg(test).
crates/victory-pipeline/src/cache.rs
Single-flight per key + race-tolerant publish + peek().
Verification:
cargo test -p victory-pipeline -> 11/11 pass
cargo test -p victory-gpu -> 434/436 (two failing tests are
pre-existing live-D3D12 tests
that also fail on a clean
v2026.11.27.8 extraction)
cargo check --release -p victory-gpu -> clean, no new warnings
Expected: 5-10% off the submission-prep wall; neutral on GPU-bound scenes.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by POMXARK on 2026-11-28T02:11:04Z.
Testing feedback on AMD Ryzen 7 5700X (8C/16T), NVIDIA RTX 5080 16 GB, 32 GB RAM, Windows 11, Series X 1440p + DLSS Quality + DLSS MFG 4× (
4 MiBdefault windows,VICTORY_GPU_BCPACK=0,VICTORY_WAIT_RESIDENT=0,VICTORY_TEXTURE_ROOM_PERCENT=70,VICTORY_LAND_SKIP=1), full 12-minute (720 s) 3D A/B workload.Full disclosure: tested on a fork branch based on
v2026.11.27.7with local GPU patches, applying only the compiler profile subset of this PR:.cargo/config.toml:rustflags = ["-C", "target-cpu=x86-64-v3"]Cargo.toml[profile.release]:lto = "thin",codegen-units = 1(omittedpanic = "abort", see note below)Strictly 3D-only, draw-count-matched 12-minute A/B results
fps < 20,draws >= 100)x86-64-v3+ ThinLTO +cgu=1n=118vs113)9.7p50 /10.30mean (103.2 ms,Prep 81.6,copies 47.6)11.2p50 /11.55mean (89.1 ms,Prep 66.7,copies 35.3)+15.5%p50 (-14.1 ms)7.9p50 /7.09mean (126.7 ms,Prep 92.8,copies 60.7)9.4p50 /9.20mean (106.4 ms,Prep 73.0,copies 47.2)+19.0%p50 /+29.8%mean7k–10k draws) (p50 ~8.35k)8.45p50 /7.81mean (118.6 ms,Prep 89.4)9.30p50 /9.37mean (107.4 ms,Prep 73.9)+10.1%p50 /+20.0%mean>=10k draws) (p50 ~11k)7.20p50 /6.45mean (139.9 ms)7.80p50 /8.62mean (127.6 ms)+8.3%p50 /+33.6%meanSharedMax 9776 MB,0errors /0DevRemSharedMax 9261 MB,0errors /0DevRemTwo code-review notes
panic = "abort"in[profile.release]: there are 6 activestd::panic::catch_unwindsites in worker loops (crates/victory-gpu/src/descriptor.rs,host/aside.rs,list/thin.rs,land.rs,queue/behind.rs). Settingpanic = "abort"turns any caught worker panic into an immediate process abort, so keeping defaultpanic = "unwind"is safer.#[global_allocator] Countingincopystat.rs: incrates/victory-gpu/src/lib.rs,mod copystat;is already gated behind#[cfg(all(windows, feature = "diagnostics"))], so plain release builds were not compilingCounting(adding the inner#[cfg]insidecopystat.rsis still harmless).Pull request closed