Commit 27843a9f by Bing Xu Committed by eqy

[autotvm] fix #2617 (#2619)

parent 9e53b3d6
......@@ -313,9 +313,9 @@ class LocalRunner(RPCRunner):
from ...rpc.tracker import Tracker
from ...rpc.server import Server
tracker = Tracker('localhost', port=9000, port_end=10000, silent=True)
tracker = Tracker('0.0.0.0', port=9000, port_end=10000, silent=True)
device_key = '$local$device$%d' % tracker.port
server = Server('localhost', port=9000, port_end=10000,
server = Server('0.0.0.0', port=9000, port_end=10000,
key=device_key,
use_popen=True, silent=True,
tracker_addr=(tracker.host, tracker.port))
......
......@@ -193,7 +193,7 @@ tuning_option = {
builder=autotvm.LocalBuilder(
build_func='ndk' if use_android else 'default'),
runner=autotvm.RPCRunner(
device_key, host='localhost', port=9190,
device_key, host='0.0.0.0', port=9190,
number=5,
timeout=10,
),
......@@ -327,7 +327,7 @@ def tune_and_evaluate(tuning_opt):
# upload module to device
print("Upload...")
remote = autotvm.measure.request_remote(device_key, 'localhost', 9190,
remote = autotvm.measure.request_remote(device_key, '0.0.0.0', 9190,
timeout=10000)
remote.upload(tmp.relpath(filename))
rlib = remote.load_module(filename)
......
......@@ -112,7 +112,7 @@ tuning_option = {
#runner=autotvm.LocalRunner(number=20, repeat=3, timeout=4, min_repeat_ms=150),
runner=autotvm.RPCRunner(
'1080ti', # change the device key to your key
'localhost', 9190,
'0.0.0.0', 9190,
number=20, repeat=3, timeout=4, min_repeat_ms=150)
),
}
......@@ -327,13 +327,13 @@ def tune_and_evaluate(tuning_opt):
#
# .. code-block:: bash
#
# python -m tvm.exec.rpc_server --tracker=localhost:9190 --key=1080ti
# python -m tvm.exec.rpc_server --tracker=0.0.0.0:9190 --key=1080ti
#
# After registering devices, we can confirm it by querying rpc_tracker
#
# .. code-block:: bash
#
# python -m tvm.exec.query_rpc_tracker --host=localhost --port=9190
# python -m tvm.exec.query_rpc_tracker --host=0.0.0.0 --port=9190
#
# For example, if we have four 1080ti, two titanx and one gfx900, the output can be
#
......@@ -362,7 +362,7 @@ tuning_option = {
builder=autotvm.LocalBuilder(timeout=10),
runner=autotvm.RPCRunner(
'1080ti', # change the device key to your key
'localhost', 9190,
'0.0.0.0', 9190,
number=20, repeat=3, timeout=4, min_repeat_ms=150),
),
}
......@@ -196,7 +196,7 @@ tuning_option = {
builder=autotvm.LocalBuilder(
build_func='ndk' if use_android else 'default'),
runner=autotvm.RPCRunner(
device_key, host='localhost', port=9190,
device_key, host='0.0.0.0', port=9190,
number=10,
timeout=5,
),
......@@ -309,7 +309,7 @@ def tune_and_evaluate(tuning_opt):
# upload module to device
print("Upload...")
remote = autotvm.measure.request_remote(device_key, 'localhost', 9190,
remote = autotvm.measure.request_remote(device_key, '0.0.0.0', 9190,
timeout=10000)
remote.upload(tmp.relpath(filename))
rlib = remote.load_module(filename)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment