MCPcopy Index your code
hub / github.com/tinygrad/tinygrad / load

Function load

tinygrad/runtime/ops_python.py:20–22  ·  view source on GitHub ↗
(inp, j, dtype: DType)

Source from the content-addressed store, hash-verified

18 return from_storage_scalar(m[i], dtype)
19
20def load(inp, j, dtype: DType):
21 if len(inp) >= 3: return [_load(m, x+j if x is not None else None, dtype) if gate else default for (m,x),default,gate in zip(*inp[:3])]
22 return [_load(m, x+j if x is not None else None, dtype) for m,x in inp[0]]
23
24def _store(m, i, v, dtype: DType):
25 if i < 0 or i >= len(m): raise IndexError(f"store out of bounds, size is {len(m)}, access is {i}, value is {v}")

Callers 1

__call__Method · 0.70

Calls 1

_loadFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…