From 3fa4dd6dfa2d23dc18e68daa51a0fc4addfae81f Mon Sep 17 00:00:00 2001 From: George Hotz Date: Thu, 25 Jun 2026 22:42:39 -0700 Subject: [PATCH] no gep --- tinygrad/codegen/late/coalese.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinygrad/codegen/late/coalese.py b/tinygrad/codegen/late/coalese.py index a16098d91c..7962a3a367 100644 --- a/tinygrad/codegen/late/coalese.py +++ b/tinygrad/codegen/late/coalese.py @@ -37,7 +37,7 @@ def transform_to_image(ctx, buf:UOp, x:UOp) -> UOp|None: # if no candidates, we don't rewrite if len(cands) == 0: return None # and tiebreak with indexing complexity (ie. number of nodes) - h, w, cidx = cands[0] if len(cands) == 1 else min(cands, key=lambda cand: len(cand[2].gep(1).simplify().backward_slice)) + h, w, cidx = cands[0] if len(cands) == 1 else min(cands, key=lambda cand: len(cand[2].simplify().backward_slice)) buf = buf.replace(dtype=(dtypes.imageh if buf.dtype.itemsize == 2 else dtypes.imagef)((h, w, 4))) if valid.op is not Ops.CONST or valid.arg is not True: return buf.index(valid.where(cidx.src[1], cidx.src[1].const_like(Invalid)),