diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6fc8a5f5..fd166f5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -411,13 +411,13 @@ jobs: DEBUG=5 PYTHONPATH=${{ github.workspace }} FORWARD_ONLY=1 python3 test/test_ops.py TestOps.test_add - name: Run pytest (not cuda) if: matrix.backend!='cuda' && matrix.backend!='ptx' && matrix.backend!='triton' - run: python -m pytest -n=auto test/ -k '${{matrix.backend=='llvm'&&'not (test_nn.py and test_conv_transpose2d)'||'test'}}' -m 'not exclude_${{matrix.backend}}' --durations=20 + run: python -m pytest -n=auto test/ -m 'not exclude_${{matrix.backend}}' --durations=20 - name: Run ONNX (only LLVM) if: matrix.backend == 'llvm' run: python -m pytest -n=auto test/external/external_test_onnx_backend.py --durations=20 - name: Run pytest (cuda) if: matrix.backend=='cuda'||matrix.backend=='ptx'||matrix.backend=='triton' - run: python -m pytest -n=auto test/ -k 'not (half or test_efficientnet_safetensors) and not (test_conv2d and test_tensor.py)' -m 'not exclude_cuda' --ignore=test/external --ignore=test/models --durations=20 + run: python -m pytest -n=auto test/ -k 'not (half or test_efficientnet_safetensors)' -m 'not exclude_cuda' --ignore=test/external --ignore=test/models --durations=20 #testunicorn: # name: ARM64 unicorn Test diff --git a/pytest.ini b/pytest.ini index 42214cbd..f203b19c 100644 --- a/pytest.ini +++ b/pytest.ini @@ -3,5 +3,4 @@ markers = exclude_cuda exclude_gpu exclude_clang - webgpu onnx_coverage diff --git a/test/test_conv.py b/test/test_conv.py index 1463eba4..6adde7af 100644 --- a/test/test_conv.py +++ b/test/test_conv.py @@ -1,9 +1,6 @@ import unittest import numpy as np from tinygrad.tensor import Tensor, Device -import pytest - -pytestmark = [pytest.mark.exclude_cuda] class TestConv(unittest.TestCase): def test_simple(self): diff --git a/test/test_custom_function.py b/test/test_custom_function.py index 659a85e4..a844bf2f 100644 --- a/test/test_custom_function.py +++ b/test/test_custom_function.py @@ -11,9 +11,6 @@ from tinygrad.helpers import prod, dtypes from tinygrad.lazy import Buffer, create_lazybuffer from tinygrad.device import CompiledASTRunner, Device from tinygrad.shape.shapetracker import ShapeTracker -import pytest - -pytestmark = pytest.mark.webgpu # we don't always have GPU support, so the type signature is the abstract CompiledBuffer instead of GPUBuffer def atan2_gpu(ret:Buffer, a:Buffer, b:Buffer): diff --git a/test/test_randomness.py b/test/test_randomness.py index b5653c97..d9b5a907 100644 --- a/test/test_randomness.py +++ b/test/test_randomness.py @@ -4,12 +4,9 @@ import numpy as np import torch from tinygrad.tensor import Tensor import tinygrad.nn as nn -import pytest from tinygrad.helpers import dtypes from functools import partial -pytestmark = pytest.mark.webgpu - # https://gist.github.com/devries/11405101 def ksprob(a): fac, total, termbf = 2.0, 0.0, 0.0 diff --git a/test/test_specific_conv.py b/test/test_specific_conv.py index 992f7a8a..fa7f53db 100644 --- a/test/test_specific_conv.py +++ b/test/test_specific_conv.py @@ -1,12 +1,10 @@ import unittest from tinygrad.tensor import Tensor -from tinygrad.helpers import dtypes +from tinygrad.helpers import CI, dtypes from tinygrad import Device -import pytest # similar to test/external/external_test_gpu_ast.py, but universal -pytestmark = pytest.mark.exclude_cuda - +@unittest.skipIf(Device.DEFAULT == "CUDA" and CI, "slow on CUDA CI") class TestSpecific(unittest.TestCase): # from openpilot @@ -22,7 +20,7 @@ class TestSpecific(unittest.TestCase): w = Tensor.randn(2048, 512) (x @ w).reshape(1, 128, 4).contiguous().realize() - @unittest.skipIf(Device.DEFAULT in ["LLVM", "WEBGPU"], "Broken on LLVM and webgpu") + @unittest.skipIf(Device.DEFAULT in ["LLVM", "WEBGPU", "CUDA"], "Broken on LLVM, WEBGPU and CUDA") def test_big_vec_mul(self): # from LLaMA # 0 buffer<4096, dtypes.float> [View((1024, 1, 1, 4), (4, 0, 0, 1), 0, None)]