gpu(send): use AVX2 non-temporal streaming stores for writeback uploads #2811
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2811"
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 Nosheboo on 2026-11-29T17:37:08Z.
Motivation
On upstream
55d06914, baseline gameplay profiling showsframe_timesmedian43.7–44.5 mswith the submitter spending41.5–43.6 ms/frame, including1.5–1.6 ms/frameinsendingupload copies. When writeback upload buffers (VICTORY_SEND_WB=1) sit in system memory (!on_card()), standardcopy_nonoverlappingpollutes CPU L3 cache for write-once upload traffic.Changes
stream_copy_avx2,copy_upload,stream_fence) for copies>= 4096bytes (STREAM_COPY_MIN_BYTES) into writeback, off-card upload allocations incrates/victory-gpu/src/host/send.rs.run_alignonly when streaming is active so non-streaming/small/on-card paths keep existing alignment and copy behavior._mm_sfence()per sequential or parallel copy wave only when at least one non-temporal stream copy actually ran.#2509(parallel_copy_work), retaining bothparallel_copy_threshold_requires_multiple_tasksandstream_copy_handles_unaligned_dst_src_and_tails.Attribution
Ported from FoxHound v0.8.1:
readmet3xt-lab/foxhoundcommit6c67166d(PR #36, authorDilim0n,GPL-3.0-or-later). Commit trailers and in-file doc comments retain attribution toDilim0nandreadmet3xt-lab.Verification
upstream/main(41adb551):git diff --check upstream/main..HEADclean; trailers intact (Co-authored-by: Dilim0n,Co-authored-by: readmet3xt-lab).cargo clippy -p victory-gpu --no-deps --all-targets --lockedand--all-featureswith-W clippy::undocumented_unsafe_blocks:0warnings incrates/victory-gpu/src/host/send.rs(pre-existing workspace-D warningserrors onupstream/mainlive outside this PR).cargo test -p victory-gpu --lib --locked host::send:: -- --test-threads=1->4 passed; 0 failed; 1 ignored(ignored:scatter_updates_selected_words_and_keeps_the_rest, requires adapter + helper shader compiler).Council review
Rounds: 4
gpt-6-luna,xhigh)gpt-6-luna,xhigh)gpt-6-luna,xhigh)Created in T3 Code (reviewed by Council: 3× gpt-6-luna on xhigh).
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.