Unverified Commit cf656f5a authored by youkaichao's avatar youkaichao Committed by GitHub
Browse files

[misc] improve error message (#10553)


Signed-off-by: default avataryoukaichao <youkaichao@gmail.com>
parent edec3385
...@@ -99,8 +99,14 @@ def device_id_to_physical_device_id(device_id: int) -> int: ...@@ -99,8 +99,14 @@ def device_id_to_physical_device_id(device_id: int) -> int:
if "CUDA_VISIBLE_DEVICES" in os.environ: if "CUDA_VISIBLE_DEVICES" in os.environ:
device_ids = os.environ["CUDA_VISIBLE_DEVICES"].split(",") device_ids = os.environ["CUDA_VISIBLE_DEVICES"].split(",")
if device_ids == [""]: if device_ids == [""]:
raise RuntimeError("CUDA_VISIBLE_DEVICES is set to empty string," msg = (
" which means GPU support is disabled.") "CUDA_VISIBLE_DEVICES is set to empty string, which means"
" GPU support is disabled. If you are using ray, please unset"
" the environment variable `CUDA_VISIBLE_DEVICES` inside the"
" worker/actor. "
"Check https://github.com/vllm-project/vllm/issues/8402 for"
" more information.")
raise RuntimeError(msg)
physical_device_id = device_ids[device_id] physical_device_id = device_ids[device_id]
return int(physical_device_id) return int(physical_device_id)
else: else:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment