Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/tinygrad/tinygrad
/ to_np
Function
to_np
extra/hip_large_kernel.py:21–21 ·
view source on GitHub ↗
(buf)
Source
from the content-addressed store, hash-verified
19
20
import
numpy
as
np
21
def
to_np(buf):
return
np.frombuffer(buf.as_memoryview().cast(buf.dtype.base.fmt), dtype=_to_np_dtype(buf.dtype.base))
22
23
big = to_np(buf0)
24
print(big)
Callers
1
hip_large_kernel.py
File · 0.85
Calls
3
_to_np_dtype
Function · 0.90
as_memoryview
Method · 0.80
cast
Method · 0.45
Tested by
no test coverage detected
Used in the wild
real call sites across dependent graphs
searching dependent graphs…