MCPcopy Create free account
hub / github.com/apache/tvm / main

Function main

python/tvm/exec/query_rpc_tracker.py:26–44  ·  view source on GitHub ↗

Main function

()

Source from the content-addressed store, hash-verified

24
25
26def main():
27 """Main function"""
28 parser = argparse.ArgumentParser()
29 parser.add_argument("--host", type=str, default="", help="the hostname of the tracker")
30 parser.add_argument("--port", type=int, default=None, help="The port of the RPC")
31 args = parser.parse_args()
32 logging.basicConfig(level=logging.INFO)
33
34 # default to local host or environment variable
35 if not args.host:
36 args.host = os.environ.get("TVM_TRACKER_HOST", "127.0.0.1")
37
38 if not args.port:
39 args.port = int(os.environ.get("TVM_TRACKER_PORT", "9190"))
40
41 conn = rpc.connect_tracker(args.host, args.port)
42 # pylint: disable=superfluous-parens
43 print(f"Tracker address {args.host}:{args.port}\n")
44 print(f"{conn.text_summary()}")
45
46
47if __name__ == "__main__":

Callers 1

Calls 5

printFunction · 0.85
add_argumentMethod · 0.80
connect_trackerMethod · 0.80
text_summaryMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…