Skip to content
Open
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: 6 additions & 4 deletions test/prototype/moe_training/ep/test_kernels.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,16 @@
import pytest
import torch

from torchao.utils import is_cuda_version_at_least, is_sm_at_least_100
from torchao.utils import is_cuda_version_at_least, is_MI350, is_sm_at_least_100

if not (
torch.cuda.is_available()
and is_sm_at_least_100()
and is_cuda_version_at_least(12, 8)
and ((is_sm_at_least_100() and is_cuda_version_at_least(12, 8)) or is_MI350())
):
pytest.skip("Test requires CUDA 12.8+ with SM >= 100", allow_module_level=True)
pytest.skip(
"Test requires CUDA 12.8+ with SM >= 100, or ROCm gfx950",
allow_module_level=True,
)

from torchao.prototype.moe_training.ep.kernels import generate_permute_indices
from torchao.prototype.moe_training.ep.permute import _triton_permute_bwd
Expand Down
10 changes: 6 additions & 4 deletions test/prototype/moe_training/ep/test_permute.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import pytest
import torch

from torchao.utils import is_cuda_version_at_least, is_sm_at_least_100
from torchao.utils import is_cuda_version_at_least, is_MI350, is_sm_at_least_100

if not (
torch.cuda.is_available()
and is_sm_at_least_100()
and is_cuda_version_at_least(12, 8)
and ((is_sm_at_least_100() and is_cuda_version_at_least(12, 8)) or is_MI350())
):
pytest.skip("Test requires CUDA 12.8+ with SM >= 100", allow_module_level=True)
pytest.skip(
"Test requires CUDA 12.8+ with SM >= 100, or ROCm gfx950",
allow_module_level=True,
)

from torchao.prototype.moe_training.ep import permute_mxfp8_fwd_hp_bwd
from torchao.prototype.moe_training.ep.permute import permute_and_pad
Expand Down