Copied buffers: a comparison splits across threads from 4 MiB, not 16

SPLIT_BYTES, the fewest bytes each thread of a split comparison takes, goes
from 8 MiB to 2 MiB. A merge back runs about 1.75 GB/s a thread on the RTX 5080
Laptop GPU's host (copied_bandwidth_bench, b5080 entry nvcopybw-bw-before-222944),
so a 16 MiB copy the GPU rewrote merged back on two threads in 4.2-4.5 ms of a
5.4-6.4 ms pass (2.6-3.1 GB/s); a run of 2 MiB takes about a millisecond a
thread, against tens of microseconds to start one. The thread count stays at
most four.

Docs: HOWTO, API and FAST-PATHS said a comparison of a copy with a base of 16 MiB
or more splits; now 4 MiB or more, with a base or without (the copy in with no
base splits since d33e19bc70).

Tests: the split tests take 4 x SPLIT_BYTES (a_comparison_split_across_threads_...,
a_copy_in_with_no_base_splits_...), now 8 MiB. Not run yet.
This commit is contained in:
Anees Iqbal committed 2026-11-12 00:47:30 -08:00
1 parent 01ba6b800d
commit 13d05be0a4
4 files changed
+12 -11

No files matched your search

+3 -3
View File
@@ -3436,9 +3436,9 @@ bound.
(`copied_base_blocks_read_back`), then kept in 1 KiB of host memory for the base's life
(`copied_base_host_blocks`); a block whose tag agrees is taken as unchanged, a changed one
missed with a chance of at most 2^-64 at each comparison, and a commit that finds no host memory
for a base fails with `OutOfMemory` (`copied_bases_refused`). A comparison of a copy with a base
of 16 MiB or more splits its blocks across up to four threads, the calling one among them
(`copied_compare_threads`). An event signal submitted while a copy is live is seen once its
for a base fails with `OutOfMemory` (`copied_bases_refused`). A comparison of 4 MiB or more of a
copy, with a base or without, splits its blocks across up to four threads, the calling one among
them (`copied_compare_threads`). An event signal submitted while a copy is live is seen once its
batch's writes are back in the pages, as Metal's: its value at the completion turn, and a wait
for it held on the host until then (`event_signals_behind_merge`). A
copy and another memory over overlapping but not the same bytes agree GPU to GPU only through the