MCPcopy
hub / github.com/tinygrad/tinygrad / add_to_ctx

Function add_to_ctx

tinygrad/function.py:8–11  ·  view source on GitHub ↗
(ctx, x:UOp)

Source from the content-addressed store, hash-verified

6from tinygrad.nn.state import get_state_dict
7
8def add_to_ctx(ctx, x:UOp):
9 ret = x.param_like(len(ctx[0]))
10 ctx[0].append(x)
11 return ret
12
13pm_transform_unique_const = PatternMatcher([
14 # transform unique consts to LUNIQUE

Callers 1

function.pyFile · 0.85

Calls 2

param_likeMethod · 0.80
appendMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…