[ROCm][CI] Query HIP device memory for test GPU teardown waits. (#57450)

Signed-off-by: Sheral Kumar <shekumar@amd.com>
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Co-authored-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: Andreas Karatzas <akaratza@amd.com>
This commit is contained in:
Sheral Kumar
2026-09-20 15:20:39 -05:00
committed by GitHub
co-authored by Andreas Karatzas Codex Andreas Karatzas
parent 4868312128
commit 01f1f58f10
4 changed files with 56 additions and 53 deletions
+22
View File
@@ -0,0 +1,22 @@
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import pytest
import torch
from vllm.platforms import current_platform
from vllm.v1.worker.workspace import init_workspace_manager, reset_workspace_manager
@pytest.fixture(autouse=True)
def _workspace_manager_for_compile_passes(cleanup_fixture):
if not current_platform.is_rocm():
yield
return
# Release workspace tensors before cleanup_fixture flushes the allocator.
reset_workspace_manager()
if torch.accelerator.is_available():
init_workspace_manager(torch.device(0))
yield
reset_workspace_manager()