[misc] Fix setup.py condition to avoid AMD from being mistaken with CPU (#13022)
Signed-off-by: kevin <kevin@anyscale.com>
This commit is contained in:
parent
08b2d845d6
commit
91e876750e
5
setup.py
5
setup.py
@ -48,8 +48,9 @@ elif not (sys.platform.startswith("linux")
|
|||||||
"so vLLM may not be able to run correctly", sys.platform)
|
"so vLLM may not be able to run correctly", sys.platform)
|
||||||
VLLM_TARGET_DEVICE = "empty"
|
VLLM_TARGET_DEVICE = "empty"
|
||||||
elif (sys.platform.startswith("linux") and torch.version.cuda is None
|
elif (sys.platform.startswith("linux") and torch.version.cuda is None
|
||||||
and os.getenv("VLLM_TARGET_DEVICE") is None):
|
and os.getenv("VLLM_TARGET_DEVICE") is None
|
||||||
# if cuda is not available and VLLM_TARGET_DEVICE is not set,
|
and torch.version.hip is None):
|
||||||
|
# if cuda or hip is not available and VLLM_TARGET_DEVICE is not set,
|
||||||
# fallback to cpu
|
# fallback to cpu
|
||||||
VLLM_TARGET_DEVICE = "cpu"
|
VLLM_TARGET_DEVICE = "cpu"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user