From 2655995a0925080016be7c80dceca107ad744850 Mon Sep 17 00:00:00 2001 From: xinhe-nv <200704525+xinhe-nv@users.noreply.github.com> Date: Fri, 10 Oct 2025 17:50:25 +0800 Subject: [PATCH] [None][fix] add gc for test fixture (#8220) Signed-off-by: Xin He (SW-GPU) <200704525+xinhe-nv@users.noreply.github.com> --- tests/integration/defs/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/integration/defs/conftest.py b/tests/integration/defs/conftest.py index c2478011bf..b1b8a17c9a 100644 --- a/tests/integration/defs/conftest.py +++ b/tests/integration/defs/conftest.py @@ -15,6 +15,7 @@ # -*- coding: utf-8 -*- import datetime +import gc import os import platform import re @@ -2524,6 +2525,7 @@ def torch_empty_cache() -> None: """ if torch.cuda.is_available(): torch.cuda.empty_cache() + gc.collect() @pytest.fixture(autouse=True)