I’m taking a look at AutoTVM, specifically the Auto-tuning a convolutional network tutorial.
I would like to autotune a network on my current machines cuda device. Do you have to use RPC to do this?
I’ve set up RPC, and I’m able to register with the rpc tracker. I’ve changed the target to cuda, and the device key.
I’m never able to fully execute the tutorial.
XGBTuner and cuda target gives me: ValueError: feature_names mismatch:
Followed by a long list of feature names
Using the default XGBTuner and llvm target I get the following error:
Extract tasks...
[17:41:54] /tvm/src/runtime/opencl/opencl_device_api.cc:255: Initialize OpenCL platform 'NVIDIA CUDA'
[17:41:54] /tvm/src/runtime/opencl/opencl_device_api.cc:276: opencl(0)='GeForce GTX TITAN' cl_device_id=0x5f7c330
Tuning...
[Task 1/24] Current/Best: 41.72/ 41.72 GFLOPS | Progress: (1/1000) | 0.57 s Done.
Traceback (most recent call last):
File "tune_nnvm_arm.py", line 337, in <module>
tune_and_evaluate()
File "tune_nnvm_arm.py", line 293, in tune_and_evaluate
tune_tasks(tasks, **tuning_option)
File "tune_nnvm_arm.py", line 265, in tune_tasks
tuner_obj.load_history(autotvm.record.load_from_file(tmp_log_file))
File "/tvm/python/tvm/autotvm/tuner/model_based_tuner.py", line 283, in load_history
maximums = self.model_optimizer.find_maximums(base_model, self.plan_size, self.visited)
File "/tvm/python/tvm/autotvm/tuner/sa_model_optimizer.py", line 86, in find_maximums
new_points[i] = random_walk(p, self.dims)
File "/tvm/python/tvm/autotvm/tuner/sa_model_optimizer.py", line 145, in random_walk
from_i = np.random.randint(len(old))
File "mtrand.pyx", line 993, in mtrand.RandomState.randint
ValueError: low >= high
GATuner and cuda target:
Extract tasks...
[17:52:01] /tvm/src/runtime/opencl/opencl_device_api.cc:255: Initialize OpenCL platform 'NVIDIA CUDA'
[17:52:01] /tvm/src/runtime/opencl/opencl_device_api.cc:276: opencl(0)='GeForce GTX TITAN' cl_device_id=0x5ed4bc0
Tuning...
Traceback (most recent call last):
File "tune_nnvm_arm.py", line 337, in <module>
tune_and_evaluate()
File "tune_nnvm_arm.py", line 293, in tune_and_evaluate
tune_tasks(tasks, **tuning_option)
File "tune_nnvm_arm.py", line 273, in tune_tasks
autotvm.callback.log_to_file(tmp_log_file)])
File "/tvm/python/tvm/autotvm/tuner/tuner.py", line 125, in tune
self.update(inputs, results)
File "/tvm/python/tvm/autotvm/tuner/ga_tuner.py", line 81, in update
elite_indexes = np.argpartition(scores, -self.elite_num)[-self.elite_num:]
File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 731, in argpartition
return _wrapfunc(a, 'argpartition', kth, axis=axis, kind=kind, order=order)
File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 52, in _wrapfunc
return getattr(obj, method)(*args, **kwds)
ValueError: kth(=-2) out of bounds (1)
Done.
RandomTuner or GridSearchTuner with cuda target:
[Task 24/24] Current/Best: 410.72/ 410.72 GFLOPS | Progress: (1/1000) | 0.90 s Done.
Compile...
Upload...
Traceback (most recent call last):
File "tune_nnvm_arm.py", line 337, in <module>
tune_and_evaluate()
File "tune_nnvm_arm.py", line 315, in tune_and_evaluate
remote = autotvm.measure.request_remote(device_key, timeout=10000)
File "/tvm/python/tvm/autotvm/measure/measure_methods.py", line 60, in request_remote
host = os.environ['TVM_TRACKER_HOST']
File "/usr/lib/python2.7/UserDict.py", line 40, in __getitem__
raise KeyError(key)
KeyError: 'TVM_TRACKER_HOST'