-
Notifications
You must be signed in to change notification settings - Fork 14
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
[TTIR][TTNN] MLIR compiler locations #1745
Comments
Design Considerations
What can passes do?
Here is a potential location naming design I was thinking about
Inputs
Outputs
Special Operations
For an example, currently in the compiler, if we had the following sigmoid.mlir ttir module. Each op was generated in ttir and had a location set to it
It's decomposition (with loc data) looks like the following The design proposal would change it to the following |
I added some useful code here In |
You can see the total passes that are run on an mlir file via
All of these are pybinded into |
I'll add some requirements from optimizer and tt-explorer side:
Tho we might be stretching the usage of Locations for this, i'm open to using something different in the long run if it makes sense. |
@tapspatel I've synced offline with @odjuricicTT, we agreed that IDs in location might be a bit of a stretch and that attributes that are added in some pass might be a better place for them. Regarding your proposal, I will just reiterate through it with some implementation details, so we don't miss something before implementation.
This is a 'default' case that we have right now in most (if not all) places. In the case of decomposition, the result of the last op in the chain of new ops should always be the result of a decomposed op, so I believe there isn't ambiguity in this case.
For the second point, we can use built-in
There is built-in
Can you elaborate more on this, I'm not sure I'm getting the point here. Ultimately frontend that lowers to TTIR sets the 'starting' location.
Do we still have to consider them special if we add the aforementioned |
discussed questions with @azecevicTT offline |
Create a hierarchy of MLIR locations during the passes that decompose and convert MLIR operations, enabling tracing back through the graphs for easier debugging.
The text was updated successfully, but these errors were encountered: