Revert "[RELAND] Always build USE_DISTRIBUTED (#160449) and Make distributed modules importable even when backend not built (#159889) (#162594)"

This reverts commit 09cb34c1dce8fe1b880bbf3115d8ddad3401d871.

Reverted https://github.com/pytorch/pytorch/pull/162594 on behalf of https://github.com/malfet due to reverted internally and now can be safely reverted in OSS ([comment](https://github.com/pytorch/pytorch/pull/162594#issuecomment-3334176367))
This commit is contained in:
PyTorch MergeBot
2025-09-25 13:47:46 +00:00
parent 22fcc8b76b
commit 00059db034
52 changed files with 443 additions and 763 deletions

View File

@ -7,7 +7,7 @@ import sys
from dataclasses import dataclass
from multiprocessing.context import SpawnProcess
from typing import Any, Optional
from unittest import skipIf, skipUnless
from unittest import skipUnless
from unittest.mock import mock_open, patch
import torch
@ -22,7 +22,7 @@ from torch.numa.binding import (
AffinityMode,
NumaOptions,
)
from torch.testing._internal.common_utils import IS_MACOS, run_tests, TestCase
from torch.testing._internal.common_utils import run_tests, TestCase
@dataclass(frozen=True)
@ -680,7 +680,6 @@ class NumaBindingTest(TestCase):
set(range(0, 2)),
)
@skipIf(IS_MACOS, "sched_getaffinity doesn't exist")
def test_binds_to_node_0_if_node_stored_as_minus_one(self) -> None:
self._add_mock_hardware(
num_sockets=1,