Skip to content

Conversation

@tqchen
Copy link
Member

@tqchen tqchen commented Apr 9, 2023

This PR refactors and enhances DetectIterMap and IterMapSimplify
to enable symbolic shape simplification. Specficially, we add
a routine to combine multiple IterSplitExpr into one if they
come from the same source.

It is helpful to distinguish iterator from normal constants
in the simplification process. IterMapSimplify takes advantage
of these information.

This improvements is helpful to simplify the indices in flattened buffer
when there is symbolic shape involved and normal simplifier.

Also updated FlattenBuffer to take benefit of the enhanced simplifier.
Test cases are added.

@tvm-bot
Copy link
Collaborator

tvm-bot commented Apr 9, 2023

Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from Reviewers by @-ing them in a comment.

Generated by tvm-bot

@tqchen
Copy link
Member Author

tqchen commented Apr 9, 2023

depends on #14538

@tqchen tqchen force-pushed the iter-arith branch 4 times, most recently from eb0dfdf to f422a7c Compare April 9, 2023 18:25
@tqchen tqchen force-pushed the iter-arith branch 4 times, most recently from dcd1ef9 to e767073 Compare April 10, 2023 23:23
@tqchen tqchen changed the title [ARITH] Enhance IterMapSimplify for symbolic [ARITH] Enhance IterMapSimplify for symbolic and Bugfix for floormod(x,2) Apr 10, 2023
@tqchen tqchen changed the title [ARITH] Enhance IterMapSimplify for symbolic and Bugfix for floormod(x,2) [ARITH] Enhance IterMapSimplify for symbolic Apr 10, 2023
Copy link
Member

@junrushao junrushao left a comment

Choose a reason for hiding this comment

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

Very cool. Let's get it in!

@tqchen tqchen force-pushed the iter-arith branch 3 times, most recently from 0c98816 to 385e190 Compare April 11, 2023 20:50
@junrushao
Copy link
Member

This PR should be good to go as #14571 has been merged

tqchen and others added 3 commits April 11, 2023 17:03
This PR refactors and enhances DetectIterMap and IterMapSimplify
to enable symbolic shape simplification. Specifically, we add
a routine to combine multiple IterSplitExpr into one if they
come from the same source.

It is helpful to distinguish iterator from normal constants
in the simplification process. IterMapSimplify takes advantage
of these information.

This improvements is helpful to simplify the indices in flattened buffer
when there is symbolic shape involved and normal simplifier.

Also updated FlattenBuffer to take benefit of the enhanced simplifier.
Test cases are added.
ordering and simplifcations.

Co-authored-by: Junru Shao <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants