MCPcopy
hub / github.com/tinygrad/tinygrad / run_program

Function run_program

test/opt/test_tensor_cores.py:23–26  ·  view source on GitHub ↗
(prg:UOp, bufs:list[Buffer])

Source from the content-addressed store, hash-verified

21AMX = "AMX" in DEV.arch
22
23def run_program(prg:UOp, bufs:list[Buffer]):
24 buf_uops = [UOp.new_buffer(b.device, b.size, b.dtype) for b in bufs]
25 for u,b in zip(buf_uops, bufs): buffers[u] = b
26 run_linear(UOp(Ops.LINEAR, src=(prg.call(*buf_uops),)))
27
28def helper_tc_ensure_uops_and_opts_count(N: int, M:int, K:int, dtype_in:DType, dtype_out:DType, axis:int=0, tc_select:int=-1, tc_opt:int=0,
29 ensure_triggered:bool=True):

Callers 2

helper_tc_allcloseFunction · 0.70

Calls 4

run_linearFunction · 0.90
UOpClass · 0.90
new_bufferMethod · 0.80
callMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…