Skip to content

Commit

Permalink
[Misc] Improve error message for incorrect pynvml (#12809)
Browse files Browse the repository at this point in the history
Signed-off-by: youkaichao <[email protected]>
  • Loading branch information
youkaichao authored Feb 6, 2025
1 parent 449d1bc commit 0408efc
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vllm/platforms/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,11 @@ def cuda_platform_plugin() -> Optional[str]:
is_cuda = True
finally:
pynvml.nvmlShutdown()
except Exception:
except Exception as e:
if "nvml" not in e.__class__.__name__.lower():
# If the error is not related to NVML, re-raise it.
raise e

# CUDA is supported on Jetson, but NVML may not be.
import os

Expand Down

0 comments on commit 0408efc

Please sign in to comment.