From b22a34331bc9449cc76f0e0089518bc1634fa954 Mon Sep 17 00:00:00 2001 From: chenyu Date: Mon, 28 Jul 2025 11:07:59 -0400 Subject: [PATCH] remove const valid in fixup_ast [pr] (#11401) --- tinygrad/opt/kernel.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tinygrad/opt/kernel.py b/tinygrad/opt/kernel.py index c40ca9b4aa..ee754657af 100644 --- a/tinygrad/opt/kernel.py +++ b/tinygrad/opt/kernel.py @@ -448,9 +448,7 @@ class Kernel: ret = op.replace(src=tuple(fixup_ast(x) for x in op.src)) # noqa: F821 if op.op in GroupOp.Buffer and op in self.bufs: st = self.sts[self.bufs.index(op)] - # NOTE: if CONST got masked after applying opts, we create a new VALID - if op.op is Ops.CONST and any(v.mask is not None for v in st.views): return op.view(st).valid() - # otherwise we just replace the VIEW source + # replace the VIEW source return ret.replace(src=(ret.src[0].replace(arg=st),)+ret.src[1:]) if op.op is Ops.SINK: # NOTE: should group_for_reduces be added to the local_dims?