# Motivation

The current autotvm requires pre-defined schedule templates. This makes autotvm 
only semi-automated: the search is automated, but the search space has to be 
manually defined by developers using the schedule templates. This approach has 
several drawbacks:

1. The templates are hard to write. It takes a great number of engineering 
efforts to develop these templates.
2. The number of required templates is large and continues to grow as new 
operators come.
3. The templates are far from optimal. There is still huge opportunity for 
performance improvements by enlarging the search space in templates, but 
manually enumerating these optimizations choices is prohibitive.

# Our solution
We implemented **Ansor**, a new framework to replace the existing autotvm. 
Ansor has several key advantages:
1. Ansor automatically generates a much larger search space from compute 
declaration only
2. Ansor searches more efficiently than AutoTVM by utilizing improved cost 
model, evolutionary search and task scheduler

We have got good results on a variety of deep learning models (ResNet, 
MobileNet, 3D-ResNet, DCGAN, BERT) and hardware platforms (Intel CPU, NVIDIA 
GPU, ARM CPU).  Ansor outperforms autotvm on all benchmarks with significant 
speedup.
Please see our [tech report](https://arxiv.org/abs/2006.06762) for more details.


In terms of implementations, there are several major components of Ansor:
1. A new lightweight loop structure IR for search
2. The search policy and new cost model
3. Relay integration

They are mainly implemented in C++ with around 10K lines of code. We plan to 
gradually upstream them for ease of review.

# Integration Process
We will upstream our code with several pull requests and then deprecate 
autotvm. The steps are:

- Upstream the lightweight loop structure IR for search
- Upstream search policy and tutorial for auto-scheduling an operator or a 
subgraph
- Upstream relay integration  and tutorials for auto-scheduling a network
- Design customization APIs to support customized search space
- Deprecate autotvm

Our code is almost ready and we will send the first PR in the next week.


This is joint work with @jcf94 @MinminSun @FrozenGene @comaniac @yangjunpro 
@yidawang  
Any feedback on the design, tech report, and integration is welcomed.





---
[Visit 
Topic](https://discuss.tvm.ai/t/rfc-ansor-an-auto-scheduler-for-tvm-autotvm-v2-0/7005/1)
 to respond.

You are receiving this because you enabled mailing list mode.

To unsubscribe from these emails, [click 
here](https://discuss.tvm.ai/email/unsubscribe/1d8a68c6fb43e20488127c9e44374e1a92510ee737a62d8c081f8a0bcc78f990).

Reply via email to