MCPcopy
hub / github.com/tinygrad/tinygrad / track_visit

Method track_visit

test/null/test_graph_rewrite.py:426–428  ·  view source on GitHub ↗
(ctx, x)

Source from the content-addressed store, hash-verified

424 """Top-down walk fires pm after children are processed (post-order)."""
425 visited = []
426 def track_visit(ctx, x):
427 ctx.append(x.arg if x.op is Ops.CONST else x.op)
428 return None
429 pm = PatternMatcher([(UPat(GroupOp.All, name="x"), track_visit)])
430 a = UOp.const(dtypes.int, 1)
431 b = UOp.const(dtypes.int, 2)

Callers

nothing calls this directly

Calls 1

appendMethod · 0.80

Tested by

no test coverage detected