From fd21d6d51e45d65b0d393897cafea909fcf9a675 Mon Sep 17 00:00:00 2001 From: Conroy Cheers Date: Wed, 30 Oct 2024 10:50:34 +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