Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release/2.5] Skipped some inductor tests for no hipcc rocm environments #1697

Draft
wants to merge 3 commits into
base: release/2.5
Choose a base branch
from
Draft
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
3 changes: 3 additions & 0 deletions test/inductor/test_torchinductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@
subtest,
TEST_WITH_ASAN,
TEST_WITH_ROCM,
HAS_HIPCC,
)
from torch.utils import _pytree as pytree
from torch.utils._python_dispatch import TorchDispatchMode
Expand Down Expand Up @@ -927,6 +928,7 @@ def test_aoti_eager_support_str(self):
self.assertEqual(ref_value, res_value)

@skipCUDAIf(not SM80OrLater, "Requires sm80")
@skipCUDAIf(TEST_WITH_ROCM and not HAS_HIPCC, "ROCm requires hipcc compiler")
@skip_if_halide # aoti
@skipIfWindows(msg="aoti not support on Windows")
def test_aoti_eager_cache_hit(self):
Expand Down Expand Up @@ -970,6 +972,7 @@ def test_aoti_eager_cache_hit(self):
self.assertEqual(ref_value, res_value)

@skipCUDAIf(not SM80OrLater, "Requires sm80")
@skipCUDAIf(TEST_WITH_ROCM and not HAS_HIPCC, "ROCm requires hipcc compiler")
@skip_if_halide # aoti
@skipIfWindows(msg="aoti not support on Windows")
def test_aoti_eager_with_persistent_cache(self):
Expand Down
3 changes: 3 additions & 0 deletions torch/testing/_internal/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
from torch.testing._comparison import not_close_error_metas
from torch.testing._internal.common_dtype import get_all_dtypes
from torch.utils._import_utils import _check_module_exists
from torch.utils.cpp_extension import ROCM_HOME
import torch.utils._pytree as pytree
try:
import pytest
Expand All @@ -106,6 +107,8 @@

MI300_ARCH = ("gfx940", "gfx941", "gfx942")

HAS_HIPCC = torch.version.hip is not None and ROCM_HOME is not None and shutil.which('hipcc') is not None


def freeze_rng_state(*args, **kwargs):
return torch.testing._utils.freeze_rng_state(*args, **kwargs)
Expand Down