@tduncan / Nvidia-Optimization-Stack-VLLM Mirror · read-only / commits / 0408efc6d0
Fork 0

A high-throughput and memory-efficient inference and serving engine for LLMs

Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git

Synced Nov 16, 00:45 UTC

[Misc] Improve error message for incorrect pynvml (#12809)

Signed-off-by: youkaichao <youkaichao@gmail.com>

youkaichao committed Feb 6, 2025 at 15:23 UTC 0408efc6d0c17fba17b2be38d0d0f02e96d2bf9d
1 file changed +5 -1
vllm/platforms/__init__.py
+5 -1
@@ -41,7 +41,11 @@ def cuda_platform_plugin() -> Optional[str]:
41 is_cuda = True
42 finally:
43 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 +
49 # CUDA is supported on Jetson, but NVML may not be.
50 import os
51