[autoTVM][Graph tuner] Running graph tuner without autoTVM

Hi. I am trying to use the graph tuner module on CPU.

Normally, you would run autoTVM, pick the best configuration, then instantiate the graph tuner:

executor = Tuner(graph, input_dict, records, target_op, target)

In many cases, the default schedules already provide good performance. I would like to run the graph tuner without running autoTVM first, i.e. using the default schedules from TopHub. How can I dump the records logfile to achieve this? In other words,

is it possible to run the graph tuner without running autoTVM first?

Thanks in advance. Related topics: https://discuss.tvm.ai/t/autotvm-find-the-default-optimization-configuration-of-the-kernel/6090

Hopefully someone can correct me if I’m wrong, but I believe the tophub logs are downloaded anytime you run relay’s build(…).

So I believe the answer to you question, is just don’t run the autotvm and just go right to building.

with relay.build_config(opt_level=4): graph, lib, params = relay.build_module.build(mod, target=target, params=params)

Currently log files in tophub just store the best schedule for each workload. The idea for graph tuner is to select a schedule from topk(usually 20 - 30) best schedules from a workload so that we can minimize data layout transformation overhead. Thus we want to first do autotuning.

1 Like

I see. So it doesn’t seem to be possible at the moment. Thank you anyway.