-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integration with TCP #17
Comments
I think the thread now is more at: |
Thank you! Looks like I accidentally copy/pasted the wrong link from the design document :) |
Current status: there is a proposal to add TCP to the LLVM Incubator (Discourse post, and there'll be an MLIR open design meeting to discuss the proposed spec next Thursday 9/1 (agenda). Nothing actionable for the StableHLO side just, but we're really looking forward to further progress! |
Great progress on the TCP side which now has a dedicated category on Discourse and an initial draft of the spec which we discussed at an MLIR ODM last Thursday 9/1. It looks like a code repository with the TCP dialect is going to be created very soon, and I'm looking forward to starting working on the conversion once it's there! I've also looked into the logistics of integrating a potential GitHub-first dependency from StableHLO to TCP into the Google-first MLIR-HLO repository. On the technical side, the machinery is fairly straightforward. On the organizational side, this will depend on the eventual license that TCP adopts. |
Exciting news! TCP is being bootstrapped in Torch-MLIR (llvm/torch-mlir#1366), and there's a pull request that introduces the needed boilerplate for the TCP dialect as well as a few ops - As far as conversions between StableHLO and TCP go, the current plan is to wait until the above mentioned pull request lands and then start developing the conversions in Torch-MLIR. Torch-MLIR depends on MLIR-HLO, and StableHLO is shipped as part of MLIR-HLO, so we're already all set dependency-wise. I can't wait! |
Do you mean that initially you will work on this conversion inside the torch-mlir incubator repo? I suppose this cause I don't think we could create a dependency here between this project and torch-mlir repo. |
"Do you mean that initially you will work on this conversion inside the torch-mlir incubator repo?". Yes, that's what I briefly discussed with Raghavan, Sean and Stella a few days ago. Planning to send a PR along those lines once TCP lands. |
llvm/torch-mlir#1375 has just landed in the Torch-MLIR repository, creating a TCP dialect and setting up all the related boilerplate + a |
@navahgar What next steps for TCP do you have in mind? Anything we need to prepare to on the StableHLO side? In the the SIG MLIR Open Design Meeting document, I saw "Broadcasting op & broadcasting semantics in TCP (Raghavan Raman, Cruise)", and I'm looking forward to the ODM :) |
@burmako Our plan is to get to the elementwise ops in TCP first. But that requires broadcasting, which in turn touches several important design points. We are hoping to get through with a decision on broadcasting and elementwise ops soon, preferably in the ODM. |
Here are the corresponding design documents: Broadcast and Elementwise. We've discussed the former at the ODM last Thursday 10/13 and came to an intermediate resolution which will be followed by prototyping. Elementwise proposal still needs to be discussed. |
Is TCP still an active upstream project? As It seems to me not. |
It's very much in active development - we'd shifted focus to internally prototyping some of its important constructs and transformations for use in our deployment flows, and to enable us to provide feedback from that experience publicly. We'll be sharing some of this through additional design documents and code in the near future. |
Ok thanks for the clarification as I saw no more public activities on Github. |
llvm/torch-mlir#1932 introduces the boilerplate for the StableHLO => TCP pass as well as an implementation of converting stablehlo.tanh to tcp.tanh to make sure that all the boilerplate works. Once we're aligned on logistics, I'll implement the rest. |
Is TCP actively maintained? |
Yes. This branch all the code: https://github.com/llvm/torch-mlir/tree/mlir-tcp We have also been posting PRs to the discord channel : https://discord.com/channels/636084430946959380/1020532515720671332 |
* [TCP] Add boilerplate for the -convert-stablehlo-to-tcp pass When TCP was introduced, we discussed that it would be interesting to have a StableHLO => TCP pass that lives alongside TCP in Torch-MLIR. This PR adds the boilerplate for such a pass as well as an implementation of converting stablehlo.tanh to tcp.tanh to make sure that all the boilerplate works. Also tagging openxla/stablehlo#17 to kickstart tracking the work on implementing this converter and keeping it in sync with the evolution of TCP. * Address feedback * Fix Bazel build * Fix CMake build * Run buildifier
TCP dialect is a super exciting initiative in MLIR upstream (previous Discourse thread, current Discourse thread, design document)! Let's contribute to this effort by providing converters to/from TCP, so that TCP work can potentially leverage them to connect with the existing MHLO and, in the future, StableHLO producers (which currently include JAX, PyTorch and TensorFlow).
The text was updated successfully, but these errors were encountered: