[CI][ROCm] Stabilize LLM GC teardown check (#50340)
Signed-off-by: Andreas Karatzas <Andreas.Karatzas@amd.com>
Andreas Karatzas committed
Jul 30, 2026 at 05:42 UTC
165ed33327c04db3e26c6e433f721a1f68754558
1 file changed
+9
tests/basic_correctness/test_basic_correctness.py
+9
@@ -78,6 +78,15 @@ def _resolve_target_test_suite() -> str:
78
TARGET_TEST_SUITE = _resolve_target_test_suite()
79
80
81
+# ROCm can occasionally retain the object until fixture teardown. Retry only
82
+# that assertion after cleanup; collecting cyclic garbage here would mask the
83
+# reference cycles this test is intended to catch.
84
+@pytest.mark.flaky(
85
+ reruns=2,
86
+ reruns_delay=5,
87
+ only_rerun="AssertionError",
88
+ condition=current_platform.is_rocm(),
89
+)
90
def test_vllm_gc_ed():
91
"""Verify vllm instance is GC'ed when it is deleted"""
92
llm = LLM("hmellor/tiny-random-LlamaForCausalLM")