From 9ea53f7acde5e45f043a13ad19a1e32ba4fc2fb9 Mon Sep 17 00:00:00 2001 From: Anees Iqbal Date: Fri, 20 Nov 2026 09:57:43 -0800 Subject: [PATCH] rt: translation_nanos times the read of whether a kernel observes its partition What: the compute make's kernel_observes_partition call, which decodes the function, now goes through pipeline::translating, the same as the other calls into the translator. Why: the previous commit missed it, because its receiver sits on the line before the call. A check of the translator's compile API (pipeline/compile/api.rs) against the runtime's calls finds no other untimed call apart from the cache digests (function_compile_key, compute_pipeline_key, queried_render_descriptor_key), which translation_nanos leaves out by its doc. How verified: the lane's compile gate, with the runtime suite on lavapipe. --- crates/metal2vulkan-runtime/src/pipeline.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/crates/metal2vulkan-runtime/src/pipeline.rs b/crates/metal2vulkan-runtime/src/pipeline.rs index f9da544c1..51763305d 100644 --- a/crates/metal2vulkan-runtime/src/pipeline.rs +++ b/crates/metal2vulkan-runtime/src/pipeline.rs @@ -826,9 +826,10 @@ impl Compiled { } else if core.caches.observed(&variant_key) { Found::Unlowered } else { - let observes = (translator) - .kernel_observes_partition(function, &inputs, &budget, entries) - .map_err(Error::Translation); + let observes = translating(&core, || { + translator.kernel_observes_partition(function, &inputs, &budget, entries) + }) + .map_err(Error::Translation); core.note_entries(); if observes? { cache::keep_observer(&core, &variant_key);