Skip to content

Commit a928424

Browse files
authored
[Bugfix][ROCm] Using device_type because on ROCm the API is still torch.cuda (#17601)
Signed-off-by: Gregory Shtrasberg <[email protected]>
1 parent c8386fa commit a928424

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vllm/platforms/interface.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,12 +406,12 @@ def validate_request(
406406
"""Raises if this request is unsupported on this platform"""
407407

408408
def __getattr__(self, key: str):
409-
device = getattr(torch, self.device_name, None)
409+
device = getattr(torch, self.device_type, None)
410410
if device is not None and hasattr(device, key):
411411
return getattr(device, key)
412412
else:
413413
logger.warning("Current platform %s does not have '%s'" \
414-
" attribute.", self.device_name, key)
414+
" attribute.", self.device_type, key)
415415
return None
416416

417417
@classmethod

0 commit comments

Comments
 (0)