diff --git a/slangpy/tests/slangpy_tests/helpers.py b/slangpy/tests/slangpy_tests/helpers.py index c0624317..b01fe359 100644 --- a/slangpy/tests/slangpy_tests/helpers.py +++ b/slangpy/tests/slangpy_tests/helpers.py @@ -34,8 +34,7 @@ elif sys.platform == "linux" or sys.platform == "linux2": DEFAULT_DEVICE_TYPES = [DeviceType.vulkan] elif sys.platform == "darwin": - # TODO: we don't run any slangpy tests on metal due to slang bugs for now - DEFAULT_DEVICE_TYPES = [] # [DeviceType.metal] + DEFAULT_DEVICE_TYPES = [DeviceType.metal] else: raise RuntimeError("Unsupported platform") diff --git a/slangpy/tests/slangpy_tests/test_buffer_views.py b/slangpy/tests/slangpy_tests/test_buffer_views.py index f634afc9..ad732b0c 100644 --- a/slangpy/tests/slangpy_tests/test_buffer_views.py +++ b/slangpy/tests/slangpy_tests/test_buffer_views.py @@ -18,10 +18,6 @@ except ImportError: pytest.skip("Pytorch not installed", allow_module_level=True) -# Skip all tests in this file if running on MacOS -if sys.platform == "darwin": - pytest.skip("PyTorch requires CUDA, that is not available on macOS", allow_module_level=True) - MODULE = r""" struct RGB { float x; @@ -123,7 +119,8 @@ def test_to_torch( buffer_type: Union[Type[Tensor], Type[NDBuffer]], test_dtype: tuple[str, Optional[torch.dtype], Type[Any], tuple[int, ...]], ): - + if sys.platform == "darwin": + pytest.skip("PyTorch requires CUDA, that is not available on macOS", allow_module_level=True) device = helpers.get_device(device_type, cuda_interop=True) module = helpers.create_module(device, MODULE)