From ed1b57386800216f94e49d8d4fb003fefdd4fbf6 Mon Sep 17 00:00:00 2001 From: Ignacio Sica Date: Mon, 27 Jan 2025 14:56:30 -0300 Subject: [PATCH] ignore beam cache in test_tiny for stateless beam (#8771) --- test/test_tiny.py | 4 ++-- tinygrad/helpers.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/test_tiny.py b/test/test_tiny.py index 6b3ff6ed06..feb9581ee0 100644 --- a/test/test_tiny.py +++ b/test/test_tiny.py @@ -63,7 +63,7 @@ class TestTiny(unittest.TestCase): # *** BEAM (for Kernel speed) *** def test_beam(self): - with Context(BEAM=1): self.test_plus() + with Context(BEAM=1, IGNORE_BEAM_CACHE=1): self.test_plus() # *** symbolic (to allow less recompilation) *** @@ -107,7 +107,7 @@ class TestTiny(unittest.TestCase): with Context(IMAGE=2): self.test_gemm(out_dtype=dtypes.imagef((4, 1, 4))) def test_beam_image(self): - with Context(BEAM=1): self.test_image() + with Context(BEAM=1, IGNORE_BEAM_CACHE=1): self.test_image() if __name__ == '__main__': unittest.main() diff --git a/tinygrad/helpers.py b/tinygrad/helpers.py index d1eedb5eb5..0bd3e367eb 100644 --- a/tinygrad/helpers.py +++ b/tinygrad/helpers.py @@ -109,7 +109,7 @@ USE_TC, TC_OPT, AMX, TRANSCENDENTAL = ContextVar("TC", 1), ContextVar("TC_OPT", FUSE_ARANGE, FUSE_CONV_BW = ContextVar("FUSE_ARANGE", 0), ContextVar("FUSE_CONV_BW", 0) SPLIT_REDUCEOP, NO_MEMORY_PLANNER, RING = ContextVar("SPLIT_REDUCEOP", 1), ContextVar("NO_MEMORY_PLANNER", 0), ContextVar("RING", 1) PICKLE_BUFFERS, PROFILE, LRU = ContextVar("PICKLE_BUFFERS", 1), ContextVar("PROFILE", getenv("VIZ")), ContextVar("LRU", 1) -CACHELEVEL = ContextVar("CACHELEVEL", 2) +CACHELEVEL, IGNORE_BEAM_CACHE = ContextVar("CACHELEVEL", 2), ContextVar("IGNORE_BEAM_CACHE", 0) @dataclass(frozen=True) class Metadata: