From 5b8366b61a49c74f161226fef3a8caa73900b02e Mon Sep 17 00:00:00 2001 From: Gregory Shtrasberg <156009573+gshtras@users.noreply.github.com> Date: Thu, 10 Jul 2025 12:22:23 -0400 Subject: [PATCH] [ROCm][Regression] Remove tensor creation that harms performance on ROCm (#20741) Signed-off-by: Gregory Shtrasberg --- vllm/platforms/rocm.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/vllm/platforms/rocm.py b/vllm/platforms/rocm.py index 709d86d6ce863..04637f5c7aa6f 100644 --- a/vllm/platforms/rocm.py +++ b/vllm/platforms/rocm.py @@ -247,10 +247,6 @@ class RocmPlatform(Platform): Set the device for the current platform. """ torch.cuda.set_device(device) - # With this trick we can force the device to be set eagerly - # see https://github.com/pytorch/pytorch/issues/155668 - # for why and when it is needed - _ = torch.zeros(1, device=device) @classmethod @lru_cache(maxsize=8)