-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TVMC] Add option to dump TIR code to file #14186
Conversation
Currently dumps the TIR code after the final phase of lowering (phase 3 from https://github.com/apache/tvm/blob/665dd413bc85d14f7836324daf7cc0dd9281c85a/gallery/how_to/extend_tvm/low_level_custom_pass.py#L152) before codegen. This is done by running a pass to capture the TIR module as it is not saved during the build. The result is saved to file similar to the other code dumps. Change-Id: I6da7df8f87ba4d91215adc679d926d4f0ca89019
Change-Id: I0d1dc761b66c9f41592992580e2ccc0bad8f4769
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! Thank you 😄
LGTM too. Thanks |
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. Thanks
Thanks @lhutton1, @neildhickey and @echuraev for the commits and the reviews 😄 |
@lhutton1 I really like these changes. Are you going to do a followup for this soon? If not it would be great if we could open up an issue to collect some ideas. I plan to do something similar for the RelayIR dump (allow dumping post/pre-partitioning IR) and would like to follow a similar approach. |
Hi @PhilippvK, thanks for the interest! I'm hoping to have a follow-up soon (~1wk) but I have another commitment I need to work on first. I'll summarise the thoughts I have in a discuss post - it would be good to see if they align to your thoughts/requirements before diving in |
Currently dumps the TIR code after the final phase of lowering (phase 3 from
tvm/gallery/how_to/extend_tvm/low_level_custom_pass.py
Line 152 in 665dd41
In the future it seems good to have more granularity in the IR that is being dumped, e.g. print IR before/after named pass. I thought this might be helpful in the meantime.
cc @ekalda @ashutosh-arm @neildhickey