MCPcopy
hub / github.com/tinygrad/tinygrad / run_linear

Function run_linear

tinygrad/engine/realize.py:252–255  ·  view source on GitHub ↗
(linear:UOp, var_vals:dict[str, int]|None=None, input_uops:tuple[UOp, ...]=(), update_stats=True, jit=False, wait=False)

Source from the content-addressed store, hash-verified

250 return graph_rewrite(linear, pm_optimize_local_size, name="optimize local size", walk=True)
251
252def run_linear(linear:UOp, var_vals:dict[str, int]|None=None, input_uops:tuple[UOp, ...]=(), update_stats=True, jit=False, wait=False):
253 if not jit: linear = compile_linear(linear, validate=VALIDATE_WITH_CPU)
254 ctx = ExecContext(var_vals or {}, input_uops, update_stats, jit, wait or DEBUG>=2)
255 for call in linear.src: pm_exec.rewrite(call, ctx)
256
257def time_call(call:UOp, var_vals:dict[str, int]|None=None, timeout:int|None=None, clear_l2:bool=False) -> float:
258 if clear_l2:

Callers 15

realizeMethod · 0.90
_copy_inputFunction · 0.90
__call__Method · 0.90
__call__Method · 0.90
test_matmulFunction · 0.90
test_matmulFunction · 0.90
amd_matmul.pyFile · 0.90
_copyMethod · 0.90
hcq_execFunction · 0.90
launchBenchmarkFunction · 0.90

Calls 3

compile_linearFunction · 0.85
ExecContextClass · 0.85
rewriteMethod · 0.45

Used in the wild real call sites across dependent graphs

searching dependent graphs…