Host: batch multi-span card rehash/compare passes (CARD_COMPARE_BATCH) and bitset piece joins #1633

Open
github-bot wants to merge 1 commit from github-bot/gh-1633 into main AGit
Owner

@⁠Bazovsky on GitHub · 2026-11-28 22:43 UTC · original
Bazovsky:pr/card-compare-batch → main · +89 −48 · 1 files · 1 commits · open

Fixes #

What it changes

Reduces per-frame compute dispatch and CPU piece-joining overhead for card-resident buffer rehash and compare passes:

  • Batched CARD_COMPARE_BATCH compute shader (crates/victory-gpu/src/host.rs): adds a table-driven variant of CARD_COMPARE whose root SRV (t1) holds [piece, out_at_bytes] pairs in a 2 MiB upload ring (CardWork::jobs). Multiple disjoint rehash runs of a copy in card_before (sync pass) and multiple scattered declared spans sharing (buf_gpu, before_gpu, skew, size, mode) in the post-submission compare pass collapse into one batched dispatch per copy/mode (splitting at 65,535 thread groups and falling back cleanly to per-span CARD_COMPARE if the jobs ring is full). Enabled by default; VICTORY_CARD_BATCH=0 disables it.
  • O(ranges + pieces) bitset piece join (crates/victory-gpu/src/shadow.rs): replaces allocating and sorting tens of thousands of per-range CardSpan structs in card_before (rehash_runs || send::own) with Shadow::card_piece_runs / card_piece_runs_of, using a compact u64 bitset over the copy's 64 KiB pieces.
  • Diagnostics / replay naming (crates/victory-gpu/src/replay/play.rs, upcopies.rs): names the batch PSO COMPARE_BATCH ("victory: card compare batch") and includes it in hash and compares pipeline sets so timing and --skip-hash-passes recognise it cleanly.
  • Tests (crates/victory-gpu/src/indirect.rs, shadow.rs): adds warp_card_compare_batch_matches_single_pass (runs CARD_COMPARE and CARD_COMPARE_BATCH side-by-side on WARP with an upload-heap jobs buffer across modes 0/1/2, duplicate mode-0 pieces, non-zero skew, scattered pieces, and non-zero job_base, asserting bit-exact differs and hashes) and fixed-seed randomized parity tests for card_piece_runs_of vs joined_piece_runs.

How it was tested

  • GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA RTX 5090 32 GB (driver 610.88), AMD Ryzen 9 9950X3D (16C/32T, 96 MB 3D V-Cache), 62 GB RAM, Windows 11; Series X profile, 1440p SDR, DLSS Quality, Frame Generation OFF, RT default. Identical release builds (RUSTFLAGS="-C target-cpu=znver5") on clean origin/main (d4b5d51), 90 s same-session A/B runs (aligned steady window DLSS frames 100..1800, 0 D3D12 errors).
  • Before (d4b5d51): median 26.80 ms (37.3 fps), p95 36.30 ms, Prep 26.05 ms, GPU busy 63%, 251 hash passes/frame (356 compare passes/frame), 1,839 DLSS frames in 90 s.
  • After (pr/card-compare-batch, 4e1f3e8): median 25.40 ms (39.4 fps, +2.1 fps / +5.6%), p95 31.40 ms (-4.90 ms), Prep 23.80 ms (-2.25 ms), GPU busy 67%, 67 hash passes/frame (352 compare passes/frame), 1,999 DLSS frames (+160) in 90 s.
  • For shader changes, the wave sizes tested (32 and/or 64 lanes): CARD_COMPARE_BATCH uses no wave intrinsics (pure [numthreads(64, 1, 1)] + groupshared reduction, token-identical hash body to CARD_COMPARE); tested on NVIDIA RTX 5090 (32 lanes) and Windows WARP (warp_card_compare_batch_matches_single_pass).
  • cargo test passed for the crates it touches: yes (victory-gpu: 552 passed, 0 failed — 515 non-watch + 37 watch::tests serial; clippy + --features diagnostics check clean with 0 new warnings).

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: # (none found touching CARD_COMPARE batching or bitset card_piece_runs).
**@⁠Bazovsky** on GitHub · 2026-11-28 22:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633) `Bazovsky:pr/card-compare-batch` → `main` · +89 −48 · 1 files · 1 commits · open Fixes # ## What it changes Reduces per-frame compute dispatch and CPU piece-joining overhead for card-resident buffer rehash and compare passes: - **Batched `CARD_COMPARE_BATCH` compute shader (`crates/victory-gpu/src/host.rs`)**: adds a table-driven variant of `CARD_COMPARE` whose root SRV (`t1`) holds `[piece, out_at_bytes]` pairs in a 2 MiB upload ring (`CardWork::jobs`). Multiple disjoint rehash runs of a copy in `card_before` (sync pass) and multiple scattered declared spans sharing `(buf_gpu, before_gpu, skew, size, mode)` in the post-submission compare pass collapse into one batched dispatch per copy/mode (splitting at 65,535 thread groups and falling back cleanly to per-span `CARD_COMPARE` if the jobs ring is full). Enabled by default; `VICTORY_CARD_BATCH=0` disables it. - **O(ranges + pieces) bitset piece join (`crates/victory-gpu/src/shadow.rs`)**: replaces allocating and sorting tens of thousands of per-range `CardSpan` structs in `card_before` (`rehash_runs || send::own`) with `Shadow::card_piece_runs` / `card_piece_runs_of`, using a compact `u64` bitset over the copy's 64 KiB pieces. - **Diagnostics / replay naming (`crates/victory-gpu/src/replay/play.rs`, `upcopies.rs`)**: names the batch PSO `COMPARE_BATCH` (`"victory: card compare batch"`) and includes it in `hash` and `compares` pipeline sets so timing and `--skip-hash-passes` recognise it cleanly. - **Tests (`crates/victory-gpu/src/indirect.rs`, `shadow.rs`)**: adds `warp_card_compare_batch_matches_single_pass` (runs `CARD_COMPARE` and `CARD_COMPARE_BATCH` side-by-side on WARP with an upload-heap jobs buffer across modes 0/1/2, duplicate mode-0 pieces, non-zero `skew`, scattered pieces, and non-zero `job_base`, asserting bit-exact `differs` and `hashes`) and fixed-seed randomized parity tests for `card_piece_runs_of` vs `joined_piece_runs`. ## How it was tested - GPU and profile (Series X or S, resolution, DLSS, frame generation, ray tracing): NVIDIA RTX 5090 32 GB (driver 610.88), AMD Ryzen 9 9950X3D (16C/32T, 96 MB 3D V-Cache), 62 GB RAM, Windows 11; Series X profile, 1440p SDR, DLSS Quality, Frame Generation OFF, RT default. Identical release builds (`RUSTFLAGS="-C target-cpu=znver5"`) on clean `origin/main` (`d4b5d51`), 90 s same-session A/B runs (aligned steady window DLSS frames 100..1800, 0 D3D12 errors). - Before (`d4b5d51`): median **26.80 ms (37.3 fps)**, p95 **36.30 ms**, Prep **26.05 ms**, GPU busy **63%**, **251 hash passes/frame** (356 compare passes/frame), **1,839** DLSS frames in 90 s. - After (`pr/card-compare-batch`, `4e1f3e8`): median **25.40 ms (39.4 fps, +2.1 fps / +5.6%)**, p95 **31.40 ms (-4.90 ms)**, Prep **23.80 ms (-2.25 ms)**, GPU busy **67%**, **67 hash passes/frame** (352 compare passes/frame), **1,999** DLSS frames (+160) in 90 s. - For shader changes, the wave sizes tested (32 and/or 64 lanes): `CARD_COMPARE_BATCH` uses no wave intrinsics (pure `[numthreads(64, 1, 1)]` + `groupshared` reduction, token-identical hash body to `CARD_COMPARE`); tested on NVIDIA RTX 5090 (32 lanes) and Windows WARP (`warp_card_compare_batch_matches_single_pass`). - `cargo test` passed for the crates it touches: yes (`victory-gpu`: 552 passed, 0 failed — 515 non-watch + 37 `watch::tests` serial; `clippy` + `--features diagnostics` check clean with 0 new warnings). ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: # (none found touching `CARD_COMPARE` batching or bitset `card_piece_runs`).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 22:46:36 +00:00
Author
Owner

@⁠POMXARK on GitHub · 2026-11-29 00:13 UTC · original

@⁠Bazovsky — ran a full 20-minute gameplay A/B of CARD_COMPARE_BATCH + bitset card_piece_runs stacked on top of #1637 (Windows 11, RTX 5080 16 GB, Ryzen 7 5700X 8C/16T, 32 GB RAM, Series X 1440p, DLSS Quality + MFG 4x, release build, matched save & switches):

Verification

  • Unit tests: card_piece_runs_bitset_matches_joined_piece_runs + warp_card_compare_batch_matches_single_pass + warp_card_compare_stores_the_hash_it_made_when_told 3/3 PASS (0.29s).
  • Stability & Visuals: 0 errors over 20 minutes, refused=2, clean visuals across all 16 captured screenshots.

20-minute A/B (#1637 baseline vs #1637 + #1633)

Metric Baseline (#1637) + PR #1633 (CARD_COMPARE_BATCH) Delta
Card hash dispatches / frame (med) 160 / f 48 / f -70.0% (-112 dispatches/f)
Card compare dispatches / frame (med) 334 / f 328 / f -1.8%
ALL 3D p50 FPS 13.55 FPS (73.8 ms) 14.20 FPS (70.3 ms) +4.8% (-3.5 ms)
1k–4k draws p50 16.60 FPS (60.2 ms) 17.10 FPS (58.5 ms) +3.0% (-1.7 ms)
4k–7k draws p50 13.70 FPS (53.6 MB, 2.02 MB/ms) 13.60 FPS (59.0 MB, 2.08 MB/ms) +3.0% MB/ms
7k–10k draws p50 9.70 FPS (103.2 ms, 85.9 MB) 10.45 FPS (95.6 ms, 85.8 MB) +7.7% (-7.6 ms)
Submitting thread med 69.4 ms (card 8.9 ms) 63.6 ms (card 8.7 ms) -5.8 ms
Copy-back med 11.6 ms 11.0 ms -0.6 ms
Frame p95 / >100ms (5s bins) 149.5 ms / 48 135.4 ms / 36 -14.1 ms p95 / -25% >100ms
Peak Commit 31,456 MB 30,886 MB -570 MB

Clean win across every bucket and frame-pacing metric! Note that post-submission compare dispatches stayed ~328/f (vs 334/f) because most declared ranges have indices.len() == 1 per (buf_gpu, before_gpu, skew, size, mode) group, while sync-pass hash dispatches collapsed by 70% (160 -> 48/f).

**@⁠POMXARK** on GitHub · 2026-11-29 00:13 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7247958981) @⁠Bazovsky — ran a full 20-minute gameplay A/B of `CARD_COMPARE_BATCH` + bitset `card_piece_runs` stacked on top of `#1637` (Windows 11, RTX 5080 16 GB, Ryzen 7 5700X 8C/16T, 32 GB RAM, Series X 1440p, DLSS Quality + MFG 4x, release build, matched save & switches): ### Verification - **Unit tests:** `card_piece_runs_bitset_matches_joined_piece_runs` + `warp_card_compare_batch_matches_single_pass` + `warp_card_compare_stores_the_hash_it_made_when_told` **3/3 PASS** (`0.29s`). - **Stability & Visuals:** `0` errors over 20 minutes, `refused=2`, clean visuals across all 16 captured screenshots. ### 20-minute A/B (`#1637` baseline vs `#1637 + #1633`) | Metric | Baseline (`#1637`) | + PR #1633 (`CARD_COMPARE_BATCH`) | Delta | |---|---:|---:|---:| | **Card hash dispatches / frame (med)** | 160 / f | **48 / f** | **-70.0% (-112 dispatches/f)** | | Card compare dispatches / frame (med) | 334 / f | 328 / f | -1.8% | | **ALL 3D p50 FPS** | 13.55 FPS (`73.8 ms`) | **14.20 FPS** (`70.3 ms`) | **+4.8% (`-3.5 ms`)** | | **1k–4k draws p50** | 16.60 FPS (`60.2 ms`) | **17.10 FPS** (`58.5 ms`) | **+3.0% (`-1.7 ms`)** | | **4k–7k draws p50** | 13.70 FPS (`53.6 MB`, `2.02 MB/ms`) | 13.60 FPS (`59.0 MB`, **2.08 MB/ms**) | **+3.0% MB/ms** | | **7k–10k draws p50** | 9.70 FPS (`103.2 ms`, `85.9 MB`) | **10.45 FPS** (`95.6 ms`, `85.8 MB`) | **+7.7% (`-7.6 ms`)** | | **Submitting thread med** | 69.4 ms (`card 8.9 ms`) | **63.6 ms** (`card 8.7 ms`) | **-5.8 ms** | | **Copy-back med** | 11.6 ms | **11.0 ms** | **-0.6 ms** | | **Frame p95 / `>100ms` (5s bins)** | 149.5 ms / 48 | **135.4 ms / 36** | **-14.1 ms p95 / -25% >100ms** | | Peak Commit | 31,456 MB | **30,886 MB** | **-570 MB** | Clean win across every bucket and frame-pacing metric! Note that post-submission `compare` dispatches stayed ~328/f (vs 334/f) because most declared ranges have `indices.len() == 1` per `(buf_gpu, before_gpu, skew, size, mode)` group, while sync-pass `hash` dispatches collapsed by **70%** (`160 -> 48/f`).
github-bot force-pushed github-bot/gh-1633 from 4e1f3e802c to 330d1c2781 2026-11-29 01:46:53 +00:00 Compare
Author
Owner

@⁠Bazovsky on GitHub · 2026-11-29 01:43 UTC · original

Thanks @⁠POMXARK for the thorough 20-minute Ryzen 7 5700X + RTX 5080 A/B! Great to see the -70% sync hash dispatch drop (160 -> 48/f), +4.8% ALL 3D p50 FPS, and -14.1 ms p95 confirmed on an 8C/16T + 5080 setup (and spot-on explanation for why post-submission compares mostly stay single-span).

Rebased onto origin/main (d585f88 -> 330d1c2) and updated CARD_COMPARE_BATCH to compile via crate::hlsl::compile_for for Wine/Proton DXC fallback parity (0fd34ca/8fb73e2). Verified with clippy (default + --features diagnostics, 0 new warnings) and native Windows victory-gpu tests (591/591 pass).

**@⁠Bazovsky** on GitHub · 2026-11-29 01:43 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7248971418) Thanks @⁠POMXARK for the thorough 20-minute Ryzen 7 5700X + RTX 5080 A/B! Great to see the -70% sync hash dispatch drop (`160 -> 48/f`), +4.8% ALL 3D p50 FPS, and -14.1 ms p95 confirmed on an 8C/16T + 5080 setup (and spot-on explanation for why post-submission compares mostly stay single-span). Rebased onto `origin/main` (`d585f88` -> `330d1c2`) and updated `CARD_COMPARE_BATCH` to compile via `crate::hlsl::compile_for` for Wine/Proton DXC fallback parity (`0fd34ca`/`8fb73e2`). Verified with `clippy` (default + `--features diagnostics`, 0 new warnings) and native Windows `victory-gpu` tests (591/591 pass).
Author
Owner

@⁠POMXARK on GitHub · 2026-11-29 03:00 UTC · original

@⁠Bazovsky — following up on why post-submission compare dispatches stay single-span (~315–328/f) even with CARD_COMPARE_BATCH: we prototyped and benchmarked a clean-room SM 5.1 bounded bindless multi-buffer variant (CARD_COMPARE_MULTI_BATCH, using ByteAddressBuffer bufs[1024] : register(t0, space1) and RWByteAddressBuffer hashes[1024] : register(u0, space2) with a 32-byte per-piece job [buf_idx, piece, out_at, skew, size, mode]) on native RTX 5080 D3D12.

Hardware D3D12 Microbenchmark (NVIDIA RTX 5080, 17 submissions × 19 distinct buffers × 2 pieces = 646 pieces/f)

Path Dispatches / frame CPU Record GPU + Sync Total Bit-exact differs
Per-span fallback (CARD_COMPARE) 646 (1 per span) 0.094 ms/f 0.099 ms/f 0.192 ms/f Reference
Bounded Bindless Multi-Batch (1/submission) 17 (-95%) 0.014 ms/f (6.54x faster) 0.099 ms/f 0.113 ms/f (1.70x) 646/646 EXACT
Bounded Bindless Mega-Batch (1/frame) 1 0.010 ms/f (9.03x faster) 0.111 ms/f 0.121 ms/f 646/646 EXACT

Using a bounded [1024] table instead of unbounded compiles cleanly via cs_5_1 / DXC with zero special flags and keeps PIX/RenderDoc frame captures happy. Clean-room HLSL reference: https://github.com/POMXARK/bcpack-gpu-sdk/blob/main/shaders/card_compare_multi_batch.hlsl — could be a natural follow-up once #1633 lands!

**@⁠POMXARK** on GitHub · 2026-11-29 03:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7249780421) @⁠Bazovsky — following up on why post-submission `compare` dispatches stay single-span (~315–328/f) even with `CARD_COMPARE_BATCH`: we prototyped and benchmarked a clean-room **SM 5.1 bounded bindless multi-buffer variant** (`CARD_COMPARE_MULTI_BATCH`, using `ByteAddressBuffer bufs[1024] : register(t0, space1)` and `RWByteAddressBuffer hashes[1024] : register(u0, space2)` with a 32-byte per-piece job `[buf_idx, piece, out_at, skew, size, mode]`) on native RTX 5080 D3D12. ### Hardware D3D12 Microbenchmark (NVIDIA RTX 5080, 17 submissions × 19 distinct buffers × 2 pieces = 646 pieces/f) | Path | Dispatches / frame | CPU Record | GPU + Sync | Total | Bit-exact `differs` | |---|---:|---:|---:|---:|---| | Per-span fallback (`CARD_COMPARE`) | `646` (1 per span) | `0.094 ms/f` | `0.099 ms/f` | `0.192 ms/f` | Reference | | **Bounded Bindless Multi-Batch (1/submission)** | **`17` (`-95%`)** | **`0.014 ms/f` (`6.54x` faster)** | `0.099 ms/f` | **`0.113 ms/f` (`1.70x`)** | **646/646 EXACT** | | **Bounded Bindless Mega-Batch (1/frame)** | **`1`** | **`0.010 ms/f` (`9.03x` faster)** | `0.111 ms/f` | `0.121 ms/f` | **646/646 EXACT** | Using a bounded `[1024]` table instead of `unbounded` compiles cleanly via `cs_5_1` / DXC with zero special flags and keeps PIX/RenderDoc frame captures happy. Clean-room HLSL reference: https://github.com/POMXARK/bcpack-gpu-sdk/blob/main/shaders/card_compare_multi_batch.hlsl — could be a natural follow-up once #1633 lands!
Author
Owner

@⁠NotADonky43 on GitHub · 2026-11-29 03:27 UTC · original

RTX 5070 Ti / Series X opening: applied the PR at 330d1c27 on cumulative 7f78e8f7 (main d1486134). Four runs, control/candidate/candidate/control, same starting profile, 25,728 precompiled shaders and identical native library seed; warmed each executable. All four reached six settled heavy rendering reports. Send rehash dispatches/frame fell 216 → 65.5 and 218 → 67; piece counts stayed close (330 → 323 / 334 → 333). Post-list compare dispatches stayed near 350–360. Median of reported p95s (control vs candidate) 57.95 vs 62.35 ms, reverse 58.7 vs 57.0 ms. Peak process private GiB 26.48 vs 27.86 / 26.45 vs 27.34. Non-identical shots; this is mechanism confirmation, not evidence for an FPS win or a leak. Bitset range parity, the single vs batch shader outputs on both WARP and real hardware, and separate segmented upload GPU readback all passed locally.

One portability issue I did find: with VICTORY_CARD_BATCH=0 setup still requires the second shader/PSO and 2 MiB job buffer; a failure caches the whole card path as unavailable. Source-only companion patch, applies to 330d1c27 (git am). It skips batch setup when disabled and keeps the single-span path on a healthy device if optional setup fails; a device loss still propagates. Native D3D12 tests exercised disabled (constructor must not be called), injected optional refusal, and real successful batch setup. Existing WARP and bitset tests and a release build passed. This is separate from the four timing runs. Posting the patch here rather than a duplicate parent PR: my fork credentials cannot push a branch with the parent’s newer workflow history.

**@⁠NotADonky43** on GitHub · 2026-11-29 03:27 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7250056890) RTX 5070 Ti / Series X opening: applied the PR at `330d1c27` on cumulative `7f78e8f7` (main `d1486134`). Four runs, control/candidate/candidate/control, same starting profile, 25,728 precompiled shaders and identical native library seed; warmed each executable. All four reached six settled heavy rendering reports. Send rehash dispatches/frame fell **216 → 65.5** and **218 → 67**; piece counts stayed close (330 → 323 / 334 → 333). Post-list compare dispatches stayed near 350–360. Median of reported p95s (control vs candidate) **57.95 vs 62.35 ms**, reverse **58.7 vs 57.0 ms**. Peak process private GiB 26.48 vs 27.86 / 26.45 vs 27.34. Non-identical shots; this is mechanism confirmation, not evidence for an FPS win or a leak. Bitset range parity, the single vs batch shader outputs on both WARP and real hardware, and separate segmented upload GPU readback all passed locally. One portability issue I did find: with `VICTORY_CARD_BATCH=0` setup still requires the second shader/PSO and 2 MiB job buffer; a failure caches the whole card path as unavailable. [Source-only companion patch](https://github.com/NotADonky43/VIctory-NVIDIA/blob/3e3c43ebbafec743153d2fa09da15b21f09a8050/contrib/0001-Keep-single-pass-card-work-available-without-batch-r.patch), applies to `330d1c27` (`git am`). It skips batch setup when disabled and keeps the single-span path on a healthy device if optional setup fails; a device loss still propagates. Native D3D12 tests exercised disabled (constructor must not be called), injected optional refusal, and real successful batch setup. Existing WARP and bitset tests and a release build passed. This is separate from the four timing runs. Posting the patch here rather than a duplicate parent PR: my fork credentials cannot push a branch with the parent’s newer workflow history.
Author
Owner

@⁠Bazovsky on GitHub · 2026-11-29 05:32 UTC · original

Thanks @⁠NotADonky43 for the RTX 5070 Ti verification (216 -> 65.5 / 218 -> 67 send rehash dispatches/f) and for catching the VICTORY_CARD_BATCH=0 / fallback portability bug!
I applied your companion patch (c6023a1, preserving authorship) directly onto this PR and verified it with:

  • cargo xwin clippy (default) + --features diagnostics: 0 new warnings
  • Native Windows victory-gpu tests: 591/591 PASS (553 + 38)
  • New D3D12 test host::card_compare_batch_is_optional --ignored: PASS (0.39s on RTX 5090)

And thanks @⁠POMXARK for the bounded bindless CARD_COMPARE_MULTI_BATCH prototype (646 -> 17 dispatches/f, 6.54x faster CPU record, bit-exact 646/646) — agreed, that looks like a very clean follow-up PR once #1633 lands!

**@⁠Bazovsky** on GitHub · 2026-11-29 05:32 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7251312153) Thanks @⁠NotADonky43 for the RTX 5070 Ti verification (`216 -> 65.5` / `218 -> 67` send rehash dispatches/f) and for catching the `VICTORY_CARD_BATCH=0` / fallback portability bug! I applied your companion patch (`c6023a1`, preserving authorship) directly onto this PR and verified it with: - `cargo xwin clippy` (default) + `--features diagnostics`: 0 new warnings - Native Windows `victory-gpu` tests: **591/591 PASS** (553 + 38) - New D3D12 test `host::card_compare_batch_is_optional --ignored`: **PASS** (`0.39s` on RTX 5090) And thanks @⁠POMXARK for the bounded bindless `CARD_COMPARE_MULTI_BATCH` prototype (`646 -> 17` dispatches/f, `6.54x` faster CPU record, bit-exact 646/646) — agreed, that looks like a very clean follow-up PR once #1633 lands!
Author
Owner

@⁠amazedturnip on GitHub · 2026-11-29 05:38 UTC · original

Tested on 9800X3D + RTX 5070 Ti 16 GB in a combined perf stack across 20+ min sessions. CARD_COMPARE_BATCH ran cleanly with zero shadow/copy corruption and lower submit-thread overhead.

**@⁠amazedturnip** on GitHub · 2026-11-29 05:38 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7251375258) Tested on 9800X3D + RTX 5070 Ti 16 GB in a combined perf stack across 20+ min sessions. CARD_COMPARE_BATCH ran cleanly with zero shadow/copy corruption and lower submit-thread overhead.
github-bot referenced this pull request from a commit 2026-11-29 08:20:38 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-29 08:28 UTC · original

Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.

**@⁠trustno1-coder** on GitHub · 2026-11-29 08:28 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7253125691) Thank you! An earlier version of this pull request was merged into main with its original commits and is part of [v2026.11.29.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.29.01), where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
github-bot force-pushed github-bot/gh-1633 from c6023a1b05 to 82fea70272 2026-11-29 11:06:42 +00:00 Compare
Author
Owner

@⁠Bazovsky on GitHub · 2026-11-29 11:01 UTC · original

Thanks for merging the earlier version. The branch is rebased onto main (829188e) and is now one commit: @⁠NotADonky43's companion patch, ported onto the structure the combine gave the compare (CardShared).

  • The batch pipeline and its job ring are one optional part, CardShared::batch: Option<CardBatch>, made only with VICTORY_CARD_BATCH on.
  • A refusal to make it leaves the per-span passes working; a removed device still fails.
  • Checked on main + the commit: victory-gpu tests (875 pass, plus the 40 of watch::tests run one at a time), host::card_compare_batch_is_optional --ignored passes on an RTX 5090, and clippy reports nothing new in host.rs. The diagnostics build does not compile on main itself at 829188e (copystat.rs:1349, host.rs:9168), so it was not checked.

One number for the bindless multi-batch idea above (@⁠POMXARK). On a Ryzen 9 9950X3D + RTX 5090 (2560x1440, DLSS Quality, a steady scene with 333 compare passes a frame, e1f2eb6 + this PR) I timed the parts of card_before: recording the compare list takes 0.30 ms a frame of the submitting thread's 25; the sync list takes 1.1 ms and taking the bytes out of the CPU sides 1.7 ms. So on this PC a follow-up that folds the compare passes has at most 0.3 ms a frame to gain.

Measured unattended by an AI assistant (Claude Code) on my PC.

**@⁠Bazovsky** on GitHub · 2026-11-29 11:01 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1633#issuecomment-7254829772) Thanks for merging the earlier version. The branch is rebased onto main (`829188e`) and is now one commit: @⁠NotADonky43's companion patch, ported onto the structure the combine gave the compare (`CardShared`). - The batch pipeline and its job ring are one optional part, `CardShared::batch: Option<CardBatch>`, made only with `VICTORY_CARD_BATCH` on. - A refusal to make it leaves the per-span passes working; a removed device still fails. - Checked on main + the commit: `victory-gpu` tests (875 pass, plus the 40 of `watch::tests` run one at a time), `host::card_compare_batch_is_optional --ignored` passes on an RTX 5090, and clippy reports nothing new in `host.rs`. The diagnostics build does not compile on main itself at `829188e` (`copystat.rs:1349`, `host.rs:9168`), so it was not checked. One number for the bindless multi-batch idea above (@⁠POMXARK). On a Ryzen 9 9950X3D + RTX 5090 (2560x1440, DLSS Quality, a steady scene with 333 compare passes a frame, `e1f2eb6` + this PR) I timed the parts of `card_before`: recording the compare list takes 0.30 ms a frame of the submitting thread's 25; the sync list takes 1.1 ms and taking the bytes out of the CPU sides 1.7 ms. So on this PC a follow-up that folds the compare passes has at most 0.3 ms a frame to gain. Measured unattended by an AI assistant (Claude Code) on my PC.
github-bot force-pushed github-bot/gh-1633 from 82fea70272 to c4a66989ad 2026-12-01 10:36:22 +00:00 Compare
github-bot force-pushed github-bot/gh-1633 from c4a66989ad to 65de535e84 2026-12-01 18:43:17 +00:00 Compare
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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/1633/head:github-bot/gh-1633'
git switch 'github-bot/gh-1633'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1633'
git switch 'github-bot/gh-1633'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1633'
git switch 'github-bot/gh-1633'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1633'
git switch 'main'
git merge --squash 'github-bot/gh-1633'
git switch 'main'
git merge --ff-only 'github-bot/gh-1633'
git switch 'main'
git merge 'github-bot/gh-1633'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
github/trustno1-coder--VIctory-NVIDIA!1633
No description provided.