[CI][ROCm] Keep global GPU memory cleanup opt-in (#49911)
Signed-off-by: Andreas Karatzas <akaratza@amd.com>
Andreas Karatzas committed
Jul 26, 2026 at 22:19 UTC
854c33f3801241574223644d25f80fbd735a44e5
1 file changed
+3
-7
tests/conftest.py
+3
-7
@@ -1729,13 +1729,9 @@ def disable_deepgemm_ue8m0(monkeypatch):
1729
1730
1731
def _should_clean_gpu_memory_between_tests() -> bool:
1732
- setting = os.getenv("VLLM_TEST_CLEAN_GPU_MEMORY")
1733
- if setting == "1":
1734
- return True
1735
- if setting == "0":
1736
- return False
1737
- # ROCm reclaims VRAM lazily; default to waiting between tests on ROCm CI.
1738
- return current_platform.is_rocm()
1732
+ # This must stay opt-in: a function-scoped fixture cannot distinguish
1733
+ # stale VRAM from allocations owned by longer-lived module/session fixtures.
1734
+ return os.getenv("VLLM_TEST_CLEAN_GPU_MEMORY", "0") == "1"
1735
1736
1737
@pytest.fixture(autouse=True)