Skip to content

Commit 1e3bd56

Browse files
committed
skip autotuner test on CPU for now
1 parent 636066b commit 1e3bd56

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

.github/workflows/python-app.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,9 @@ jobs:
4848
pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121
4949
pip uninstall pytorch-triton -y
5050
51-
- name: Clone Triton and Install
51+
- name: Install Triton
5252
run: |
53-
git clone https://github.com/openai/triton.git
54-
cd triton
55-
pip install -r python/requirements.txt
56-
pip install -e .
53+
pip install triton==3.1.0
5754
5855
- name: Install Triton-Viz
5956
run: |

tests/test_autotune_add.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
import torch
23
import triton
34
import triton.language as tl
@@ -45,6 +46,10 @@ def add_kernel_no_mask(x_ptr, y_ptr, out_ptr, n_elements, BLOCK_SIZE: tl.constex
4546
tl.store(out_ptr + offsets, x_val + y_val)
4647

4748

49+
@pytest.mark.skipif(
50+
not torch.backends.cuda.is_built(),
51+
reason="This test requires a CUDA-enabled environment.",
52+
)
4853
def test_autotune_add_inrange():
4954
"""
5055
This test uses n_elements = 128, matching the size of the input tensors.
@@ -61,6 +66,10 @@ def test_autotune_add_inrange():
6166
print("test_autotune_add_inrange() passed: No out-of-bound access.")
6267

6368

69+
@pytest.mark.skipif(
70+
not torch.backends.cuda.is_built(),
71+
reason="This test requires a CUDA-enabled environment.",
72+
)
6473
def test_autotune_add_out_of_bound():
6574
"""
6675
This test deliberately sets n_elements = 256, exceeding the actual buffer size (128).

0 commit comments

Comments
 (0)