From 6f493dd027db96badc421e033bdc7da1ada28ad2 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Wed, 11 Nov 2026 17:43:20 -0800 Subject: [PATCH] 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. --- .../src/tests/managed_copies_bench.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/tests/managed_copies_bench.rs b/crates/metal2vulkan-runtime/src/tests/managed_copies_bench.rs index bfc19d0e0..517ba1317 100644 --- a/crates/metal2vulkan-runtime/src/tests/managed_copies_bench.rs +++ b/crates/metal2vulkan-runtime/src/tests/managed_copies_bench.rs @@ -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,