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

Function test_rpc_simple

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

Source from the content-addressed store, hash-verified

99
100@pytest.mark.skipif(not env.has_rpc(), reason="need rpc")
101def test_rpc_simple():
102 server = rpc.Server(key="x1")
103 client = rpc.connect("127.0.0.1", server.port, key="x1")
104
105 def check_remote():
106 f1 = client.get_function("rpc.test.addone")
107 assert f1(10) == 11
108 f3 = client.get_function("rpc.test.except")
109
110 with pytest.raises(RuntimeError):
111 f3("abc")
112
113 f2 = client.get_function("rpc.test.strcat")
114 assert f2("abc", 11) == "abc:11"
115
116 check_remote()
117
118
119@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…