-
Notifications
You must be signed in to change notification settings - Fork 507
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
Update Torch-MLIR Architecture Diagram #1254
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly LGTM, but shouldn't there be an arrow from the MLIR dialects to the backends?
Is the dialect itself actually going to be renamed to the Torch-MLIR dialect, or is this just a clarification for this diagram?
Another minor thing: Isn't it TorchScript instead of Torchscript? (https://pytorch.org/docs/stable/jit.html) And nit: Maybe github.com -> github.com |
I had to show too many arrows for every combo so dropped it. Happy to add it back if we feel like we want it.
I was just trying to make the diagram consistent with the text around it (previous images had it as torch-dialect https://github.com/llvm/torch-mlir/blob/e59a91620a1afd341b7eef9153cc9da35cb8e876/Torch-MLIR.png). I don't think we need to change the code. Will update to TorchScript. and github.com as part of any further feedback. |
2a0f5de
to
d122c5c
Compare
Wait now it says |
Will update again in the next revision :D |
Add MHLO path Add custom accelarator dialects Rename Torch Dialect back to original Torch-MLIR Dialect (Surrounding text still refers to Torch-MLIR dialect) Check in source for Excalidraw(https://excalidraw.com/) so anyone can use / update it using the open source version
d122c5c
to
20e6360
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for doing this!
Should we drop the torch_dispatch
frontend, and bring it in sync with the architecture diagram here.
A few easy-to-fix nits:
- perhaps rename "Torch-MLIR Dialect" with "Torch Dialect"
- s/Torchscript/TorchScript in the box that says "Torchscript/MLIR Converter"
I think we should reconcile both at some point. Maybe @silvasean has that as a more low level diagram ?
We use the eager mode and FX tracing support with
Personally I think Torch-MLIR Dialect is better than just Torch Dialect since we may have other entry points like ONNX (#1255) but open to whatever we want to name / call it. s/Torchscript/TorchScript in the box that says "Torchscript/MLIR Converter" Will do in next update along with any other feedback. |
Ah I should clarify - by "bring it in sync with the architecture diagram here" I meant syncing the # of frontends (three vs two) without including the low level details (e.g. the various simplification passes) which I agree are a better fit for the architecture doc. I didn't see the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for keeping this updated!
My architecture diagram doesn't include the torch_dispatch one because it is not really being invested in and from an architectural perspective it is the same as the TorchScript path. It's not really a "PyTorch" thing it's something we rolled ourselves. I would drop torch_dispatch from the diagram personally -- it's not something users would actually be like "oh, that one". I think the dialect needs to be called "torch" in the diagram. The dialect name is |
I will document two Action Items / discussions here:
It may be worth considering renaming code to torch-mlir dialect especially if we add support for things like ONNX import #1255 Happy to update both based on further discussions. |
@powderluv Can you please call the dialect "torch" dialect? That is the name of the dialect. |
As far as the dialect name, a more likely direction would be to call it |
So should I rename the doc and image to replace what is now called "torch-mlir dialect" to "torch_jit_ir dialect" or just "torch dialect". Either is fine with me. |
The present state is that the dialect is called the |
#1265 to address the two outstanding comments and rolls in @silvasean diagram too |
Add MHLO path
Add custom accelarator dialects
Rename Torch Dialect back to original Torch-MLIR Dialect
(Surrounding text still refers to Torch-MLIR dialect)
Check in source for Excalidraw(https://excalidraw.com/)
so anyone can use / update it using the open source version