GPU: VICTORY_SEND_CHANGED without the relay hashes again the pieces a fetch found unchanged #203
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!203
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-203"
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?
@simbaui4life on GitHub · 2026-11-27 19:40 UTC · original
fix/send-changed-rehash→main· +179 −4 · 2 files · 1 commits · closed without mergingOne commit on top of
main(29d8dbf). It changes behaviour only withVICTORY_SEND_CHANGED=1and the relay off.Cause
CARD_COMPARE). The stored hash is made again only by the pass that follows a send up (Host::card_before). Until something of the piece goes up, every compare that holds the piece flags it again.host/place.rs) changes its pieces on the card. Its bytes are already in the CPU's side (Shadow::placed_copy), soShadow::card_mergefinds nothing new and sends nothing.Placed::preparewrote them into title memory. Their hash is made with them.VICTORY_SEND_CHANGED=1, the refresh sends only the dwords that differ from the CPU's side. There are none, so nothing goes up and the hash is never made again.What this changes
Shadow::card_merge: when a fetched piece holds the same bytes on the card's side as on the CPU's side, and the switch is on, the piece is noted (Shadow::rehash_later, a list inshadow.rs).Host::card_beforetakes the noted pieces (crate::shadow::card_rehash) and hashes them in the same pass that hashes the pieces just sent up. Nothing of them is sent. Their copies are kept alive with the plan, as the sent ones are.card_beforeruns at every submission, so the list does not grow.card_rehashreturns at once and nothing is noted. The relay's merge (card_merge_relay) is not touched.Numbers (RTX 4070 Ti, driver 621.01, Windows 11 26200, release build, 3 runs each, each run its own process; mean, per frame)
They come from a bench test (
memory_bench_cpu_split, on a separate test branch on top of the memory bench #111, not part of this PR), with this commit cherry-picked on top. Default shape: 120 frames after 30 of warm-up, 1 MB of title writes a frame. "Relay on" isVICTORY_RELAY=2 VICTORY_RELAY_COPY=1.SEND_CHANGED=1, offSEND_CHANGED=1, offSEND_CHANGED=1, onSEND_CHANGED=1, onTests
shadow::rehash_tests::a_piece_fetched_unchanged_is_hashed_again. It runs without a GPU, on a copy with no host buffer behind it (Shadow::unbacked). It checks:cargo test -p victory-gpu: 419 passed, 2 failed, 35 ignored (main: 418 passed, 2 failed, 35 ignored; the one more is the new test). The 2 failures are already onmain(indirect::tests::host_list_budget_starts_empty_at_each_submission,indirect::tests::warp_batch_charges_every_execution).refresh_tests::only_what_differs_goes_up,landing_tests,card_tests) also pass withVICTORY_SEND_CHANGED=1.memory_bench_steady_state(debug build, the bench branch with this commit cherry-picked) passes with the relay off and on, each with and withoutVICTORY_SEND_CHANGED=1.main). rustfmt: no new differences in the touched lines.Not tested
keep_stores,by_address) have the same compare and may show the same re-fetch. They are left out on purpose, so that nothing changes with the switch off.No game data in the commit.
🤖 Generated with Claude Code
Pull request closed