Don't use rknn if device is CPU (#20312)

This commit is contained in:
Nicolas Mowen 2025-10-01 18:14:04 -06:00 committed by GitHub
parent 8307fe31aa
commit 41e5c12e5b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -424,7 +424,8 @@ def get_optimized_runner(
) -> BaseModelRunner:
"""Get an optimized runner for the hardware."""
device = device or "AUTO"
if is_rknn_compatible(model_path):
if device != "CPU" and is_rknn_compatible(model_path):
rknn_path = auto_convert_model(model_path)
if rknn_path: