commaai / openpilot

openpilot is an operating system for robotics. Currently, it upgrades the driver assistance system on 275+ supported cars.
https://comma.ai/openpilot
MIT License
49.95k stars 9.11k forks source link

ONNX reports CUDAExecutionProvider as available even when it is not #31708

Closed mimi89999 closed 1 month ago

mimi89999 commented 8 months ago

Describe the bug

Hello, I noticed that ONNX reports CUDAExecutionProvider as available even when it is not (like on my Intel GPU).

>>> import onnxruntime as ort
>>> print(ort.get_available_providers())
['TensorrtExecutionProvider', 'CUDAExecutionProvider', 'AzureExecutionProvider', 'CPUExecutionProvider']

This is not a problem because ONNX automatically falls back to CPUExecutionProvider

Onnx selected provider:  [('CUDAExecutionProvider', {'cudnn_conv_algo_search': 'DEFAULT'})]
2024-03-05 11:40:14.847702004 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 TryGetProviderInfo_CUDA] /onnxruntime_src/onnxruntime/core/session/provider_bridge_ort.cc:1209 onnxruntime::Provider& onnxruntime::ProviderLibrary::Get() [ONNXRuntimeError] : 1 : FAIL : Failed to load library libonnxruntime_providers_cuda.so with error: libcublasLt.so.11: cannot open shared object file: No such file or directory

2024-03-05 11:40:14.847815005 [W:onnxruntime:Default, onnxruntime_pybind_state.cc:861 CreateExecutionProviderInstance] Failed to create CUDAExecutionProvider. Please reference https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirementsto ensure all dependencies are met.
Onnx using  ['CPUExecutionProvider']

However, OpenPilot sets some options for the CPUExecutionProvider https://github.com/commaai/openpilot/blob/master/selfdrive/modeld/runners/onnxmodel.py#L48-L51 that won't be set in the fallback mode.

OS Version

Debian Trixie

openpilot version or commit

deb79a9c443fa1fc1499e40a97757c7d8b6af735

Additional info

No response

mimi89999 commented 8 months ago

Maybe we should also install onnxruntime-openvino for users with Intel GPUs

adeebshihadeh commented 3 months ago

Still an issue?