From 3aa557a978c47df6805825892cbdd92bb2d6027f Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Mon, 23 Nov 2026 00:50:53 -0800 Subject: [PATCH] Runtime README: an evicted kernel variant's re-make time, measured The known gap on a kernel's 64 variants now gives the time to make a variant, have the cap evict it, and make it again. Kernel: the runtime's step test kernel (tests::kernel_variants' every_device_makes_an_evicted_variant_again). Release test binaries of ded6f8d532, with no validation layer and the drivers' disk caches off. - lavapipe (llvmpipe, LLVM 23.1.4): 313.0 us, then 104.0 us. - RTX 3090: 2,727.1 us, then 5.1 us. Its clock state was sampled every 200 ms through the run: 5 samples P0 at 1950/9751 MHz, 7 at 210/405 MHz (6 P8). The make is the driver's CPU-side compile. Both ran in one exclusive job, m3-max-70404, which also passed the other four kernel_variants tests on the RTX 3090 under the validation layer. --- crates/metal2vulkan-runtime/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/metal2vulkan-runtime/README.md b/crates/metal2vulkan-runtime/README.md index 72f01b220..9feecdaf2 100644 --- a/crates/metal2vulkan-runtime/README.md +++ b/crates/metal2vulkan-runtime/README.md @@ -3435,7 +3435,10 @@ cache is answered compile-required on both. not yet retired dispatched, and none where work holds every one, so a command buffer that dispatches more keys keeps each variant until it retires, and the kernel's next make after that evicts the idle ones past 64. A variant evicted and dispatched again is made again, through the - device's pipeline cache, a first-use wait where Metal makes nothing. + device's pipeline cache, a first-use wait where Metal makes nothing. One small kernel's variant, + made, evicted and made again (release build, no validation layer, the drivers' disk caches off, + job m3-max-70404): 313 µs and then 104 µs on lavapipe (llvmpipe, LLVM 23.1.4), 2,727 µs and then + 5.1 µs on an RTX 3090. `Gauges::kernel_variants` counts the live variants. A dispatch's threadgroup memory length is rounded up to a multiple of 16 bytes, the only lengths Metal takes, so lengths within one multiple run one variant; each threadgroup size is a variant of its own, as a `VkPipeline`