Arm_cpu auto tuning

Could someone explain, how the auto-tuning is happening? The code here (https://github.com/dmlc/tvm/tree/master/topi/python/topi/arm_cpu) con2d.py show functions for auto-tuning, but what approach have you used. It is very difficult to understand from the code

If you are looking for more general information on autotuning, the AutoTVM paper is a good starting point.

One doubt I have regarding auto-tuning, finally when the auto-tuning is completed let’s say for 1000 trials, a log file will be generated, and after that we build the module

with autotvm.apply_history_best(log_file): print(“Compile…”) with relay.build_config(opt_level=3): graph, lib, params = relay.build_module.build( net, target=target, params=params)

So the graph, lib, params will be created from the log file, which has the optimized code, because the net, target and params are not changed yet, they are the same as extracted from the network?

Only the generated library code will be different after tuning, and the tuning log file only changes the operator implementations for the operators in the library. The only reason net, and params are passed again is that it is convenient to just compile the entire network again.

@eqy, I have the theoretical understanding of how auto-tuning is performed, I read the paper you provided and I guess i understand it, but to make changes in the file (conv2d.py mentioned above) that you guys have written I have to know exactly with an expression what you ought to achieve.

If you wish to learn more about how the schedule is written, you can look at related examples such as https://docs.tvm.ai/tutorials/optimize/opt_gemm.html.

I have gone through that, looks good, but is there any documentation availabile for the code written in topi for arm_cpu, like you just showed me for gemm?

@ziheng is the original author of that schedule, so he is the best person to ask. You can see if there is a copy of the original writeup that he wrote for it available somewhere titled “Efficient Deep Learning Inference on Edge Devices” (or ask him for a copy).

thanks @eqy, I will look forward for @ziheng to reply soon