-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
[TIR] Encode conditional accesses info into block read/write regions #9880
Merged
Hzfengsy
merged 2 commits into
apache:main
from
wrongtest-intellif:encode_conditional_accesses_in_read_write_annotations
Jan 15, 2022
Merged
[TIR] Encode conditional accesses info into block read/write regions #9880
Hzfengsy
merged 2 commits into
apache:main
from
wrongtest-intellif:encode_conditional_accesses_in_read_write_annotations
Jan 15, 2022
Conversation
This file contains 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
wrongtest-intellif
requested review from
areusch,
comaniac,
Hzfengsy,
icemelon,
jroesch,
junrushao,
kparzysz-quic,
masahi,
merrymercy,
tqchen,
vinx13,
yzhliu and
ZihengJiang
as code owners
January 8, 2022 18:28
wrongtest-intellif
force-pushed
the
encode_conditional_accesses_in_read_write_annotations
branch
from
January 8, 2022 18:29
ca62f3b
to
0bc0b2a
Compare
Hzfengsy
approved these changes
Jan 14, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
@@ -413,6 +413,13 @@ def compacted_padding_pattern_func(a: T.handle, c: T.handle) -> None: | |||
B[i, j] = A[i, j] | |||
for i, j in T.grid(20, 20): | |||
with T.block(): | |||
T.reads( | |||
B[ | |||
T.max(i - 2, 0) : T.min(i + -2, 15) + 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be T.min(i - 2, 15)
?
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
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
(i
is 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.