Revert "Always build USE_DISTRIBUTED. (#160449)"

This reverts commit c37103234afc832dcad307e9016230810957c9d5.

Reverted https://github.com/pytorch/pytorch/pull/160449 on behalf of https://github.com/jeanschmidt due to Breaking internal build rules, see D81756619 ([comment](https://github.com/pytorch/pytorch/pull/160449#issuecomment-3259430011))
This commit is contained in:
PyTorch MergeBot
2025-09-05 18:58:47 +00:00
parent 70f865ac9b
commit adae7f66aa
29 changed files with 213 additions and 124 deletions

View File

@ -2,6 +2,10 @@
import torch
import torch.distributed as dist
from torch.autograd import Function
# The two imports below are not always available depending on the
# USE_DISTRIBUTED compile flag. Make sure they raise import error
# if we're trying to use them.
from torch.distributed import group, ReduceOp