Skip to content

Conversation

@MasterJH5574
Copy link
Contributor

This PR fixes an issue of the IterMapRewriter. Prior to this PR, the mutation function of the rewriter class returns the mutation results even when an invalid PrimExpr pattern was detected.

Returning the mutation results when failure is not expected, and in such cases we should "abort" the mutation, and return the input PrimExpr which is not mutated, since insisting on returning the mutation results sometimes it incurs further error on other arith components like simplification.

One unit test is added to ensure the rewriter behaves as expectation.

This PR fixes an issue of the IterMapRewriter. Prior to this PR, the
mutation function of the rewriter class returns the mutation results
even when an invalid PrimExpr pattern was detected.

Returning the mutation results when failure is not expected, and in
such cases we should "abort" the mutation, and return the input
PrimExpr which is not mutated, since insisting on returning the
mutation results sometimes it incurs further error on other arith
components like simplification.

One unit test is added to ensure the rewriter behaves as expectation.
@tqchen tqchen merged commit 1e6e2b3 into apache:main Sep 6, 2023
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.

2 participants