Skip to content

[AUTOGENERATED] [rocm6.5_internal_testing] [rocm6.4_internal_testing] Replaced ROCm specific skips to generalized conditions #2127

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

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
17 changes: 8 additions & 9 deletions test/inductor/test_aot_inductor.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@
from torch.export import Dim, export, export_for_training
from torch.testing import FileCheck
from torch.testing._internal import common_utils
from torch.testing._internal.common_cuda import PLATFORM_SUPPORTS_FP8, SM80OrLater
from torch.testing._internal.common_cuda import (
SM80OrLater,
SM90OrLater,
PLATFORM_SUPPORTS_FLASH_ATTENTION
)
from torch.testing._internal.common_device_type import (
_has_sufficient_memory,
skipCUDAIf,
Expand All @@ -45,10 +49,8 @@
IS_WINDOWS,
parametrize,
skipIfRocm,
skipIfRocmArch,
skipIfXpu,
TEST_WITH_ROCM,
NAVI32_ARCH,
)
from torch.testing._internal.custom_tensor import CustomTensorPlainOut
from torch.testing._internal.inductor_utils import GPU_TYPE
Expand Down Expand Up @@ -1018,10 +1020,9 @@ def forward(self, q, k, v):
)
self.check_model(Model(), example_inputs)

# Eager mode produces incorrect tensor values for navi32 during this test
@skipIfRocmArch(NAVI32_ARCH)
@unittest.skipIf(IS_FBCODE, "Not yet runnable in fbcode")
@unittest.skipIf(not SM80OrLater, "bfloat16 only supported in sm80+")
@unittest.skipIf(not PLATFORM_SUPPORTS_FLASH_ATTENTION, "Some archs don't support SDPA")
def test_sdpa_2(self):
class Model(torch.nn.Module):
def __init__(self) -> None:
Expand Down Expand Up @@ -1128,9 +1129,8 @@ def forward(self, x, y):
)
self.check_model(Repro(), example_inputs)

@skipIfRocmArch(NAVI32_ARCH)
# SDPA is not supported on navi32 arch
@skipIfXpu(msg="_scaled_dot_product_flash_attention is not supported on XPU yet")
@unittest.skipIf(not PLATFORM_SUPPORTS_FLASH_ATTENTION, "Some archs don't support SDPA")
def test_fallback_kernel_with_symexpr_output(self):
if self.device != GPU_TYPE:
raise unittest.SkipTest("requires GPU")
Expand Down Expand Up @@ -3392,8 +3392,7 @@ def grid(meta):
dynamic_shapes=dynamic_shapes,
)

@skipIfRocmArch(NAVI32_ARCH)
# SDPA is not supported on navi32 arch
@unittest.skipIf(not PLATFORM_SUPPORTS_FLASH_ATTENTION, "Some archs don't support SDPA")
def test_scaled_dot_product_efficient_attention(self):
if self.device != GPU_TYPE:
raise unittest.SkipTest("requires GPU")
Expand Down
10 changes: 0 additions & 10 deletions torch/testing/_internal/common_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1350,16 +1350,6 @@ def printErrors(self) -> None:
IS_ARM64 = platform.machine() in ('arm64', 'aarch64')
IS_S390X = platform.machine() == "s390x"

NAVI32_ARCH = "gfx1101"

def is_navi_arch():
if torch.cuda.is_available():
prop = torch.cuda.get_device_properties(0)
gfx_arch = prop.gcnArchName.split(":")[0]
if gfx_arch in ["gfx1100", "gfx1101", "gfx1102"]:
return True
return False

def is_avx512_vnni_supported():
if sys.platform != 'linux':
return False
Expand Down