[AutoTuning] nnvm.sym.dense config space issue


#1

Using the tune_nnvm_cuda.py in the tutorials/autotvm folder, and do the following change:
1, set network = ‘custom’
"elif name == ‘custom’:
# an example for custom network
from nnvm.testing import utils
net = nnvm.sym.Variable(‘data’)
net = nnvm.sym.conv2d(net, channels=4, kernel_size=(3,3), padding=(1,1))
net = nnvm.sym.flatten(net)
net = nnvm.sym.dense(net, units=1000)
net, params = utils.create_workload(net, batch_size, (3, 224, 224))
"
2, tuning the dense symbols in the graph
tasks = autotvm.task.extract_from_graph(net, target=target,
shape={‘data’: input_shape}, dtype=dtype,
symbols=(nnvm.sym.dense,))

tsk = autotvm.task.create(tasks[i].name, tasks[i].args,
                                      tasks[i].target, tasks[i].target_host, 'winograd')

But the created task config space length is 1, and no space_map, is the correct?
ConfigSpace(len=1,space_map=)


#2

Yes this is expected.
Currently the schedule of dense doesn’t integrate with AutoTVM (the schedule is written manually)
cc @merrymercy


#3

No plan to support tuning dense op?


#4

If you find that the performance of dense operators is critical to your application, feel free to contribute a schedule template! You can look at the GPU conv2d direct template as an example.