diff --git a/tests/unit_tests/conftest.py b/tests/unit_tests/conftest.py index f166a8179d..4833b30e33 100644 --- a/tests/unit_tests/conftest.py +++ b/tests/unit_tests/conftest.py @@ -19,6 +19,7 @@ def pytest_sessionfinish(session, exitstatus): def cleanup(): yield if torch.distributed.is_initialized(): + torch.distributed.barrier() torch.distributed.destroy_process_group()