Skip to content

Commit f240c79

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

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
@@ -413,12 +413,12 @@ def validate_request(
413413
"""Raises if this request is unsupported on this platform"""
414414

415415
def __getattr__(self, key: str):
416-
device = getattr(torch, self.device_name, None)
416+
device = getattr(torch, self.device_type, None)
417417
if device is not None and hasattr(device, key):
418418
return getattr(device, key)
419419
else:
420420
logger.warning("Current platform %s does not have '%s'" \
421-
" attribute.", self.device_name, key)
421+
" attribute.", self.device_type, key)
422422
return None
423423

424424
@classmethod

0 commit comments

Comments
 (0)