Merged
Conversation
db277fd to
6179faf
Compare
8b599d6 to
38964db
Compare
Member
|
@ZihengJiang @eqy please help to review this PR |
tqchen
requested changes
Jun 5, 2019
Member
|
Can we come up with a better name and put in some docs explaining how this pass works in the text format? Tianqi wrote this example to me yesterday: then |
Member
74d4e64 to
6c985db
Compare
Member
Author
|
I have updated this PR. Here are some of the alternative names in my mind: |
Member
|
CanonicalizeCast seems to be a good name, @jroesch what do you think about it |
Member
|
I think we should use |
Member
|
I think it will always be a perf win. |
tqchen
approved these changes
Jun 15, 2019
Member
wweic
pushed a commit
to wweic/tvm
that referenced
this pull request
Jun 26, 2019
wweic
pushed a commit
to neo-ai/tvm
that referenced
this pull request
Jun 27, 2019
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.
In the case that upcast is multi-refed like:
if we fuse
cast(i32)to the previous op, the sub-function after fusion will have 32-bit output, instead of 8-bit output, which has larger memory access overhead.In such case, it is better to create a copy of
cast(i32):Previously we did special handling in CSE to ignore some common expressions in order to make quantization efficient.
This trick is too fragile for example the recent pr #3233 broke it.
This pass makes it easier as we can transform any expressions into such form that has more efficient fusion result.
cc @tqchen @ZihengJiang @eqy
also feel free to give a better name for this pass