8000 [Cutlass] Only run EVT tests on sm90 · pytorch/pytorch@2daebd7 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2daebd7

Browse files
committed
[Cutlass] Only run EVT tests on sm90
ghstack-source-id: 314cde4 Pull Request resolved: #151713
1 parent 045cb5d commit 2daebd7

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/inductor/test_cutlass_evt.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
from torch._inductor.ir import ComputedBuffer, FixedLayout, PermuteView, Pointwise
1414
from torch._inductor.scheduler import BaseSchedulerNode
1515
from torch._inductor.utils import OrderedSet
16+
from torch.testing._internal.common_cuda import SM90OrLater
1617
from torch.testing._internal.inductor_utils import HAS_CPU, HAS_CUDA
1718

1819

@@ -108,6 +109,7 @@ def __init__(self, name_to_buffer):
108109

109110

110111
class TestCutlassEVT(TestCase):
112+
@unittest.skipIf(not SM90OrLater, "need sm_90")
111113
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
112114
def test_py_codegen_accumulator_return(self):
113115
from torch._inductor.codegen.cuda.cutlass_python_evt import CutlassEVTCodegen
@@ -162,6 +164,7 @@ def fn(accum, buf1, buf2):
162164
return D, tmp_1, tmp_2""",
163165
)
164166

167+
@unittest.skipIf(not SM90OrLater, "need sm_90")
165168
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
166169
def test_py_codegen_disjoint_read_indexing(self):
167170
from torch._inductor.codegen.cuda.cutlass_python_evt import CutlassEVTCodegen
@@ -207,6 +210,7 @@ def inner_fn_buf4(index):
207210
"""Unsupported indexing for buf0 with index 200*i0 + 60000*i1 + i2 and strides [200, 60000, 1]""",
208211
)
209212

213+
@unittest.skipIf(not SM90OrLater, "need sm_90")
210214
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
211215
def test_py_codegen(self):
212216
from torch._inductor.codegen.cuda.cutlass_python_evt import CutlassEVTCodegen
@@ -261,6 +265,7 @@ def fn(accum, buf1, buf2):
261265
return D, tmp_2""",
262266
)
263267

268+
@unittest.skipIf(not SM90OrLater, "need sm_90")
264269
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
265270
def test_example_tensor_creation(self):
266271
from torch._inductor.codegen.cuda.cutlass_lib_extensions.evt_extensions import (
@@ -292,6 +297,7 @@ def test_example_tensor_creation(self):
292297
result["buf1"].element, torch_dtype_to_cutlass_type(torch.float32)
293298
)
294299

300+
@unittest.skipIf(not SM90OrLater, "need sm_90")
295301
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
296302
def test_evt_argument_codegen(self):
297303
epilogue_functor = _trace(BIAS_CODE, EXAMPLE_TENSORS)
@@ -322,6 +328,7 @@ def test_evt_argument_codegen(self):
322328
""",
323329
)
324330

331+
@unittest.skipIf(not SM90OrLater, "need sm_90")
325332
@unittest.skipIf(not try_import_cutlass(), "requires cutlass")
326333
def test_evt_codegen(self):
327334
_, _, code = trace(

0 commit comments

Comments
 (0)
0