Establish TVM Unity Branch

Dear Community:

I am sending this post as a followup to the TVM unity related development. Specifically, we would like to start a branch development in the tvm community, as a first step of execution.

The main reason of branch development contains two folds. (a) We would like to follow an existing practice enabled by ASF mechanisms and used as existing practices such as Hadoop to enable related development in the tvm community and empower community members who would like to participate. (b) We could give some extra time to develop concrete code examples, tutorials, and community engagement to provide more information to the community members and answering more querstions.

ASF mechanism allows any committer to create a branch in the apache repo and do collaborative development there at their own pace. Per our existing process, merging a branch into main still requires lazy consensus. Branch development offers flexibility while accepting the risk of blocking when merging to the main. As a result, there are general incentives to keep alignment with the majority of the community and continued engagement to get buy-in. Branch development offers a way to collaborate on a possible but not definitive future of the project, as a branch can come with different outcomes such as being partially merged, continued development, or abandoned. Enabling different perspectives is important for us both as a project and community.

TVM PMC re-affirmed that branch development can be used as an option for the project and specific development around tvm unity. We would like to offer it as a possible option for the community and the first step of execution, with the goal of getting related pieces into main. I wrote down a more details below, which we would love to get everyone’s feedback. Of course, this is only one possible option, and community members can freely choose their ways of participation.

Establish TVM Unity Branch

This post proposes the establishment of the branch unity under apache/tvm.

TVM Unity is a technical strategy that brings many of our past lessons and unifies key technical components under a Unified Composable Flow. It brings unified technical solutions to enable a broader set of workloads(such as dynamic shape) and a composable flow that standardizes the way to interact with TVM. The proposal has received a wide range of support from community members from more than eight organizations. There are also well-documented MLC course series that introduce the related concepts.

Many of us in the community believe that it is critical to keep re-inventing and evolve our key technical solutions to adapt to the latest improvements in ML compilation in an agile way while continuing to support our existing set of applications. To empower the community members who would like to develop TVM unity together in the community. We will open up a new branch unity that starts incorporating contributions around TVM unity, including relax IR, unified composable flow, and related vertical developments.

ASF mechanism allows any committer to create a branch in the apache repo and do collaborative development there at their own pace. This post seeks to bring awareness to the community of this collective development effort.

The collectively development effort also helps us to be able to develop concrete examples, tutorials, and series of followup community enagagement to provide more information to the community about possibilities and opportunities in the space, and hopefully answer extra questions from those who are not yet on board with related new modules.

Because the goal of the unity branch is to bring unity development that we can all leverage. The branch will have the following charter:

  • The primary purpose of the branch is to develop TVM unity-related changes and emphasis on agility iteration with quality.
  • We will create specific tags unity on GH issues to indicate the related development.
  • The unity branch will bring changes from main back to the unity to keep things in sync, while sending some of the changes back to main following the standard process. We encourage common changes to the existing component(for example, runtime, metaschedule, TensorIR) to be sent to main.
  • Documentation, discussion, and community engagement happen in the same way as standard development.
  • We encourage continued conversations in the community to facilitate development awareness of the overall unity evolution.
  • Developing non tvm-unity related features is a non-goal in the unity branch, we continue to encourage them to happen in the community per normal development process.

There are several possible outcomes of the unity branch as a consequence of the standard ASF development process:

  • Changes in unity are brought back to apache-tvm/main through the standard process. This is the primary goal that we aim to pursue.
  • The branch development efforts die down.
  • Unity and main evolve into different products or different projects.
  • Releases can be created from both the unity branch for users who would need these features, following the standard ASF release process.

Note that these are common results of the standard ASF development process, and they may not be exclusive to each other. For example, some of the changes can be brought back, and the branch development effort dies down.

The primary intent of the unity branch is to bring the changes back to main and bring TVM to the next stage. This proposal will enable community members who are interested in unity development to participate in unity development collectively. It will also allow us to continue to bring features to the main and continue developments there.

The initial branch will be created by Tianqi Chen as an initial coordination effort and overseen by the TVM PMC. We also invite additional community members to help coordinate the overall development, including developer meetings and will invite more contributors to co-host the related efforts.

15 Likes

Cross linking the relax thread https://github.com/apache/tvm-rfcs/pull/89#issuecomment-1404170556 post as well here

I am more than excited about the branch and would love to do my best to help in all aspects. I’d love to help build examples, answer technical questions and provide my best effort to help in concretized ways to everyone in our community.

3 Likes

Thanks for bringing this proposal forward and further engage the community in this development effort. I fully support the idea of establishing the unity branch for TVM Unity development as it allows for greater flexibility and collaboration among community members. I am willing to help out in the development process and creating more document / tutorials. Let’s work together to make TVM Unity a reality!

3 Likes

Thank you for bringing up this proposal for branch development for TVM Unity. I support the idea of using existing ASF mechanisms and appreciate this effort to empower the community and enable collaborative development of TVM Unity. TVM Unity strategy is an important effort for the community. It unifies key technical components and bring back past lessons. I’m excited to see us taking this step to evolve our key technical solutions to adapt to the latest improvements in ML compilation. I am happy to help with this development and look forward to participating in the collaborative effort. Let’s work together to make this a successful endeavor for the community.

3 Likes

Grad to see this proposal coming out! There are some great efforts in tlcpack and mlc.ai and cannot wait to see those efforts bear fruit in upstream TVM.

2 Likes

Thank you so much for the proposal! As one of the active contributors in the Unity project, I fully support this direction.

Personally, I have a strong belief that TVM Unity would significantly benefit community members who has been struggling with various real problems, such as dynamic shape, pipeline/lowering customization, etc. As Relax offers a very flexible and composable compilation pipeline in modular fashion, it has been great experience for me to quickly evaluate new ideas and develop new optimization passes. I believe this feature would be super useful to improve development speed for developers and PoC turnaround time for researchers.

If you want to learn more about this project or have any questions, I would be happy to discuss so please feel free to contact me.

1 Like

As a community member participating deeply in the development of TensorIR, MetaSchedule, SparseTIR, MLC course series and Relax, I’m more than happy to the unity branch going to be established.

Usually bringing new changes to main branch takes time, as my previous experiences on TensorIR and MetaSchedule upstreaming have revealed. The unity branch enables the opportunities for the community members to have much quicker pace of development, which largely excites me. The charter of bringing changes from/back upon needs will kept the unity branch not deviated from the main branch too far away, which benefits the overall development experiences of us and facilitates the pace as well.

I would be more than happy to help our community, and participate in the development throughout, not only around my focus but in all aspects.

5 Likes

This is a really exciting move! Having a unity branch will help us move faster on TVM unity related development, while still keep a strong connection to the community. I am looking forward to participating in this effort and seeing the unity effort landed in TVM upstream!

3 Likes

As a PMC member, I don’t see any issue of establishing a branch for Unity. People in the open source community intuitively focus on the modules/projects/components they are interested in. In other words, if we don’t have this branch, the Unity developers will still work on Unity on other places (e.g., other repos). In this way, regardless the outcome, it’s hard for rest community members to know where and what the Unity developers are working on. IMHO, to be honest, we should have done that in the beginning of 2022 when the concept of Unity was proposed in TVMCon.

8 Likes

We have seen a big challenge in current AI compilers is that the information loss when lowering. Such as, graph level can not have accurate information from tensor low level op, so that we can not schedule graph ir accurately. Unity is the way to go, and it will be a new powerful tool to think and optimize things. Glad to see this, even just a new branch. Hope to see it in main branch sooner.

I am extremely excited to see the new move and I think that the TVM Unity Branch has the potential to greatly speed up the development of Relax and other TVMScript-based dialects such as Sparse-Relax. One thing to consider is whether pull requests to the unity branch should go through the standard TVM CI process or if we should set up a separate CI for it, given that commits to the unity branch may be more frequent than on the main branch.

1 Like

This is great news, thanks a lot. Could we also create a Relax/Unity category in our discuss page for Unity related questions/discussions?

1 Like

Thanks @sanirudh for the suggestion, there is now a unity sub-category under development

1 Like

That’s great thanks a lot.

Great, hope Relax also can be one TVM branch!

Thanks @gfvvz , relax will be included as part of the unity branch

Great point. We can start with the CI that focuses on unity component and reintroduce other parts if necessary. Since the other changes goes into main, we will be able to levrage the main CI for those cases.

We can bring feedbacks, questions, examples to this forum category

1 Like