MCPcopy Create free account
hub / github.com/apache/tvm / _numpy_from_worker_0

Function _numpy_from_worker_0

tests/python/disco/test_session.py:145–149  ·  view source on GitHub ↗
(sess: di.Session, remote_array, shape, dtype)

Source from the content-addressed store, hash-verified

143
144
145def _numpy_from_worker_0(sess: di.Session, remote_array, shape, dtype):
146 host_array = tvm.runtime.empty(shape, dtype, device=tvm.cpu())
147 sess.copy_from_worker_0(host_array, remote_array)
148 sess.sync_worker_0()
149 return host_array.numpy()
150
151
152_all_session_kinds = [di.ThreadedSession, di.ProcessSession, create_socket_session]

Callers 3

test_tensorFunction · 0.85
test_vm_moduleFunction · 0.85
test_vm_multi_funcFunction · 0.85

Calls 5

copy_from_worker_0Method · 0.80
sync_worker_0Method · 0.80
numpyMethod · 0.80
emptyMethod · 0.45
cpuMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…