Skip to content

Commit d2b687a

Browse files
youkaichaolulmer
authored andcommitted
[Misc] Improve error message for incorrect pynvml (vllm-project#12809)
Signed-off-by: youkaichao <[email protected]> Signed-off-by: Louis Ulmer <[email protected]>
1 parent 41f9ff3 commit d2b687a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

vllm/platforms/__init__.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ def cuda_platform_plugin() -> Optional[str]:
4141
is_cuda = True
4242
finally:
4343
pynvml.nvmlShutdown()
44-
except Exception:
44+
except Exception as e:
45+
if "nvml" not in e.__class__.__name__.lower():
46+
# If the error is not related to NVML, re-raise it.
47+
raise e
48+
4549
# CUDA is supported on Jetson, but NVML may not be.
4650
import os
4751

0 commit comments

Comments
 (0)