Skip to content

Ansor Stabilization Todo Items Tracking #6133

@merrymercy

Description

@merrymercy

This issue is used to track all unresolved todo items in Ansor (RFC) during upstream.

Motivation and Plan

Ansor has more than 13K lines of code in our internal codebase.
To upstream the huge code base of Ansor, we divide Ansor into several (10+) small PRs to make the review process easier.

However, addressing every little detail in these small PRs makes the upstream process slow and painful.
The refactor/renaming happens in one PR will affect later PRs and bring extra efforts to the latter PRs because we have to maintain two codebases at the same time. (i.e. tvm master and our internal codebase)

Therefore, the plan is to merge these small PRs quickly and then do a round of polish before the release.
The polish phase will happen after we got most of the code merged. So we do not have to maintain two codebases and only need to do refactor/renaming in a single place.
The polish phase will mainly focus on API design and documentation.

This plan does not mean the quality of the small PRs is low. Actually, all these small PRs are carefully reviewed by multiple people and most of the comments are addressed. The first PR of Ansor got 436 comments, making it one of the most commented PR, if not the most, in the TVM history.

Todo items

  • The design of python/tvm/auto_schedule/auto_scheduler.py::auto_schedule. This is the most important user interface to use the auto-scheduler. We will send an RFC to discuss this.
  • Consolidate the usage of python/tvm/auto_schedule/utils.py::get_const_int, python/tvm/auto_schedule/utils.py::get_const_tuple in the whole TVM code base.
  • Improve the hash of LoopState and TransformStep. Try to implement it with SHashReduce, SEqualReduce
  • Improve the record serialization format. Do not use only a hash key as the workload key. Try to use a relay subgraph as the hash key.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions