Skip to content

Commit 81eee5b

Browse files
authored
unused spec [pr] (tinygrad#14468)
no BUFFER_VIEW in tensor, and no CONTIGUOUS in KERNEL
1 parent f873c7b commit 81eee5b

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

tinygrad/uop/spec.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,9 @@ def validate_index(buf:UOp, idx:UOp, gate:UOp|None=None):
8686
isinstance(d.arg, str) or (isinstance(d.arg, tuple) and all(isinstance(s, str) for s in d.arg))),
8787
(UPat(Ops.BUFFER, src=(UPat((Ops.LUNIQUE, Ops.UNIQUE)), UPat(Ops.DEVICE)), name="buf"),
8888
lambda buf: isinstance(buf.arg, int) and isinstance(buf.dtype, (DType, ImageDType))),
89-
(UPat(Ops.BUFFER_VIEW, src=(UPat(Ops.BUFFER),), name="buf_view"),
90-
lambda buf_view: isinstance(buf_view.arg, tuple) and len(buf_view.arg) == 2 and all(isinstance(arg, (int, UOp)) for arg in buf_view.arg)),
91-
(UPat(Ops.BUFFER_VIEW, src=(UPat(Ops.MSTACK, src=UPat(Ops.BUFFER)),)), lambda: True),
9289

9390
# KERNEL can attach to an AFTER to describe the compute required to realize a BUFFER
94-
(UPat(Ops.KERNEL, src=UPat((Ops.BUFFER, Ops.BUFFER_VIEW, Ops.AFTER, Ops.MSELECT, Ops.MSTACK, Ops.BIND, Ops.CONTIGUOUS))), lambda: True),
91+
(UPat(Ops.KERNEL, src=UPat((Ops.BUFFER, Ops.AFTER, Ops.MSELECT, Ops.MSTACK, Ops.BIND))), lambda: True),
9592

9693
# ASSIGN has a target and a value. It can also optionally depend on other assigns
9794
(UPat(Ops.ASSIGN, name="x"), lambda x: len(x.src) >= 2 and all(s.op is Ops.ASSIGN for s in x.src[2:])),

0 commit comments

Comments
 (0)