Commit 8bfe3bb
authored
[Arith] Updated arith::DetectIterMap to keep extent=1 components (#10980)
* [Arith] Updated arith::DetectIterMap to keep extent=1 components
Previously, arith::DetectIterMap simplified the output expression by
replacing iteration variables with extent==1 with their value. This
prevented the return value from being used in
arith::InverseAffineIterMap to solve for the variable, as it no longer
existed in the returned expressions.
This commit changes arith::DetectIterMap to keep the iteration
variable even if extent==1, and adds a motivating unit test that
requires this updated behavior.
* Updated to retain default behavior of DetectIterMap
To avoid breaking existing test cases, updated to maintain the same
default behavior, but a flag to maintain trivial iterators in the
result.
* Updated FFI and Python API for DetectIterMap1 parent f238900 commit 8bfe3bb
File tree
5 files changed
+60
-10
lines changed- include/tvm/arith
- python/tvm/arith
- src
- arith
- tir/ir
- tests/python/unittest
5 files changed
+60
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
279 | 281 | | |
280 | 282 | | |
281 | 283 | | |
282 | 284 | | |
283 | 285 | | |
284 | 286 | | |
285 | | - | |
| 287 | + | |
286 | 288 | | |
287 | 289 | | |
288 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
91 | | - | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
| |||
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
108 | 118 | | |
109 | 119 | | |
110 | 120 | | |
111 | 121 | | |
112 | 122 | | |
| 123 | + | |
113 | 124 | | |
114 | | - | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
115 | 128 | | |
116 | 129 | | |
117 | 130 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
173 | 173 | | |
174 | 174 | | |
175 | 175 | | |
176 | | - | |
| 176 | + | |
| 177 | + | |
177 | 178 | | |
178 | 179 | | |
179 | 180 | | |
180 | 181 | | |
181 | | - | |
| 182 | + | |
182 | 183 | | |
183 | 184 | | |
184 | 185 | | |
| |||
892 | 893 | | |
893 | 894 | | |
894 | 895 | | |
895 | | - | |
| 896 | + | |
896 | 897 | | |
897 | 898 | | |
898 | 899 | | |
| |||
914 | 915 | | |
915 | 916 | | |
916 | 917 | | |
917 | | - | |
| 918 | + | |
918 | 919 | | |
919 | 920 | | |
920 | 921 | | |
| |||
942 | 943 | | |
943 | 944 | | |
944 | 945 | | |
945 | | - | |
| 946 | + | |
| 947 | + | |
946 | 948 | | |
947 | | - | |
| 949 | + | |
| 950 | + | |
948 | 951 | | |
949 | 952 | | |
950 | 953 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
80 | 82 | | |
81 | 83 | | |
82 | 84 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
545 | 545 | | |
546 | 546 | | |
547 | 547 | | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
548 | 578 | | |
549 | 579 | | |
0 commit comments