diff --git a/.pick_status.json b/.pick_status.json index f90bc4fe76c..e929cc0d065 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -694,7 +694,7 @@ "description": "rusticl/kernel: take no kernel_info reference inside the launch closure", "nominated": true, "nomination_type": 2, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "bb2453c6495cf5ab58aa1f4f350b83f8d8d8c5c8", "notes": null diff --git a/src/gallium/frontends/rusticl/core/kernel.rs b/src/gallium/frontends/rusticl/core/kernel.rs index 1360139cb2d..9374a46f924 100644 --- a/src/gallium/frontends/rusticl/core/kernel.rs +++ b/src/gallium/frontends/rusticl/core/kernel.rs @@ -1324,7 +1324,8 @@ impl Kernel { offsets: &[usize], ) -> CLResult { // Clone all the data we need to execute this kernel - let kernel_info = Arc::clone(&self.kernel_info); + let work_group_size_hint = self.kernel_info.work_group_size_hint; + let args = self.kernel_info.args.clone(); let arg_values = self.arg_values().clone(); let nir_kernel_builds = Arc::clone(&self.builds[q.device]); let mut bdas = self.bdas.lock().unwrap().clone(); @@ -1371,8 +1372,7 @@ impl Kernel { && grid[0] <= hw_max_grid[0] && grid[1] <= hw_max_grid[1] && grid[2] <= hw_max_grid[2] - && (kernel_info.work_group_size_hint == [0; 3] - || block == kernel_info.work_group_size_hint) + && (work_group_size_hint == [0; 3] || block == work_group_size_hint) { NirKernelVariant::Optimized } else { @@ -1456,7 +1456,7 @@ impl Kernel { for arg in &nir_kernel_build.compiled_args { let is_opaque = if let CompiledKernelArgType::APIArg(idx) = arg.kind { - kernel_info.args[idx].kind.is_opaque() + args[idx].kind.is_opaque() } else { false }; @@ -1467,7 +1467,7 @@ impl Kernel { match arg.kind { CompiledKernelArgType::APIArg(idx) => { - let api_arg = &kernel_info.args[idx]; + let api_arg = &args[idx]; let Some(value) = &arg_values[idx] else { continue; };