From edfe6d7f4a675b68eb5d8197493d95139669721d Mon Sep 17 00:00:00 2001 From: Gregory Shtrasberg Date: Fri, 2 May 2025 19:45:40 +0000 Subject: [PATCH] Using device_type because on ROCm the API is still torch.cuda Signed-off-by: Gregory Shtrasberg --- vllm/platforms/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vllm/platforms/interface.py b/vllm/platforms/interface.py index c5555aba1a3e..6a78e00a9049 100644 --- a/vllm/platforms/interface.py +++ b/vllm/platforms/interface.py @@ -406,12 +406,12 @@ def validate_request( """Raises if this request is unsupported on this platform""" def __getattr__(self, key: str): - device = getattr(torch, self.device_name, None) + device = getattr(torch, self.device_type, None) if device is not None and hasattr(device, key): return getattr(device, key) else: logger.warning("Current platform %s does not have '%s'" \ - " attribute.", self.device_name, key) + " attribute.", self.device_type, key) return None @classmethod