Skip to content

Commit

Permalink
Merge pull request #7952 from kerrylu/main
Browse files Browse the repository at this point in the history
Provide .stop() method for cupyx.distributed._Backend
  • Loading branch information
takagi committed Oct 23, 2023
2 parents 6bd7021 + 6b40d0f commit 2b86893
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions cupyx/distributed/_comm.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,7 @@ def all_to_all(self, in_array, out_array, stream=None):
@abc.abstractmethod
def barrier(self):
pass

def stop(self):
if self.rank == 0:
self._store.stop()
3 changes: 2 additions & 1 deletion cupyx/distributed/_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def stop(self):
if self._process is not None:
with self._run.get_lock():
self._run.value = 0
self._process.join()
if self._process.is_alive():
self._process.join()


class TCPStoreProxy:
Expand Down

0 comments on commit 2b86893

Please sign in to comment.