make ProcessGroupDefaultTimeout the same as python (#56549)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/56549

This make the `kProcessGroupDefaultTimeout` be the same as the python
side, and python side directly use the pybind value instead

Test Plan: Imported from OSS

Reviewed By: rohan-varma

Differential Revision: D27899190

Pulled By: wanchaol

fbshipit-source-id: 388a7f42358b0abed75cf4934fb7b311fd33fee6
This commit is contained in:
Wanchao Liang
2021-04-21 17:53:39 -07:00
committed by Facebook GitHub Bot
parent a970e525fd
commit 43ad172c54
4 changed files with 5 additions and 4 deletions

View File

@ -1,8 +1,7 @@
from datetime import timedelta
from torch._C._distributed_c10d import _DEFAULT_PG_TIMEOUT
# Default process group wide timeout, if applicable.
# This only applies to the gloo and nccl backends
# (only if NCCL_BLOCKING_WAIT or NCCL_ASYNC_ERROR_HANDLING is set to 1).
# To make an attempt at backwards compatibility with THD, we use an
# extraordinarily high default timeout, given that THD did not have timeouts.
default_pg_timeout = timedelta(minutes=30)
default_pg_timeout = _DEFAULT_PG_TIMEOUT