From f65e343fb3d5250e8cc713173f2b418232cb4365 Mon Sep 17 00:00:00 2001 From: chenyu Date: Mon, 11 May 2026 15:59:49 -0400 Subject: [PATCH] spec.py cleanups (#16140) removed END from shared_spec and NOOP from full_spec --- tinygrad/uop/spec.py | 7 ------- 1 file changed, 7 deletions(-) diff --git a/tinygrad/uop/spec.py b/tinygrad/uop/spec.py index 43bf42f1b3..6ad1cdcc05 100644 --- a/tinygrad/uop/spec.py +++ b/tinygrad/uop/spec.py @@ -57,9 +57,6 @@ shared_spec = PatternMatcher([ all(isinstance(ra, int) for ra in rng.arg[0:-1]) and isinstance(rng.arg[-1], AxisType)), (UPat(Ops.INDEX, src=(UPat(),), allow_any_len=True, name="x"), lambda x: all(y.dtype == dtypes.weakint for y in x.src[1:]) or None), - # RANGE/SPECIAL define loops, END closes them - (UPat(Ops.END, src=(UPat(), UPat(Ops.RANGE))), lambda: True), - # STORE in tensor graph: store a value into a target (UPat(Ops.STORE, dtypes.void, (UPat(), UPat())), lambda: True), @@ -127,7 +124,6 @@ _tensor_spec = PatternMatcher([ (UPat(Ops.ALLREDUCE, name="red", src=(UPat.var("x"), UPat(Ops.DEVICE))), lambda red,x: red.dtype == x.dtype and isinstance(red.arg, Ops)), (UPat(Ops.MULTI, name="multi"), lambda multi: all(x.dtype == multi.dtype for x in multi.src) and isinstance(multi.arg, int)), - # AFTER if things were kernelized (UPat(Ops.AFTER, src=(UPat((Ops.BUFFER, Ops.AFTER)),), allow_any_len=True), lambda: True), @@ -254,9 +250,6 @@ program_spec = PatternMatcher([ # *** this spec should match all UOps ever created *** full_spec = PatternMatcher([ - # NOOP in the full spec - (UPat(Ops.NOOP), lambda: True), - # all rewrite error are okay (UPat(Ops.REWRITE_ERROR), lambda: True),