Hi,
I’d like to follow the tutorials posted in tvm doc webpage.
When I try to follow the tutorial “Writing tunable template and Using auto-tuner”,
an error occurs as follows:
…
tuner.tune(n_trial=1, measure_option=measure_option, callbacks=[autotvm.callback.log_to_file(‘matmul.log’)])
Process Process-1:
Traceback (most recent call last):
File “/usr/lib/python3.6/multiprocessing/process.py”, line 258, in _bootstrap self.run()
File “/usr/lib/python3.6/multiprocessing/process.py”, line 93, in run self._target(*self._args, **self._kwargs)
File “/home/data/tvm/tvm/python/tvm/rpc/tracker.py”, line 355, in _tracker_server handler.run()
File “/home/data/tvm/tvm/python/tvm/rpc/tracker.py”, line 351, in run self._ioloop.start()
File “/usr/local/lib/python3.6/dist-packages/tornado/platform/asyncio.py”, line 149, in start self.asyncio_loop.run_forever()
File “/usr/lib/python3.6/asyncio/base_events.py”, line 425, in run_forever raise RuntimeError(‘This event loop is already running’)
RuntimeError: This event loop is already running
RuntimeErrorTraceback (most recent call last)
in
1 tuner.tune(n_trial=1,
2 measure_option=measure_option,
----> 3 callbacks=[autotvm.callback.log_to_file(‘matmul.log’)])
/home/data/tvm/tvm/python/tvm/autotvm/tuner/tuner.py in tune(self, n_trial, measure_option, early_stopping, callbacks)
106 every measurement pair. See autotvm/tuner/callback.py for some examples.
107 """
–> 108 measure_batch = create_measure_batch(self.task, measure_option)
109 n_parallel = getattr(measure_batch, 'n_parallel', 1)
110 early_stopping = early_stopping or 1e9
/home/data/tvm/tvm/python/tvm/autotvm/measure/measure.py in create_measure_batch(task, option)
251 runner = option['runner']
252
–> 253 attach_objects = runner.set_task(task)
254
255 # feed device related information from runner to builder
/home/data/tvm/tvm/python/tvm/autotvm/measure/measure_methods.py in set_task(self, task)
344 self.port = tracker.port
345
–> 346 super(LocalRunner, self).set_task(task)
347 return server, tracker
348
/home/data/tvm/tvm/python/tvm/autotvm/measure/measure_methods.py in set_task(self, task)
213 logger.info("Get devices for measurement successfully!")
214 else:
–> 215 raise RuntimeError("Cannot get remote devices from the tracker. "
216 "Please check the status of tracker by "
217 "'python -m tvm.exec.query_rpc_tracker --port [THE PORT YOU USE]' "
RuntimeError: Cannot get remote devices from the tracker. Please check the status of tracker by ‘python -m tvm.exec.query_rpc_tracker --port [THE PORT YOU USE]’ and make sure you have free devices on the queue status.
Exception in thread Thread-3:
Traceback (most recent call last):
File “/home/data/tvm/tvm/python/tvm/rpc/base.py”, line 167, in connect_with_retry
sock.connect(addr)
ConnectionRefusedError: [Errno 111] Connection refused
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File “/usr/lib/python3.6/threading.py”, line 916, in _bootstrap_inner
self.run()
File “/usr/lib/python3.6/threading.py”, line 864, in run
self._target(*self._args, **self._kwargs)
File “/home/data/tvm/tvm/python/tvm/autotvm/measure/measure_methods.py”, line 578, in _check
remote = request_remote(device_key, host, port, priority)
File “/home/data/tvm/tvm/python/tvm/autotvm/measure/measure_methods.py”, line 545, in request_remote
tracker = _rpc.connect_tracker(host, port)
File “/home/data/tvm/tvm/python/tvm/rpc/client.py”, line 430, in connect_tracker
return TrackerSession((url, port))
File “/home/data/tvm/tvm/python/tvm/rpc/client.py”, line 221, in init
self._connect()
File “/home/data/tvm/tvm/python/tvm/rpc/client.py”, line 227, in _connect
self._sock = base.connect_with_retry(self._addr)
File “/home/data/tvm/tvm/python/tvm/rpc/base.py”, line 175, in connect_with_retry
"Failed to connect to server %s" % str(addr))
RuntimeError: Failed to connect to server (‘0.0.0.0’, 9000)
Do I have to turn on rpc_tracker to successfully execute the tutorial?
Greatly appreciate your response in advance.