Skip to content

Commit 5b8366b

Browse files
authored
[ROCm][Regression] Remove tensor creation that harms performance on ROCm (#20741)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
1 parent c7753a9 commit 5b8366b

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

vllm/platforms/rocm.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,6 @@ def set_device(cls, device: torch.device) -> None:
247247
Set the device for the current platform.
248248
"""
249249
torch.cuda.set_device(device)
250-
# With this trick we can force the device to be set eagerly
251-
# see https://github.com/pytorch/pytorch/issues/155668
252-
# for why and when it is needed
253-
_ = torch.zeros(1, device=device)
254250

255251
@classmethod
256252
@lru_cache(maxsize=8)

0 commit comments

Comments
 (0)