Skip to content

Conversation

@Hzfengsy
Copy link
Member

This PR is part of the TensorIR upstreaming effort (#7527) as one of the M1c stages, introducing the pass ConvertBlocksToOpaque and CompactBufferAllocation

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

Copy link
Contributor

@comaniac comaniac left a 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 <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
return _ffi_api.ConvertBlocksToOpaque()


def CompactBufferAllocation():
Copy link
Contributor

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?

Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for explaination!

@jcf94 jcf94 merged commit dee3133 into apache:main Apr 28, 2021
@jcf94
Copy link
Contributor

jcf94 commented Apr 28, 2021

Merged. Thanks! @Hzfengsy @tqchen @comaniac @junrushao1994 @xqdan

@junrushao junrushao linked an issue Apr 28, 2021 that may be closed by this pull request
29 tasks
echuraev pushed a commit to echuraev/tvm that referenced this pull request Apr 29, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
umangyadav pushed a commit to umangyadav/tvm that referenced this pull request May 5, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
trevor-m pushed a commit to trevor-m/tvm that referenced this pull request May 6, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
trevor-m pushed a commit to neo-ai/tvm that referenced this pull request May 11, 2021
Co-authored-by: Tianqi Chen <[email protected]>
Co-authored-by: Junru Shao <[email protected]>
Co-authored-by: Cody Yu <[email protected]>
@Hzfengsy Hzfengsy deleted the compact branch August 25, 2021 05:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC][Tracking Issue] TensorIR Scheduling

6 participants