From da79e3e55f1eb85d3c194cbdee8d69e5c1da6364 Mon Sep 17 00:00:00 2001 From: conroy-cheers Date: Mon, 28 Oct 2024 00:29:37 +1100 Subject: [PATCH] fix ImportError when pynvml not available Signed-off-by: conroy-cheers --- vllm/platforms/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vllm/platforms/__init__.py b/vllm/platforms/__init__.py index b51b240064ee4..41fe79d1dd63f 100644 --- a/vllm/platforms/__init__.py +++ b/vllm/platforms/__init__.py @@ -27,6 +27,8 @@ is_cuda = True finally: pynvml.nvmlShutdown() +except ImportError: + pass except pynvml.NVMLError_LibraryNotFound: # CUDA is supported on Jetson, but NVML is not. import os