Skip to content
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

[ARITH] Improve arith simplify to handle symbolic reshape pattern #15081

Merged
merged 1 commit into from
Jun 14, 2023

Conversation

tqchen
Copy link
Member

@tqchen tqchen commented Jun 13, 2023

This PR enhances arith simplify to handle symbolic reshape patterns. Lift the CombineIters to callers of TryFuseIters so they can be used in early return simplifications. Testcases are added.

Also updates a minor spelling issue in the testcase.

This PR enhances arith simplify to handle symbolic reshape patterns.
Lift the CombineIters to callers of TryFuseIters so they can be used
in early return simplifications. Testcases are added.

Also updates a minor spelling issue in the testcase.
@tvm-bot
Copy link
Collaborator

tvm-bot commented Jun 13, 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

@MasterJH5574 MasterJH5574 merged commit 02dc191 into apache:main Jun 14, 2023
Lunderberg added a commit to Lunderberg/tvm that referenced this pull request Jun 20, 2023
This commit resolves a flaky test failure that was introduced in
apache#15081.  The unit test
`tests/python/unittest/test_meta_schedule_schedule_rule_mlt_tc.py::test_padded_matmul_relu`
failed approximately 30% of the time.

The error was due to changes in
`IterMapRewriter::NormalizeToIterWithOffset`.  When attempting a
simplfication with `TryCombineSplitFromSameSource`, if the returned
`Optional<IterSumExpr>` is defined, but the `args.size() < 1` check
fails, then the `expr` argument is still overwritten, and presumably
can cause a later `TryFuseIters(expr)` to fail.

This commit replaces `expr = opt.value();` with `auto combined =
opt.value();`, preserving the original argument.
junrushao pushed a commit to junrushao/tvm that referenced this pull request Jun 22, 2023
…ache#15081)

This PR enhances arith simplify to handle symbolic reshape patterns.
Lift the CombineIters to callers of TryFuseIters so they can be used
in early return simplifications. Testcases are added.

Also updates a minor spelling issue in the testcase.
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