tensorflow / community

Stores documents used by the TensorFlow developer community
Apache License 2.0
1.26k stars 576 forks source link

RFC: Establish SIG OpenXLA #419

Closed theadactyl closed 2 years ago

theadactyl commented 2 years ago

RFC: Establish SIG OpenXLA

Status Accepted
RFC # 419
Author(s) Thea Lamkin (thealamkin@google.com), Mehdi Amini (aminim@google.com)
Sponsor Thea Lamkin (thealamkin@google.com)
Updated 2022-07-13

We propose to create SIG OpenXLA to facilitate development of an open, state-of-art ML compiler, built collaboratively with ML hardware & framework developers, using the best of XLA & MLIR.

Objective

OpenXLA will be a community-driven and modular open source compiler. It will enable efficient lowering, optimization and deployment of ML models from most major frameworks to any hardware backend notably CPUs, GPUs, and ML ASICs. This work will be done collaboratively with major ML frameworks and hardware vendors.

SIG OpenXLA will focus on creating the OpenXLA project, including the extraction of XLA from TensorFlow into a standalone project. SIG discussions will facilitate coordination around roadmap, design evolution, and new workflows to be created in OpenXLA.

Goals

bhack commented 2 years ago

It could be nice if the new SIGs like this one could adopt and eventually improve then README.md and CONTIRBUTING.md templates.

tdb-alcorn commented 2 years ago

Excited to see this develop!

sanjoy commented 2 years ago

Super exciting!

Will OpenXLA be under open governance (i.e. similar to the LLVM model)? Or will it be governed under the TensorFlow / Google umbrella?

joker-eph commented 2 years ago

We touched on this in the RFC, see this section: https://github.com/tensorflow/community/blob/master/rfcs/20220713-sig-open-xla.md#collaboration--governance

We aim to evolve toward a model as-open-as-LLVM in terms of governance. It’ll be a gradual process and we want to consult with the members/contributors to help us define a good governance for the project. This will be an important aspect of the SIG.

bhack commented 2 years ago

@sanjoy Other then this, another governance point that was discussed was the related sub-governance of MHLO: https://github.com/llvm/torch-mlir/issues/999#issuecomment-1176669527

burmako commented 2 years ago

As far as MHLO goes, we've been internally working on something called StableHLO - a version of HLO/MHLO that will provide stability guarantees, a specification, a test suite and a reference implementation.

In the near future, StableHLO will be switching to GitHub-first development process - the code will be developed via pull requests, there will be a GitHub-based test suite, GitHub Issues will be used to track the work, and GitHub Discussions / Discord will be used for discussions. We're in the final stages of approvals for all this, and I expect that we'll be able to tell (and show) more shortly.

The overall goal for StableHLO is to create a community to build an amazing portability layer between ML frameworks and ML compilers. HLO/MHLO provide a good foundation, but there are a lot of good ideas beyond that, and I can't wait to start working this all out together.

tanyokwok commented 2 years ago

As far as MHLO goes, we've been internally working on something called StableHLO - a version of HLO/MHLO that will provide stability guarantees, a specification, a test suite and a reference implementation.

In the near future, StableHLO will be switching to GitHub-first development process - the code will be developed via pull requests, there will be a GitHub-based test suite, GitHub Issues will be used to track the work, and GitHub Discussions / Discord will be used for discussions. We're in the final stages of approvals for all this, and I expect that we'll be able to tell (and show) more shortly.

The overall goal for StableHLO is to create a community to build an amazing portability layer between ML frameworks and ML compilers. HLO/MHLO provide a good foundation, but there are a lot of good ideas beyond that, and I can't wait to start working this all out together.

Then what is the relationship between OpenXLA and StableHLO? @burmako @joker-eph @theadactyl

JamesTheZ commented 2 years ago

What about JAX? The XLA part will also be extracted out?

burmako commented 2 years ago

@fortianyou "Then what is the relationship between OpenXLA and StableHLO?". There is a plan for StableHLO to be used as input for XLA, and StableHLO has its roots in HLO which comes from XLA, so I expect that OpenXLA and StableHLO will have a close relationship.

That said, our goal with StableHLO is to build a portability layer between ML frameworks and ML compilers, which means that we will avoid coupling StableHLO with particular compilers, e.g. XLA, so that other compilers could pick it up as well if they are interested.

As we bootstrap StableHLO in the near future, we'll be reviewing which parts of HLO/MHLO can become part of StableHLO right away and which parts are XLA-specific (and should stay internal to XLA or should be generalized before being included in StableHLO).

E.g. should ops like mhlo.fusion be in StableHLO? What about advanced functionality like bounded dynamism - should we make it part of the compiler interface or that should be an implementation detail of XLA? We have done an internal review, so we have some thoughts on all this already, but the whole point of StableHLO is to build a community, so let's discuss together! (Let's just wait until StableHLO is opensourced, which I expect to happen by next week at the latest).

We believe that OpenXLA will be a great forum for these discussions, so we decided that we will be opensourcing StableHLO under OpenXLA's GitHub organization and will be using OpenXLA's Discord server to chat about StableHLO. Hopefully, this answers your question!

penpornk commented 2 years ago

@wchao1115 FYI.

joker-eph commented 2 years ago

Just to follow up, feel free to subscribe to this repo: https://github.com/openxla/community

We're using GitHub discussions right now, see here the announcement for the first public meeting (next Tuesday): https://github.com/openxla/community/discussions/5