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

Function check

tests/python/contrib/test_rpc_proxy.py:46–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

44 prox = proxy.Proxy("127.0.0.1", web_port=web_port)
45
46 def check():
47 if not tvm.runtime.enabled("rpc"):
48 return
49
50 server = multiprocessing.Process(
51 target=proxy.websocket_proxy_server, args=(f"ws://localhost:{web_port}/ws", "x1")
52 )
53 # Need to make sure that the connection start after proxy comes up
54 time.sleep(0.1)
55 server.deamon = True
56 server.start()
57 client = rpc.connect(prox.host, prox.port, key="x1")
58 f1 = client.get_function("testing.echo")
59 assert f1(10) == 10
60 assert f1("xyz") == "xyz"
61
62 check()
63 except ImportError:

Callers 1

rpc_proxy_checkFunction · 0.70

Calls 4

enabledMethod · 0.45
startMethod · 0.45
connectMethod · 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…