mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Revert "[C10D] call destroy_process_group after MultiProcess tests (#140820)"
This reverts commit 77d1f076dadec7a77c4bcf807c4efbef6ca5a8f1. Reverted https://github.com/pytorch/pytorch/pull/140820 on behalf of https://github.com/wconstab due to failures on trunk not on PR CI ([comment](https://github.com/pytorch/pytorch/pull/140820#issuecomment-2480644227))
This commit is contained in:
@ -684,7 +684,7 @@ class MultiProcessTestCase(TestCase):
|
||||
self.file_name = file_name
|
||||
self.run_test(test_name, parent_pipe)
|
||||
|
||||
def run_test(self, test_name: str, parent_pipe, destroy_process_group=True) -> None:
|
||||
def run_test(self, test_name: str, parent_pipe) -> None:
|
||||
# Start event listener thread.
|
||||
signal_recv_pipe, signal_send_pipe = torch.multiprocessing.Pipe(duplex=False)
|
||||
event_listener_thread = threading.Thread(
|
||||
@ -727,15 +727,6 @@ class MultiProcessTestCase(TestCase):
|
||||
# Close pipe after done with test.
|
||||
parent_pipe.close()
|
||||
|
||||
if destroy_process_group:
|
||||
try:
|
||||
# Many test cases init a process group but do not destroy it.
|
||||
# Some tests do destroy the pgs, and destroy can't be called twice.
|
||||
# This avoids spewing warnings about improperly shutting down.
|
||||
c10d.destroy_process_group()
|
||||
except (AssertionError, ValueError):
|
||||
pass
|
||||
|
||||
def _get_timedout_process_traceback(self) -> None:
|
||||
pipes = []
|
||||
for i, process in enumerate(self.processes):
|
||||
|
Reference in New Issue
Block a user