diff --git a/test/test_image_dtype.py b/test/test_image_dtype.py index c9d8d33676..568a17fcf8 100644 --- a/test/test_image_dtype.py +++ b/test/test_image_dtype.py @@ -1,7 +1,7 @@ import unittest import numpy as np from tinygrad import Device, dtypes, Tensor, Context -from tinygrad.device import is_dtype_supported +from tinygrad.device import LRUAllocator, is_dtype_supported from tinygrad.dtype import ImageDType from tinygrad.engine.realize import lower_schedule from tinygrad.helpers import prod, unwrap @@ -91,6 +91,7 @@ class TestImageDType(unittest.TestCase): imgv = it.numpy() np.testing.assert_equal(np.maximum(imgv[:, 0], 0), it[:, 0].relu().numpy()) + @unittest.skipUnless(isinstance(Device.default.allocator, LRUAllocator), "Requires LRU") def test_lru_alloc(self): data = Tensor.randn(9*27*4).realize() it = data.cast(dtypes.imagef((9,27,4))).realize()