Lay out a submission's sends in one pass #286
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/TaynanGT--Vice-Tay!286
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-286"
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?
@PetrSeifert on GitHub · 2026-11-27 13:37 UTC · original
PetrSeifert:perf/send-take-one-pass→main· +144 −26 · 2 files · 1 commits · merged 2026-11-27 13:57 UTCTwo small changes on the path that sends changed bytes of host copies up to the card. Neither changes what is sent or where.
send::takein one pass. For each copy,takewent over the ranges three times before the upload memory was made: once for the runs that are copied, once to count the words that go as pairs, and once more, piece of work by piece of work (4,096 ranges each), to count them again.laid_outgives the runs their places, counts the pairs and cuts the pieces of work in a single pass; the pairs' places are fixed up once their start is known. The places are the same as before.shadow::joinedreturns sorted, separate ranges as they are. One stretch of ranges that is already in order with nothing touching comes back without the sort and the joining pass. Ranges that touch, overlap or are out of order take the old path.Tests
host::send::tests::one_pass_lays_out_what_three_didkeeps the three-pass layout as a reference and compares runs, pair places and counts, the pieces of work and the end offset for random copies of 0, 1, 7, 4,095, 4,096, 4,097 and 12,293 ranges, including a piece of work that holds no pair, laid out one behind the other in the memory.ranges_join_where_they_touchgains the cases in order and apart, in order and touching, in order and overlapping, and out of order.Run on this branch at
a9b4904(basecfcf180), Windows 11, RTX 4070 12 GB, Ryzen 5 7600, 63 GB RAM:cargo xtask policy --staged,git diff --checkcargo clippy --locked -p victory-gpu --all-targets -- -D warningscargo clippy --locked -p victory-gpu --all-targets --features diagnostics -- -D warningscargo test --locked -p victory-gpu --lib -- --test-threads=1cargo test --locked -p victory-gpu --lib --features diagnostics -- --test-threads=1cargo test --locked -p victory-gpu --libwith the default parallel test threads fails here athost::refresh_tests::raw_title_copy_keeps_write_watch_and_resends_equal_bytesin 2 of 2 runs on this branch. It fails the same way on unmodifiedmainon this PC (6 of 6 runs at231b6a9, 2 of 3 atcfcf180; CI's default job passes there) and passes on this branch one at a time.Measured
Synthetic, single thread,
cargo test --release, on the Ryzen 5 7600; the timing tests were temporary and are not part of the branch. Median of 301 alternating iterations, three runs of each:joined, 80,000 ranges in order and apartjoined, 2,000 ranges in order and apart"Before" for the layout is the test's three-pass reference, for
joinedthe old body (sort, then join). The layout figures spread widely between runs; I read them as "somewhat less", not as a ratio.Not done
No gameplay run and no frame-time comparison: I have not measured what share of a frame these two functions are on this PC, so I claim no frame-rate change.
takeitself (the memory, the copies and the pair stores) is not covered by a test on the card; only its layout is. No image comparison was recorded; the bytes sent and their places are unchanged, which the layout test checks.#251 changes the caller of
joinedincard_dirty, notjoineditself; no open pull request touchessend.rs.@TaynanGT on GitHub · 2026-11-27 13:43 UTC · original
@PetrSeifert The three-pass reference is a good oracle for this change. The 4,095/4,096/4,097 boundaries and a piece with no pair are the cases I care about. I’ll check that the layout and range order match on the current base.