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, 07:00 UTC
[misc] improve error message (#10553)
Signed-off-by: youkaichao <youkaichao@gmail.com>
youkaichao committed
Nov 21, 2024 at 13:13 UTC
cf656f5a022c1ef6f0513c53c5106c8eeff7fdaa
1 file changed
+8
-2
vllm/platforms/cuda.py
+8
-2
@@ -99,8 +99,14 @@ def device_id_to_physical_device_id(device_id: int) -> int:
99
if "CUDA_VISIBLE_DEVICES" in os.environ:
100
device_ids = os.environ["CUDA_VISIBLE_DEVICES"].split(",")
101
if device_ids == [""]:
102
- raise RuntimeError("CUDA_VISIBLE_DEVICES is set to empty string,"
103
- " which means GPU support is disabled.")
102
+ msg = (
103
+ "CUDA_VISIBLE_DEVICES is set to empty string, which means"
104
+ " GPU support is disabled. If you are using ray, please unset"
105
+ " the environment variable `CUDA_VISIBLE_DEVICES` inside the"
106
+ " worker/actor. "
107
+ "Check https://github.com/vllm-project/vllm/issues/8402 for"
108
+ " more information.")
109
+ raise RuntimeError(msg)
110
physical_device_id = device_ids[device_id]
111
return int(physical_device_id)
112
else: