BVH trace: a summary every 600 frames of copies made from stale sizes and copies landing on others #1413

Manually merged
github merged 1 commit from github-bot/gh-1413 into gh-pr/1413/base 2026-11-29 00:28:01 +00:00 AGit
Owner

@⁠Rafa7046 on GitHub · 2026-11-28 19:21 UTC · original
Rafa7046:bvh-trace-summary → main · +92 −2 · 2 files · 1 commits · merged 2026-11-29 00:24 UTC

A diagnostics-only counter for #1412. It changes nothing unless VICTORY_BVH_TRACE=1 is set, in diagnostics builds.

With VICTORY_BVH_TRACE=1 the per-event lines stop after 6,000, about the first 130 frames. This adds a line every 600 frames that is not bounded by that count:

bvh trace summary: frames 17231-17831: 392 copies to a place of the compacted size, 1 of a structure whose size never came, 117 made while the size's place held another value (read stale), 222 landing on a copy of the same frame and 83 on one of the 10 before (59572 KB written over)
  • A copy to a place of the compacted size is the 32-thread copy with the third constant 0xc, as in every run I looked at.
  • "Read stale": when the copy is recorded, the slot its size was asked into holds another value than the size that came.
  • "Landing on": the copy's range, at the size that came, overlaps another such copy of the same frame or of the 10 before, at a different address.

fork-ray-tracing.md: the variable's row, and under the known gap, why a wait on our thread comes too late with VICTORY_ASYNC_SUBMIT, and what holding the title did (details in #1412).

Tested: RTX 5080, diag build on e7d8150, 8 sessions with the builder on, the line every ~10 s through each run.

Checks: cargo clippy -p victory-gpu --features diagnostics --lib reports nothing in memory.rs. The two manual_is_multiple_of hits in descriptor.rs and shadow.rs, and the bindings.ini hit of cargo xtask policy, are already on main.

Measurements and this change were prepared with an AI assistant (Claude Code); the runs were played on my machine.

🤖 Generated with Claude Code

**@⁠Rafa7046** on GitHub · 2026-11-28 19:21 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1413) `Rafa7046:bvh-trace-summary` → `main` · +92 −2 · 2 files · 1 commits · merged 2026-11-29 00:24 UTC A diagnostics-only counter for #1412. It changes nothing unless `VICTORY_BVH_TRACE=1` is set, in diagnostics builds. With `VICTORY_BVH_TRACE=1` the per-event lines stop after 6,000, about the first 130 frames. This adds a line every 600 frames that is not bounded by that count: ``` bvh trace summary: frames 17231-17831: 392 copies to a place of the compacted size, 1 of a structure whose size never came, 117 made while the size's place held another value (read stale), 222 landing on a copy of the same frame and 83 on one of the 10 before (59572 KB written over) ``` - A copy to a place of the compacted size is the 32-thread copy with the third constant `0xc`, as in every run I looked at. - "Read stale": when the copy is recorded, the slot its size was asked into holds another value than the size that came. - "Landing on": the copy's range, at the size that came, overlaps another such copy of the same frame or of the 10 before, at a different address. `fork-ray-tracing.md`: the variable's row, and under the known gap, why a wait on our thread comes too late with `VICTORY_ASYNC_SUBMIT`, and what holding the title did (details in #1412). **Tested:** RTX 5080, diag build on `e7d8150`, 8 sessions with the builder on, the line every ~10 s through each run. **Checks:** `cargo clippy -p victory-gpu --features diagnostics --lib` reports nothing in `memory.rs`. The two `manual_is_multiple_of` hits in `descriptor.rs` and `shadow.rs`, and the `bindings.ini` hit of `cargo xtask policy`, are already on `main`. Measurements and this change were prepared with an AI assistant (Claude Code); the runs were played on my machine. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
With VICTORY_BVH_TRACE=1 the per-event lines stop after 6,000 (about the
first 130 frames of a run). A line "bvh trace summary" now counts, for the
whole run: the copies to a place of the compacted size, those of a
structure whose size never came, those made while the size's place held
another value than the one that came, and those landing on a copy of the
same frame or of the 10 before, with the bytes written over.

fork-ray-tracing.md: why waiting for the asking submission does not help
with VICTORY_ASYNC_SUBMIT, and what holding the title did.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 19:24:49 +00:00
github-bot referenced this pull request from a commit 2026-11-29 00:27:22 +00:00
github-bot changed target branch from main to gh-pr/1413/base 2026-11-29 00:28:00 +00:00
github manually merged commit 3cf71f5b41 into gh-pr/1413/base 2026-11-29 00:28:01 +00:00
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!1413
No description provided.