MCPcopy Index your code
hub / github.com/apache/tvm / check_remote

Function check_remote

tests/python/contrib/test_random.py:131–141  ·  view source on GitHub ↗
(server)

Source from the content-addressed store, hash-verified

129 return
130
131 def check_remote(server):
132 remote = rpc.connect(server.host, server.port)
133 value = tvm.runtime.empty((512, 512), dtype, remote.cpu())
134 random_fill = remote.get_function("tvm.contrib.random.random_fill")
135 random_fill(value)
136
137 assert np.count_nonzero(value.numpy()) == 512 * 512
138
139 # make sure arithmentic doesn't overflow too
140 np_values = value.numpy()
141 assert np.isfinite(np_values * np_values + np_values).any()
142
143 check_remote(rpc.Server("127.0.0.1"))
144

Callers 1

test_rpcFunction · 0.70

Calls 5

numpyMethod · 0.80
connectMethod · 0.45
emptyMethod · 0.45
cpuMethod · 0.45
get_functionMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…