From 0c0c10a81112556ecadff15f8b7149577ff909e5 Mon Sep 17 00:00:00 2001 From: Karol Herbst Date: Thu, 27 Feb 2025 12:17:21 +0100 Subject: [PATCH] rusticl/program: simplify active_kernels check This removes one loop, also will allow us to cache the device builds in the queue to optimize binding compute states. Part-of: --- src/gallium/frontends/rusticl/core/program.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/frontends/rusticl/core/program.rs b/src/gallium/frontends/rusticl/core/program.rs index d82b690a4b9..cc7969e2528 100644 --- a/src/gallium/frontends/rusticl/core/program.rs +++ b/src/gallium/frontends/rusticl/core/program.rs @@ -550,9 +550,9 @@ impl Program { pub fn active_kernels(&self) -> bool { self.build_info() - .builds + .kernel_info .values() - .any(|b| b.kernels.values().any(|b| Arc::strong_count(b) > 1)) + .any(|k| Arc::strong_count(k) > 1) } pub fn build(&self, devs: &[&'static Device], options: &str) -> bool {