wrongtest opened a new pull request #9880:
URL: https://github.com/apache/tvm/pull/9880
When we analysis block read/write regions, there are constraints on iter
vars not defined within block body. These vars should not be relaxed, but do
affect the actual accessed regions.
```python
for i in range(16):
with T.block():
if i < 8:
# access X[i]
```
Current analysis will ignore the constraint `i < 8` (`i` is free when
analyzing on the block's scope), and get the read region `T.reads([X[i:i+1])`.
This would be an overly relaxed region. If the block nodes are designed to
isolate the inner behaviors, the conditional access info will get lost in the
read/write annotations.
The pr make a trial to keep awareness also on the free iter vars out of
relaxed domain in `BlockReadWriteDetector`. The result region is intersected
with itself relaxed on the domain of free vars. For the case above, it would be
`[i, i+1) ^ [0, 8)`, thus if i >= 8, the read region of X becomes empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]