From cfffc94a07d72b210a7cb2d5b78e4292d18cccff Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Mon, 30 Dec 2024 15:16:38 +0100 Subject: [PATCH] Refine input handling logic for non-TICI devices. This change adds an explicit check for non-TICI devices in the input processing logic, ensuring correctness and preventing unnecessary operations. The updated logic improves maintainability and clarity in device-specific handling. --- selfdrive/modeld/runners/model_runner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/selfdrive/modeld/runners/model_runner.py b/selfdrive/modeld/runners/model_runner.py index 627ec4ae82..7aa2fcf0dd 100644 --- a/selfdrive/modeld/runners/model_runner.py +++ b/selfdrive/modeld/runners/model_runner.py @@ -71,7 +71,7 @@ class TinygradRunner(ModelRunner): for key in imgs_cl: if TICI and key not in self.inputs: self.inputs[key] = qcom_tensor_from_opencl_address(imgs_cl[key].mem_address, self.input_shapes[key], dtype=self.input_to_dtype[key]) - else: + elif not TICI: shape = self.frames[key].buffer_from_cl(imgs_cl[key]).reshape(self.input_shapes[key]) self.inputs[key] = Tensor(shape, device=self.input_to_device[key], dtype=self.input_to_dtype[key]).realize()