-
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
[TensorIR][PASS][M1c] CompactBufferAllocation #7923
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.
LGTM. Just nits.
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
return _ffi_api.ConvertBlocksToOpaque() | ||
|
||
|
||
def CompactBufferAllocation(): |
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.
So,is this pass doing the same job as InferBound?
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.
Yes, the functionality should be similar, except that infer bound needs to walk through the schedule tree, while in this case the split/reorder already updated the index, so the impl should be simpler
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 explaination!
Merged. Thanks! @Hzfengsy @tqchen @comaniac @junrushao1994 @xqdan |
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
Co-authored-by: Tianqi Chen <tqchen@users.noreply.github.com> Co-authored-by: Junru Shao <junrushao1994@gmail.com> Co-authored-by: Cody Yu <comaniac0422@gmail.com>
This PR is part of the TensorIR upstreaming effort (#7527) as one of the M1c stages, introducing the pass
ConvertBlocksToOpaque
andCompactBufferAllocation
Pass
ConvertBlocksToOpaque
will substitute all the block vars with the PrimExprs they are bound to its iter_values and convert blocks into opaque ones.Pass
CompactBufferAllocation
compacts the buffer access region by removing the buffer regions that are not accessed.These two passes both are important passes for converting schedulable TensorIR to low-level tir.
cc @tqchen @junrushao1994 @comaniac @xqdan @jroesch
cc @tqchen @comaniac @jroesch @junrushao1994