You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TVM] Rewrite simplification rule to eliminate unnecessary conditionals. (#4076)
The current bounds checking infrastructure inserts checks like:
```
for (i, 0, bounds[n]) {
if (likely(i < bounds[n]) {
...
}
}
```
into the TVM IR which is currently not removed by simplification infrastructure.
This is a little unclean, as these are trivially true since for a loop var `i`
with a given min and extent, we are guaranteed that `i >= min` and `i < min +
extent`. Thus, we can insert these checks into the IR and use them to eliminate
trivial bounds checks early on.
0 commit comments