Error in


i use the script to tune the model , i set try_spatial_pack_depthwise=True in function

def tune_tasks(tasks, measure_option, tuner='xgb', n_trial=1000, early_stopping=None, log_filename='tuning.log', use_transfer_learning=True, try_winograd=True, try_spatial_pack_depthwise=True)

it gives the error after i run, the error info as follows:

    Exception has occurred: KeyError
File "/home/mm/workspace/tvm-master-new/python/tvm/autotvm/task/", line 220, in dispatch_func
    return dispatch_dict[cfg.template_key](cfg, *args, **kwargs)
File "</home/mm/.local/lib/python3.7/site-packages/>", line 2, in config_dispatcher
File "/home/mm/workspace/tvm-master-new/python/tvm/", line 372, in dispatch_func
    return dispatch_dict[k](*args, **kwargs)
File "</home/mm/.local/lib/python3.7/site-packages/>", line 2, in depthwise_conv2d_nchw
File "/home/mm/workspace/tvm-master-new/python/tvm/autotvm/task/", line 186, in _topi_nn_depthwise_conv2d_nchw
    C = topi.nn.depthwise_conv2d_nchw(*args, **kwargs)
File "/home/mm/workspace/tvm-master-new/python/tvm/autotvm/task/", line 191, in create
    sch, _ = func(*args)
File "/home/mm/workspace/somecodes/tvm/autotvm/", line 122, in tune_tasks
File "/home/mm/workspace/somecodes/tvm/autotvm/", line 183, in tune_and_evaluate
    tune_tasks(tasks, **tuning_opt)
File "/home/mm/workspace/somecodes/tvm/autotvm/", line 227, in <module>


Do you tune from the scratch? seems that you have tuned and run with the tuned log, then you get the error.


yes ,i tune the model from the scratch, this is the first time i use autotvm to tune the mxnet model.


I have tested it and no problem of contrib_spatial_pack. What I means before is do you tune from scratch without contrib_spatial_pack, but when you run, you set contrib_spatial_pack be true? Or do you have workload not tuned with contrib_spatial_pack?


yes ,at first, i tune the model without contrib_spatial_pack(try_spatial_pack_depthwise=False), then i break the tuning. i restart the tuning with try_spatial_pack_depthwise=True,it gives the error.


Do you remove the .tmp file? If you use the transfer learning, it will load the history file and maybe have problem. If you still have problem, try to update the latest code and try again.


i just tested it, it always give the erros: KeyError: 'contrib_spatial_pack’
i don’t find .tmp file , i have update the latest code, it is weird. i will test it by another computer tommrow.


i have tested it by another computer , the same error, can you help me to test the model ? the mxnet model download url(mxnet model) thanks


which model? I find it has two models.


this model : mnet.25-0000.params ,mnet.25-symbol.json


input size is 640*640


I can not reproduce this error. It could also work well too. Some suggestions maybe help:
firstly install cython, i.e. pip3 install cython

Then in the build directory run make cython3

I find it could solve some issue of macOS, but this issue shouldn’t be existed in Linux.


i have tested it, same error, can you post the your tuning codes?thanks


No special. Just