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

Function test_rpc_array

tests/python/runtime/test_runtime_rpc.py:134–146  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

132
133@pytest.mark.skipif(not env.has_rpc(), reason="need rpc")
134def test_rpc_array():
135 server = rpc.Server()
136 remote = rpc.connect("127.0.0.1", server.port)
137
138 def check_remote():
139 x = np.ones((3, 4))
140 r_cpu = tvm.runtime.tensor(x, remote.cpu(0))
141 assert str(r_cpu.device).startswith("remote")
142 np.testing.assert_equal(r_cpu.numpy(), x)
143 fremote = remote.get_function("rpc.test.remote_tensor_func")
144 fremote(r_cpu)
145
146 check_remote()
147
148
149@pytest.mark.skipif(not env.has_rpc(), reason="need rpc")

Callers

nothing calls this directly

Calls 3

ServerMethod · 0.80
check_remoteFunction · 0.70
connectMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…