Main function
()
| 24 | |
| 25 | |
| 26 | def 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 | |
| 47 | if __name__ == "__main__": |
no test coverage detected
searching dependent graphs…