MCPcopy
hub / github.com/tinygrad/tinygrad / replace_input_buffer

Function replace_input_buffer

tinygrad/callify.py:171–174  ·  view source on GitHub ↗
(ctx:AllocCtx, b:UOp)

Source from the content-addressed store, hash-verified

169 return ret
170
171def replace_input_buffer(ctx:AllocCtx, b:UOp):
172 ctx.replacements.append(b)
173 return UOp.param(len(ctx.replacements)-1, b.dtype, b.shape, b.device,
174 b._min_max if b.op is Ops.BIND else None, b.src[0].arg[0] if b.op is Ops.BIND else None)
175
176pm_finalize_call = PatternMatcher([
177 (UPat(Ops.AFTER, name="x"), finalize_after),

Callers

nothing calls this directly

Calls 2

appendMethod · 0.80
paramMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…