diff --git a/test/inductor/test_max_autotune.py b/test/inductor/test_max_autotune.py index d94dd81b4673a..5d3855aa73e93 100644 --- a/test/inductor/test_max_autotune.py +++ b/test/inductor/test_max_autotune.py @@ -3450,6 +3450,11 @@ def setUpClass(cls): ) ) + @classmethod + def tearDownClass(cls): + cls._stack.close() + super().tearDownClass() + def check_code(self, code_str, num_kernels, num_allocs, num_deallocs): FileCheck().check(get_func_call()).check_count( get_kernel_launch(), @@ -3943,6 +3948,11 @@ def setUpClass(cls): ) ) + @classmethod + def tearDownClass(cls): + cls._stack.close() + super().tearDownClass() + @contextlib.contextmanager def get_common_patches(self, async_compile: bool, persistent_tma: bool): common_patches = (