diff --git a/setup.py b/setup.py index 3e2adadf6704..96e04883a819 100755 --- a/setup.py +++ b/setup.py @@ -48,6 +48,7 @@ def load_module_from_path(module_name, path): "so vLLM may not be able to run correctly", sys.platform) VLLM_TARGET_DEVICE = "empty" elif (sys.platform.startswith("linux") and torch.version.cuda is None + and torch.version.hip is None and os.getenv("VLLM_TARGET_DEVICE") is None): # if cuda is not available and VLLM_TARGET_DEVICE is not set, # fallback to cpu