Bench managed_copies_bench: sizes from 4 KiB, with 128, 256 and 512 KiB between 64 KiB and 1 MiB

On an RTX 5080 Laptop GPU a 64 KiB copy in a frame took 0.336 ms (p50)
through the fill queue and 0.234 ms at the start of the batch's work, and
1 MiB the same either way (job 18108): the sizes between them place the
crossover, and 4 KiB the smallest copies.

Verified: cargo fmt; device runs follow.
This commit is contained in:
Anees Iqbal committed 2026-11-11 19:08:58 -08:00
1 parent ba823cf01b
commit 6f493dd027
1 file changed
+11 -2
@@ -211,7 +211,7 @@ fn counted(before: &WorkCounts, after: &WorkCounts) -> String {
)
}
/// Frames over `Managed` buffers of 64 KiB to 256 MiB, alone and beside the load, on the default
/// Frames over `Managed` buffers of 4 KiB to 256 MiB, alone and beside the load, on the default
/// device and on one without a fill queue (the module docs).
#[test]
#[ignore = "a release-mode benchmark"]
@@ -241,7 +241,16 @@ fn managed_copies_bench() {
let output = device
.new_buffer(READ * 4, ResourceOptions::shared())
.unwrap();
for bytes in [64u64 << 10, 1 << 20, 64 << 20, 256 << 20] {
for bytes in [
4u64 << 10,
64 << 10,
128 << 10,
256 << 10,
512 << 10,
1 << 20,
64 << 20,
256 << 20,
] {
let options = ResourceOptions::new(
StorageMode::Managed,
CpuCacheMode::DefaultCache,