Skip to content

Commit 82382cf

Browse files
gshtraspatrickvonplaten
authored andcommitted
[ROCm][Regression] Remove tensor creation that harms performance on ROCm (vllm-project#20741)
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com> Signed-off-by: Patrick von Platen <patrick.v.platen@gmail.com>
1 parent 42f8e40 commit 82382cf

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)