Skip to content

Conversation

@masahi
Copy link
Member

@masahi masahi commented May 16, 2022

Without this, a sequence of blockize -> transform_layout -> tensorize would likely lead to a tensorize pattern match failure, since there is no simplification done between transform_layout -> tensorize but intrinsic descriptions are always written without taking extra factors like % 16 into account.

Co-authored-by: Yuanjing Shi [email protected]

@vinx13 @shingjan

Copy link

@shingjan shingjan left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for upstreaming this. Kudos to @vinx13 for helping troubleshooting this problem.

@vinx13 vinx13 merged commit a3a4155 into apache:main May 17, 2022
shtinsa pushed a commit to Deelvin/tvm that referenced this pull request May 17, 2022
Co-authored-by: Yuanjing Shi <[email protected]>

Co-authored-by: Yuanjing Shi <[email protected]>
@Lunderberg
Copy link
Contributor

Hmm, this is interesting. The IndexMapNode::MapIndices function already includes a call to simplify, which I would have expected to handle this case. For the test case, it looks like the first simplification didn't have the information that 0 <= vi < 16, and so it couldn't simplify floordiv(vi,16) to 0.

Since we could have similar issues in other cases, I think we could generalize it by allowing MapIndices to take an optional arith::Analyzer* to be used in making the simplifications. I'll see if that is a straightforward change to make.

shingjan pushed a commit to shingjan/tvm that referenced this pull request May 17, 2022
Co-authored-by: Yuanjing Shi <[email protected]>

Co-authored-by: Yuanjing Shi <[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.

4 participants