@@ -28,6 +28,7 @@ def convert_layout_kernel(XBLOCK: ttgl.constexpr, layout_a: ttgl.constexpr, layo
2828 res = ttgl .convert_layout (x , layout_b ) # noqa: F841
2929
3030
31+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
3132def test_convert_layout (fresh_knobs ):
3233 knobs .compilation .disable_line_info = True
3334
@@ -70,6 +71,7 @@ def shared_memory_kernel(XBLOCK: ttgl.constexpr, YBLOCK: ttgl.constexpr, layout_
7071 unused ._keep_alive ()
7172
7273
74+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
7375def test_shared_memory (fresh_knobs ):
7476 knobs .compilation .disable_line_info = True
7577
@@ -170,6 +172,7 @@ def shared_memory_subview_kernel(XBLOCK: ttgl.constexpr, layout: ttgl.constexpr,
170172 view .store (value .trans ())
171173
172174
175+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
173176def test_shared_memory_subview (fresh_knobs ):
174177 knobs .compilation .disable_line_info = True
175178
@@ -208,6 +211,7 @@ def shared_memory_index_kernel(XBLOCK: ttgl.constexpr, layout: ttgl.constexpr, s
208211 smem .index (i ).load (layout )
209212
210213
214+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
211215def test_shared_memory_index (fresh_knobs ):
212216 knobs .compilation .disable_line_info = True
213217
@@ -263,6 +267,7 @@ def shared_memory_cast_kernel():
263267 smem ._reinterpret (ttgl .int8 , [1024 ], ttgl .SwizzledSharedLayout (1 , 1 , 1 , [0 , 1 ]))
264268
265269
270+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
266271def test_shared_memory_cast (fresh_knobs ):
267272 expecttest .assert_expected_inline (
268273 anonymize_ir (run_parser (shared_memory_cast_kernel ).str_nodebug ()), """\
@@ -630,6 +635,7 @@ def broadcast_kernel():
630635 0 + a + b
631636
632637
638+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
633639def test_broadcast (fresh_knobs ):
634640 knobs .compilation .disable_line_info = True
635641
@@ -684,6 +690,7 @@ def math_kernel():
684690 ttgl .fma (a , b , c )
685691
686692
693+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
687694def test_math (fresh_knobs ):
688695 knobs .compilation .disable_line_info = True
689696
@@ -754,6 +761,7 @@ def reduce_kernel(out):
754761 tl .store (out + ttgl .arange (0 , 16 , s0 .type .layout ), result )
755762
756763
764+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
757765def test_reduce (fresh_knobs ):
758766 knobs .compilation .disable_line_info = True
759767
@@ -802,6 +810,7 @@ def test_reduce(fresh_knobs):
802810""" )
803811
804812
813+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
805814@filecheck_test
806815@gluon .jit
807816def test_elementwise_core ():
@@ -829,6 +838,7 @@ def linear_layout_kernel():
829838 ttgl .arange (0 , 256 , layout = ll )
830839
831840
841+ @pytest .mark .skipif (not is_cuda (), reason = "Requires CUDA" )
832842def test_linear_layout (fresh_knobs ):
833843 knobs .compilation .disable_line_info = True
834844 h = linear_layout_kernel .warmup (grid = (1 , ))
0 commit comments