[TIR] Encode conditional accesses info into block read/write regions#9880
Merged
Hzfengsy merged 2 commits intoJan 15, 2022
Conversation
ca62f3b to
0bc0b2a
Compare
Member
Hzfengsy
approved these changes
Jan 14, 2022
| with T.block(): | ||
| T.reads( | ||
| B[ | ||
| T.max(i - 2, 0) : T.min(i + -2, 15) + 1, |
This was referenced Jan 18, 2022
crazydemo
pushed a commit
to crazydemo/tvm
that referenced
this pull request
Jan 27, 2022
…pache#9880) * encode conditional accesses info into block read/write regions * compare ir after simplify
wrongtest-intellif
added a commit
to wrongtest-intellif/incubator-tvm
that referenced
this pull request
Jan 30, 2022
wrongtest-intellif
added a commit
to wrongtest-intellif/incubator-tvm
that referenced
this pull request
Feb 8, 2022
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
…pache#9880) * encode conditional accesses info into block read/write regions * compare ir after simplify
ylc
pushed a commit
to ylc/tvm
that referenced
this pull request
Feb 16, 2022
…and support floordiv pattern (apache#9527) * allow generate block predicate in compute_at schedule * revert apache#9880 and add more testcases
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Current analysis will ignore the constraint
i < 8(iis free when analyzing on the block's scope), and get the read regionT.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.