GPU skips empty host submissions #1424

Closed
github-bot wants to merge 1 commit from gh-pr/1424/head into gh-pr/1424/base
Owner

@⁠BaggyALPHA on GitHub · 2026-11-24 17:56 UTC · original
BaggyALPHA:fix/skip-empty-host-submissions → main · +18 −0 · 1 files · 1 commits · closed without merging

Addresses item 35 (VIC-BT-035) in #1242. A queue submission can have zero host lists after filtering. The host now returns before taking the submission lock or calling D3D12 when there are no lists. Previously this path still incremented the submission counter, signaled the host fence and waited for it.

The synthetic regression creates an isolated host queue and checks both the submission counter and the completed fence. On upstream WARP they advanced from zero to one for an empty batch. Both remain at zero with the fix. The GPU suite passed on Windows with WARP (54 passed, one ignored) and the default hardware adapter (51 passed, one ignored). Clippy with all targets and features and the asset-policy hook passed.

AI-assisted (Codex).

**@⁠BaggyALPHA** on GitHub · 2026-11-24 17:56 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424) `BaggyALPHA:fix/skip-empty-host-submissions` → `main` · +18 −0 · 1 files · 1 commits · closed without merging Addresses item 35 (VIC-BT-035) in #1242. A queue submission can have zero host lists after filtering. The host now returns before taking the submission lock or calling D3D12 when there are no lists. Previously this path still incremented the submission counter, signaled the host fence and waited for it. The synthetic regression creates an isolated host queue and checks both the submission counter and the completed fence. On upstream WARP they advanced from zero to one for an empty batch. Both remain at zero with the fix. The GPU suite passed on Windows with WARP (54 passed, one ignored) and the default hardware adapter (51 passed, one ignored). Clippy with all targets and features and the asset-policy hook passed. AI-assisted (Codex).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:31:12 +00:00
github-bot closed this pull request 2026-11-26 04:31:12 +00:00
Author
Owner

@⁠acetonahard-code on GitHub · 2026-11-24 19:18 UTC · original

Tested this on a GPU with SM 6.6 support (RTX 4070 SUPER, driver 621.14, Windows 11, repo toolchain), merged into current main (ffe310e).

cargo test -p victory-gpu passed failed ignored
main 50 0 1
main + this PR 51 0 1
main, --all-features 53 0 1
main + this PR, --all-features 54 0 1
  • The new test passes.
  • Run with --nocapture, and no "no SM 6.6 ... device; skipped" lines were printed, so no GPU test skipped for lack of a device.
  • cargo clippy --all-targets -- -D warnings, with and without --all-features: clean.
  • cargo fmt --check: no new diffs from this PR (the ones it reports are already on main).
  • frame::tests::waits_end_on_ticks_and_count_frames failed once and passed on a rerun. It's timing-flaky on main too (2 of 10 full-suite runs here), and unrelated to this PR.

I didn't test with game data.


Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.

**@⁠acetonahard-code** on GitHub · 2026-11-24 19:18 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424#issuecomment-7141899711) Tested this on a GPU with SM 6.6 support (RTX 4070 SUPER, driver 621.14, Windows 11, repo toolchain), merged into current `main` (ffe310e). | `cargo test -p victory-gpu` | passed | failed | ignored | |---|---|---|---| | `main` | 50 | 0 | 1 | | `main` + this PR | 51 | 0 | 1 | | `main`, `--all-features` | 53 | 0 | 1 | | `main` + this PR, `--all-features` | 54 | 0 | 1 | - The new test passes. - Run with `--nocapture`, and no "no SM 6.6 ... device; skipped" lines were printed, so no GPU test skipped for lack of a device. - `cargo clippy --all-targets -- -D warnings`, with and without `--all-features`: clean. - `cargo fmt --check`: no new diffs from this PR (the ones it reports are already on `main`). - `frame::tests::waits_end_on_ticks_and_count_frames` failed once and passed on a rerun. It's timing-flaky on `main` too (2 of 10 full-suite runs here), and unrelated to this PR. I didn't test with game data. --- <sub>Tested locally with an AI-assisted script (Claude Code); I checked the results before posting.</sub>
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 01:27 UTC · original · edited 2026-11-25 02:25 UTC

Automated triage for the maintainers.

Recommended for a maintainer's look. Host::execute in crates/victory-gpu/src/host.rs now returns at once when queue.rs execute filters a title submission down to no host lists. Before, it took the submission lock, called ExecuteCommandLists with an empty array, then signalled the host fence and waited on it. I checked what the early return also skips: descriptor::sync_heaps() runs again at the start of the next submission, before any list can use the heaps; release_retired() holds retired resources only until the next real submission; with no lists there are no copy-backs or deferred writes to miss. The new test builds its own Host and checks that neither the counter nor the fence moves. CI: passing.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 01:27 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424#issuecomment-7149559621) · edited 2026-11-25 02:25 UTC <!-- victory-triage v1 head=7f6496c59c30de648f516e99bbc65291199e6d1b verdict=merge-candidate at=2026-11-25T02:20:29Z --> Automated triage for the maintainers. Recommended for a maintainer's look. `Host::execute` in `crates/victory-gpu/src/host.rs` now returns at once when `queue.rs` `execute` filters a title submission down to no host lists. Before, it took the submission lock, called `ExecuteCommandLists` with an empty array, then signalled the host fence and waited on it. I checked what the early return also skips: `descriptor::sync_heaps()` runs again at the start of the next submission, before any list can use the heaps; `release_retired()` holds retired resources only until the next real submission; with no lists there are no copy-backs or deferred writes to miss. The new test builds its own `Host` and checks that neither the counter nor the fence moves. CI: passing. --- _Generated by [Claude Code](https://claude.ai/code)_
Author
Owner

@⁠BaggyALPHA on GitHub · 2026-11-25 02:09 UTC · original

Rebased onto main at 940d32f and resolved the host.rs conflict, keeping both the upstream scratch test and this PR’s regression.

On Windows, the focused synthetic empty-submission test and asset-policy check passed. The broader host filter hit a descriptor-heap test failure, which reproduced on the same upstream base without this PR. No game files were used.

AI-assisted (OpenAI Codex).

**@⁠BaggyALPHA** on GitHub · 2026-11-25 02:09 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424#issuecomment-7150379813) Rebased onto `main` at `940d32f` and resolved the `host.rs` conflict, keeping both the upstream scratch test and this PR’s regression. On Windows, the focused synthetic empty-submission test and asset-policy check passed. The broader host filter hit a descriptor-heap test failure, which reproduced on the same upstream base without this PR. No game files were used. AI-assisted (OpenAI Codex).
Author
Owner

@⁠StExpeditus on GitHub · 2026-11-25 09:11 UTC · original

Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24. Branch at 7f6496c. cargo test --workspace --locked --no-fail-fast -> 697 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.

**@⁠StExpeditus** on GitHub · 2026-11-25 09:11 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424#issuecomment-7158004575) **Test report: RTX 5060 Ti (Blackwell), Windows 11 Pro 26200, driver 621.24.** Branch at `7f6496c`. `cargo test --workspace --locked --no-fail-fast` -> 697 passed, 5 failed, 10 ignored. The failures are the same 5 pre-existing NVIDIA 1M-view-heap-cap failures (also on main; see my reports on #2030 and #1940). Nothing introduced by this PR fails on this machine.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 22:01 UTC · original

Automated triage for the maintainers, second look (a review against current main, with builds and tests where they could change the verdict).

Closing because the case can no longer occur on main. Since 9cc37c5f queue.rs no longer calls Host::execute directly: it pushes segments into hold, and pump() runs only non-empty pieces. Every other caller of Host::execute passes at least one list.

If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

**@⁠Marvisak** on GitHub · 2026-11-25 22:01 UTC · [original](https://github.com/Marvisak/VIctory/pull/1424#issuecomment-7175829952) Automated triage for the maintainers, second look (a review against current `main`, with builds and tests where they could change the verdict). Closing because the case can no longer occur on `main`. Since 9cc37c5f `queue.rs` no longer calls `Host::execute` directly: it pushes segments into `hold`, and `pump()` runs only non-empty pieces. Every other caller of `Host::execute` passes at least one list. If this is mistaken, reply here with what was missed and it will be looked at again. Thank you for the contribution.

Pull request closed

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/Marvisak--VIctory!1424
No description provided.