Now that we have autoTVM, Why we need topi?

I am a newer to tvm. From my point, topi is a bridge between Relay IR and tir. A repository of operator implementations, describing what to compute(compute) and how to compute (schedule). The FTVMSTrategy mechanism allows relay operator to be mapped to highest scored implementation.

AutoTVM can use compute and schedule collect real tuning time of operator, and then use the best result to lower relay ir to tir. Similar to topi.

Now that we have had autoTVM, why we need topi?

Thanks in advance.

1 Like

AutoTVM is a template base tuner, meaning that it optimizes the human written templates, which are exactly TOPI schedules.

In short, AutoTVM tunes schedule templates in TOPI, so AutoTVM can do nothing without TOPI.

What you expected should be the auto_schduler which is in experimental stage now. auto_scheduler generates schedules directly from the compute, which means we won’t need TOPI anymore in the future (ideally), but we still need to take a while to make auto_scheduler fully functional and stable enough to replace AutoTVM and TOPI.

1 Like

Thanks, I have another question, please give me some advice.

when I trace the auto tuning process, I find that the process seem to traverse the search space and pick the best result.

where does the process of machine learning embodied?

I guess you’ve used RandomTuner or GridTuner, which traverses the whole search space randomly or in sequence.

As for the ML part of the AutoTVM, it means to use the XGBTuner in the current code base. With which, AutoTVM extracts features from a given schedule and uses a XGBoost model to predict its performance, then relies on the simulated annealing to pick a better config from the search space.

Check the AutoTVM paper or the related code in TVM repo for more details.

1 Like

Thanks for you relay. I am indeeded used the RandomTuner.