Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions test/cpp_extensions/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from setuptools import setup

import torch.cuda
from torch.testing._internal.common_utils import IS_WINDOWS
from torch.utils.cpp_extension import (
BuildExtension,
CppExtension,
Expand Down Expand Up @@ -42,7 +41,7 @@
),
]

NVCC_FLAGS = ["-O2"] + (["-DUSE_CUDA"] if IS_WINDOWS else [])
NVCC_FLAGS = ["-O2"] + []

if torch.cuda.is_available() and (CUDA_HOME is not None or ROCM_HOME is not None):
extension = CUDAExtension(
Expand Down Expand Up @@ -83,8 +82,7 @@

# todo(mkozuki): Figure out the root cause
if (
(not IS_WINDOWS)
and torch.cuda.is_available()
torch.cuda.is_available()
and (CUDA_HOME is not None or ROCM_HOME is not None)
):
# malfet: One should not assume that PyTorch re-exports CUDA dependencies
Expand All @@ -96,8 +94,7 @@
ext_modules.append(cublas_extension)

if (
(not IS_WINDOWS)
and torch.cuda.is_available()
torch.cuda.is_available()
and (CUDA_HOME is not None or ROCM_HOME is not None)
):
cusolver_extension = CUDAExtension(
Expand All @@ -109,7 +106,6 @@

if (
USE_NINJA
and (not IS_WINDOWS)
and torch.cuda.is_available()
and CUDA_HOME is not None
):
Expand Down
3 changes: 0 additions & 3 deletions test/custom_operator/test_custom_ops.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Owner(s): ["module: cpp-extensions"]

import sys
import unittest

from model import get_custom_op_library_path

Expand All @@ -11,7 +10,6 @@
from torch.testing._internal.common_utils import (
expectedIfCppFakeTensor,
HardwareClassification,
IS_WINDOWS,
run_tests,
TestCase,
)
Expand Down Expand Up @@ -45,7 +43,6 @@ def test_op_with_incorrect_abstract_impl_pystub(self):
with self.assertRaisesRegex(RuntimeError, "pointwise"):
torch.ops.custom.cos(x)

@unittest.skipIf(IS_WINDOWS, "torch.compile not supported on windows")
def test_dynamo_pystub_suggestion(self):
x = torch.randn(3)

Expand Down
7 changes: 3 additions & 4 deletions test/distributed/elastic/multiprocessing/api_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
IS_CI,
IS_LINUX,
IS_MACOS,
IS_WINDOWS,
run_tests,
skip_if_pytest,
TEST_WITH_ASAN,
Expand Down Expand Up @@ -299,7 +298,7 @@ def _test_zombie_workflow(


# tests incompatible with tsan or asan
if not (TEST_WITH_DEV_DBG_ASAN or IS_WINDOWS or IS_MACOS):
if not (TEST_WITH_DEV_DBG_ASAN or IS_MACOS):

class StartProcessesAsFuncTest(_StartProcessesTest):
def test_to_map(self):
Expand Down Expand Up @@ -643,7 +642,7 @@ def test_validate_full_rank(self):


# tests incompatible with tsan or asan, the redirect functionality does not work on macos or windows
if not (TEST_WITH_DEV_DBG_ASAN or IS_WINDOWS or IS_MACOS):
if not (TEST_WITH_DEV_DBG_ASAN or IS_MACOS):

class StartProcessesListAsFuncTest(_StartProcessesTest):
def test_function(self):
Expand Down Expand Up @@ -796,7 +795,7 @@ def test_binary_duplicate_log_filters(self):


# tests incompatible with tsan or asan, the redirect functionality does not work on macos or windows
if not (TEST_WITH_DEV_DBG_ASAN or IS_WINDOWS or IS_MACOS or IS_CI):
if not (TEST_WITH_DEV_DBG_ASAN or IS_MACOS or IS_CI):

class StartProcessesNotCIAsFuncTest(_StartProcessesTest):
@skip_if_pytest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,14 @@
HardwareClassification,
IS_ARM64,
IS_MACOS,
IS_WINDOWS,
run_tests,
TEST_WITH_TSAN,
TestCase,
)


# timer is not supported on these platforms
if not (IS_WINDOWS or IS_MACOS or IS_ARM64):
if not (IS_MACOS or IS_ARM64):
# func2 should time out
def func2(n, file_path):
if file_path is not None:
Expand Down
3 changes: 1 addition & 2 deletions test/distributed/elastic/timer/local_timer_example.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
from torch.testing._internal.common_utils import (
IS_ARM64,
IS_MACOS,
IS_WINDOWS,
run_tests,
skip_but_pass_in_sandcastle_if,
TEST_WITH_DEV_DBG_ASAN,
Expand All @@ -42,7 +41,7 @@ def _stuck_function(rank, mp_queue):


# timer is not supported on these platforms
if not (IS_WINDOWS or IS_MACOS or IS_ARM64):
if not (IS_MACOS or IS_ARM64):

class LocalTimerExample(TestCase):
"""
Expand Down
3 changes: 1 addition & 2 deletions test/distributed/elastic/timer/local_timer_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
HardwareClassification,
IS_ARM64,
IS_MACOS,
IS_WINDOWS,
run_tests,
TEST_WITH_DEV_DBG_ASAN,
TEST_WITH_TSAN,
Expand All @@ -27,7 +26,7 @@


# timer is not supported on these platforms
INVALID_PLATFORMS = IS_WINDOWS or IS_MACOS or TEST_WITH_DEV_DBG_ASAN or IS_ARM64
INVALID_PLATFORMS = IS_MACOS or TEST_WITH_DEV_DBG_ASAN or IS_ARM64

if not INVALID_PLATFORMS:
# func2 should time out
Expand Down
3 changes: 1 addition & 2 deletions test/distributed/elastic/utils/distributed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
from torch.testing._internal.common_utils import (
HardwareClassification,
IS_MACOS,
IS_WINDOWS,
run_tests,
TEST_WITH_TSAN,
TestCase,
Expand Down Expand Up @@ -55,7 +54,7 @@ def _can_bind(family, host):
return False


if IS_WINDOWS or IS_MACOS:
if IS_MACOS:
print("tests incompatible with tsan or asan", file=sys.stderr)
sys.exit(0)

Expand Down
8 changes: 0 additions & 8 deletions test/distributed/test_c10d_nccl.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@
instantiate_parametrized_tests,
IS_LINUX,
IS_SANDCASTLE,
isRocmArchAnyOf,
MI200_ARCH,
MI350_ARCH,
parametrize,
retry_on_connect_failures,
Expand Down Expand Up @@ -3341,12 +3339,6 @@ def first_bucket_size(ddp_bucket_mb):
opt_ddp = torch.optim.SGD(m_ddp.parameters(), lr=0.1)
has_half = any(p.dtype is torch.half for p in m.parameters())
tol = 3.0e-3 if has_half else 1.0e-5
if has_half and TEST_WITH_ROCM and isRocmArchAnyOf(MI200_ARCH):
# MIOpen picks fp16 implicit-GEMM group conv solvers on
# gfx90a that lose intermediate precision, and the DDP vs
# full-batch accumulation order difference amplifies it.
# https://github.com/ROCm/rocm-libraries/issues/11938
tol = 8.0e-3
except BaseException:
# Prints case-specific debugging info to narrow down failing case.
print(
Expand Down
Loading