From 8c8aecc2ea038464fdbae313103a33b026a95e0c Mon Sep 17 00:00:00 2001 From: Egor Churaev Date: Wed, 2 Dec 2020 12:56:34 +0300 Subject: [PATCH] Change default hostname in rpc_tracker This change fix problem with version of IP protocol on MacOS. Previous the rpc_tracker and query_rpc_tracker were not able connect to each other with default hostnames. The root cause was in method `socket.getaddrinfo`. In rpc_tracker the default hostname was "0.0.0.0" and `getaddrinfo` returned IPv4 type. In query_rpc_tracker the default hastname is "localhost" and `getaddrinfo` on MacOS returns IPv6 type. Note: on Linux both have IPv4 type. These tools worked by different protocols and this is why query_rpc_tracker wasn't able connect to rpc_tracker. Now the default hostnames are the same. So it works fine on MacOS. --- python/tvm/exec/rpc_tracker.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/tvm/exec/rpc_tracker.py b/python/tvm/exec/rpc_tracker.py index 4a1a964338ba2..8618ae9092324 100644 --- a/python/tvm/exec/rpc_tracker.py +++ b/python/tvm/exec/rpc_tracker.py @@ -33,7 +33,7 @@ def main(args): if __name__ == "__main__": parser = argparse.ArgumentParser() - parser.add_argument("--host", type=str, default="0.0.0.0", help="the hostname of the tracker") + parser.add_argument("--host", type=str, default="localhost", help="the hostname of the tracker") parser.add_argument("--port", type=int, default=9190, help="The port of the RPC") parser.add_argument("--port-end", type=int, default=9199, help="The end search port of the RPC") parser.add_argument(