-
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
[TE] Support schedulable TIR compute definitions in TOPI #11589
Conversation
for loads, stores and both in one pass. Expose an FFI to return the buffer domain access map.
user defined buffers expressed in te.extern ops.
TVMScript defined schedulable TIR primfunc into TE. In this way TOPI compute definitions can be defined via TIR and scheduled using TIR scheduling primitives via meta-scheduler.
Add test that uses TVMScript defined TOPI compute definition for relay meta-schedule execution.
cc @Hzfengsy |
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.
Overall LGTM. Thanks @csullivan for such great contribution!!!
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.
Many thanks @Hzfengsy! PTAL again if/when you have the cycles.
for i in T.serial( | ||
0, | ||
16, | ||
): |
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.
for i in T.serial( | |
0, | |
16, | |
): | |
for i in range(16): |
for i in T.serial( | ||
0, | ||
16, | ||
): |
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.
for i in T.serial( | |
0, | |
16, | |
): | |
for i in range(16): |
for i in T.serial( | ||
0, | ||
16, | ||
): |
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.
for i in T.serial( | |
0, | |
16, | |
): | |
for i in range(16): |
for i in T.serial( | ||
0, | ||
16, | ||
): |
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.
for i in T.serial( | |
0, | |
16, | |
): | |
for i in range(16): |
@Hzfengsy for context, as a rule of thumb, usually we don't use "requested changes" if the comment is not emotional :-) in our case, it's just some syntactic nitpicking, so let's just use "comment" as review type |
Thanks for the reminder of @junrushao1994. And I'm sorry for bringing ambiguity to @csullivan. I will change the |
Thanks @Hzfengsy. I think I prefer |
|
This PR adds
te.extern_primfunc
which provides the interface around TE ExternOp that allows a TVMScript defined schedulable TIR PrimFunc to be inlined into a TE compute graph. The result is that TIR can be used for compute definitions in Relay OpStrategies and, paired with meta-scheduler support in relay as introduced in #10578, these compute definitions can be scheduled and tuned as demonstrated in the attached tests.Prior to this, compute definitions were limited to those definable in TE only. As a consequence of this patch and ongoing improvements to TVMScript meta-programming (#11097), TOPI can be extended to include compute and scheduling functions targeting schedulable TIR uniformly.