perf(gpu): reuse packed sift bitset and batch scratch in refresh flushes #4422
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4422"
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 Oierstg on 2026-11-30T20:13:28Z.
Fixes #
What it changes
How it was tested
cargo testpassed for the crates it touches: yes / noChecked for overlap
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by copilot-pull-request-reviewer[bot] on 2026-11-30T20:13:37Z.
Review: COMMENTED
Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by IRennie74 on 2026-11-30T22:38:24Z.
sift_by(crates/victory-gpu/src/host.rs:13617,:13620) is correct only if every callback fromwide_each_scopedcovers at most 64 items starting at a multiple of 64:mask |= 1u64 << bitandbits[lo >> 6].store(mask). Today that holds. The grain isSIFT_CHUNK, the helpers split exactly by grain, and the inlinef(0, len)path runs only whenlen <= grain(wide_threads()is never 0). Nothing enforces it, though. The per-itemAtomicBoolit replaces worked with any chunking.If that ever changes (a larger grain, or a
wide_each_scopedthat coalesces chunks, which #4488 is reworking now), items past bit 63 would read a stale word from the reusedbits. The result would be refreshes silently dropped or kept: stale buffer contents rather than a crash, which is hard to trace back here. Adebug_assert!(lo % 64 == 0 && hi - lo <= 64)in the closure, or a loop over 64-item sub-blocks inside it, would pin it.The PR body is still the empty template. A before/after of the
refreshesline would help weigh it. It also conflicts textually with #4532 and #4488 inBatch::flush_all.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:41:45Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed