-
Notifications
You must be signed in to change notification settings - Fork 3.8k
[TensorIR][M2a] Fuse, Split #8467
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
Changes from all commits
375c8b1
36527c1
0bd76fb
9673c00
8b4bee8
ce0bd7a
cf9a729
a097b88
76e7443
87c98e2
ac7afc7
5d45b90
c6167ca
09c6a41
c603478
5e442f9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -799,6 +799,8 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const FloorDivNode* op) { | |
| TVM_TRY_REWRITE_IF(floordiv(x + c1, c2), floordiv(x, c2) + floordiv(c1, c2), | ||
| c2.Eval()->value > 0 && c1.Eval()->value % c2.Eval()->value == 0); | ||
|
|
||
| TVM_TRY_REWRITE_IF(floordiv(x * c1, x * c2), floordiv(c1, c2), c2.Eval()->value > 0); | ||
|
|
||
| TVM_TRY_REWRITE_IF(floordiv(x + y, x), floordiv(y, x) + 1, CanProveGreaterEqual(x.Eval(), 0)); | ||
|
|
||
| TVM_TRY_REWRITE_IF(floordiv(y + x, x), floordiv(y, x) + 1, CanProveGreaterEqual(x.Eval(), 0)); | ||
|
|
@@ -882,6 +884,8 @@ PrimExpr RewriteSimplifier::Impl::VisitExpr_(const FloorModNode* op) { | |
| TVM_TRY_REWRITE_IF(floormod(x + y * c1, c2), floormod(x, c2), | ||
| c2.Eval()->value > 0 && c1.Eval()->value % c2.Eval()->value == 0); | ||
|
|
||
| TVM_TRY_REWRITE_IF(floormod(x * c1, x * c2), x * floormod(c1, c2), c2.Eval()->value != 0); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please send this as separate PR with regression testcases.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These lines are added to support symbolic split/fuse in some simple cases, but it still can't handle situations where there are 2 or more symbolic vars. Do you think we should support this simple situation for now by merging it in a new PR or we put it aside and support the complete symbolic usage after we improve symbolic divisible check in iter_affine_map?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @tqchen @junrushao1994 what's your opinion on this? |
||
|
|
||
| TVM_TRY_REWRITE(floormod(x * y, y), ZeroWithTypeLike(x)); | ||
| TVM_TRY_REWRITE(floormod(y * x, y), ZeroWithTypeLike(y)); | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.