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

Function test_rpc_session_timeout_error

tests/python/runtime/test_runtime_rpc.py:634–660  ·  view source on GitHub ↗
(with_proxy)

Source from the content-addressed store, hash-verified

632@pytest.mark.skipif(not env.has_rpc(), reason="need rpc")
633@pytest.mark.parametrize("with_proxy", (True, False))
634def test_rpc_session_timeout_error(with_proxy):
635 port = 9000
636 port_end = 10000
637
638 tracker = Tracker(port=port, port_end=port_end)
639 time.sleep(0.5)
640 tracker_addr = (tracker.host, tracker.port)
641
642 if with_proxy:
643 proxy = Proxy(host="0.0.0.0", port=port, port_end=port_end, tracker_addr=tracker_addr)
644 time.sleep(0.5)
645 server = rpc.Server(host=proxy.host, port=proxy.port, is_proxy=True, key="x1")
646 else:
647 server = rpc.Server(port=port, port_end=port_end, tracker_addr=tracker_addr, key="x1")
648 time.sleep(0.5)
649
650 rpc_sess = rpc.connect_tracker(*tracker_addr).request(key="x1", session_timeout=1)
651
652 with pytest.raises(tvm.error.RPCSessionTimeoutError):
653 f1 = rpc_sess.get_function("rpc.test.addone")
654 time.sleep(2)
655 f1(10)
656
657 server.terminate()
658 if with_proxy:
659 proxy.terminate()
660 tracker.terminate()
661
662
663@pytest.mark.parametrize("call_with_unused_argument", [True, False])

Callers

nothing calls this directly

Calls 9

terminateMethod · 0.95
terminateMethod · 0.95
terminateMethod · 0.95
TrackerClass · 0.90
ProxyClass · 0.90
ServerMethod · 0.80
connect_trackerMethod · 0.80
requestMethod · 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…