MLIR vs. Relay vs. Glow for a beginnner

1,614 views
Skip to first unread message

john Mattew

unread,
Jul 15, 2020, 8:37:25 PM7/15/20
to ml...@tensorflow.org
Hi All,

I am a newcomer to MLIR, and so far my journey to MLIR has been enjoyable (started from toy language and slowing making progress. 

I did not mean to compare MLIR to Relay (TVM) or Glow. I know MLIR has its own strengths (it looks like MLIR is very flexible, and please correct me if I am wrong), and maybe Relay also has its own strengths. 

For someone who is new to these multi-level (or machine learning) compiler world, what we need to know about MLIR vs. Relay vs. Glow? 

I tried to find some high-level information, but I am yet to see a reason to use Relay over MLIR or MLIR over Relay,..etc. I mean I did not see a specific feature or functionality that MLIR does better than Relay/TVM or even glow and vise versa?  I apologize for my lack of knowledge in this area, but since I completed my initial tutorial on MLIR, I'd like to get some perspectives. 

Could you guys please comment from your perspective why one should use MLIR instead of TVM's Relay?  Or should just use TVM instead of MLIR?   I understand this forum is MLIR, and your opinion is (might be) biased, however, it gives newcomers like me some good idea what is going on this ML compiler world. 

Thanks,
John. 


Stella Laurenzo

unread,
Jul 16, 2020, 1:23:17 PM7/16/20
to john Mattew, MLIR
On Wed, Jul 15, 2020 at 5:37 PM john Mattew <johnma...@gmail.com> wrote:
Hi All,

I am a newcomer to MLIR, and so far my journey to MLIR has been enjoyable (started from toy language and slowing making progress. 

That's good to hear - welcome!

This is a really good question and one I've given a lot of thought to recently, especially on the MLIR/TensorFlow/TVM directions (I haven't tracked Glow a lot recently). I'm, frankly, envious of the level of put-togetherness that the TVM team has with respect to compiler-focused APIs, Relay and general, accessible infra for slicing and dicing these problems -- they've done a great job at pulling together a nice, holistic, developer-user focused toolset.

I'm not sure if you are aware, but this list specifically is maintained largely for MLIR-in-TensorFlow discussions and is a remnant of MLIR having been started as a project of TensorFlow. Today, the more general discussions about MLIR specifically take place on the MLIR channel of the LLVM discourse: https://llvm.discourse.group/c/mlir/31  I think this would be a great topic to discuss further there and it might have a more salient audience. 

In my opinion, it is not a foregone conclusion that any of these OSS ecosystem projects like MLIR and TVM need to be competing, and I would love to see a future world where bridges exist, allowing people to more effectively use the tools that are best aligned to help them get their job done without lockin. I don't have any serious short-term ideas to make such a convergence happen, so that is more of a hope and might have some natural synergies, especially given how MLIR tends to evolve bottoms up and TVM has been investing so much top down.




I did not mean to compare MLIR to Relay (TVM) or Glow. I know MLIR has its own strengths (it looks like MLIR is very flexible, and please correct me if I am wrong), and maybe Relay also has its own strengths. 

For someone who is new to these multi-level (or machine learning) compiler world, what we need to know about MLIR vs. Relay vs. Glow? 

I tried to find some high-level information, but I am yet to see a reason to use Relay over MLIR or MLIR over Relay,..etc. I mean I did not see a specific feature or functionality that MLIR does better than Relay/TVM or even glow and vise versa?  I apologize for my lack of knowledge in this area, but since I completed my initial tutorial on MLIR, I'd like to get some perspectives. 

Could you guys please comment from your perspective why one should use MLIR instead of TVM's Relay?  Or should just use TVM instead of MLIR?   I understand this forum is MLIR, and your opinion is (might be) biased, however, it gives newcomers like me some good idea what is going on this ML compiler world. 

Thanks,
John. 


--
You received this message because you are subscribed to the Google Groups "MLIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mlir+uns...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/mlir/CACYt%3Dq1a%2BU4yyvFizA1ewCGeJ2n9ZCmCPimtBAQp5qwcTH8t8g%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages