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

Function check

tests/python/runtime/test_runtime_rpc.py:170–187  ·  view source on GitHub ↗
(remote, local_session)

Source from the content-addressed store, hash-verified

168@pytest.mark.skipif(not env.has_rpc(), reason="need rpc")
169def test_rpc_echo():
170 def check(remote, local_session):
171 fecho = remote.get_function("testing.echo")
172 assert fecho(1, 2, 3) == 1
173 assert fecho(100, 2, 3) == 100
174 assert fecho("xyz") == "xyz"
175 assert bytes(fecho(bytearray(b"123"))) == b"123"
176
177 with pytest.raises(RuntimeError):
178 raise_err = remote.get_function("testing.test_raise_error")
179 raise_err("RuntimeError", "msg")
180
181 remote.cpu().sync()
182 # tests around system lib are not threadsafe by design
183 # and do not work well with multithread pytest
184 # skip local session as they are being tested elsewhere
185 if not local_session:
186 with pytest.raises(AttributeError):
187 f3 = remote.system_lib()["notexist"]
188
189 temp = rpc.server._server_env([])
190 server = rpc.Server()

Callers 4

test_rpc_echoFunction · 0.70
check_minrpcFunction · 0.70
check_remoteFunction · 0.70

Calls 5

make_shapeFunction · 0.85
system_libMethod · 0.80
get_functionMethod · 0.45
syncMethod · 0.45
cpuMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…