You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "kfeng123 (via GitHub)" <gi...@apache.org> on 2023/07/19 20:01:56 UTC

[GitHub] [tvm] kfeng123 opened a new pull request, #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

kfeng123 opened a new pull request, #15362:
URL: https://github.com/apache/tvm/pull/15362

   This PR improves SimplifyClipAndConsecutiveCast pass in several aspects.
   First, it allows that the dtype of `clip` and the dtype of the last `cast` differ.
   Second, it allows that there are arbitrary number of `cast` after `clip`. This is achieved via the recursion of patterns.
   Both of the above two cases araise from the compilation of a prequantized model.
   
   See the [pre-RFC](https://discuss.tvm.apache.org/t/on-the-applications-of-the-composition-of-dataflow-patterns/15344?u=kfeng123)


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kfeng123 commented on pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "kfeng123 (via GitHub)" <gi...@apache.org>.
kfeng123 commented on PR #15362:
URL: https://github.com/apache/tvm/pull/15362#issuecomment-1643236879

   Perhaps the failure of test is due to the optimization of this PR: this PR may reduce the memory the model requires.
   I file a [issue](https://github.com/apache/tvm/issues/15365).
   Hopefully, some experts of usmp may help to verify this issue.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] tvm-bot commented on pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "tvm-bot (via GitHub)" <gi...@apache.org>.
tvm-bot commented on PR #15362:
URL: https://github.com/apache/tvm/pull/15362#issuecomment-1642679134

   <!---bot-comment-->
   
   Thanks for contributing to TVM! Please refer to the contributing guidelines https://tvm.apache.org/docs/contribute/ for useful information and tips. Please request code reviews from [Reviewers](https://github.com/apache/incubator-tvm/blob/master/CONTRIBUTORS.md#reviewers) by @-ing them in a comment.
   
   <!--bot-comment-ccs-start-->
    * cc @shingjan <sub>See [#10317](https://github.com/apache/tvm/issues/10317) for details</sub><!--bot-comment-ccs-end-->
   
   <sub>Generated by [tvm-bot](https://github.com/apache/tvm/blob/main/ci/README.md#github-actions)</sub>


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kfeng123 commented on pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "kfeng123 (via GitHub)" <gi...@apache.org>.
kfeng123 commented on PR #15362:
URL: https://github.com/apache/tvm/pull/15362#issuecomment-1643417991

   > Perhaps the failure of test is due to the optimization of this PR: this PR may reduce the memory the model requires. I file a [issue](https://github.com/apache/tvm/issues/15365). Hopefully, some experts of usmp may help to verify this issue.
   
   For now I just modify the ground truth of the test case to pass tests. Not sure if this is correct. Correct me if the original ground truth is indeed correct.


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Hzfengsy commented on a diff in pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy commented on code in PR #15362:
URL: https://github.com/apache/tvm/pull/15362#discussion_r1270734042


##########
src/relay/transforms/simplify_expr.cc:
##########
@@ -160,7 +160,7 @@ class SimplifyConsecutiveCast : public DFPatternRewrite {
   DFPattern cast1_;
 };
 
-bool CheckDataTypeMaxMinValue(DataType dtype, double min_value, double max_value) {
+bool CheckDataTypeMaxMinValue(DataType dtype, double min_value, double max_value, int mode = 0) {

Review Comment:
   Please comment the meaning of different `mode`



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] Hzfengsy merged pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "Hzfengsy (via GitHub)" <gi...@apache.org>.
Hzfengsy merged PR #15362:
URL: https://github.com/apache/tvm/pull/15362


-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [tvm] kfeng123 commented on a diff in pull request #15362: [Relay] improve SimplifyClipAndConsecutiveCast pass

Posted by "kfeng123 (via GitHub)" <gi...@apache.org>.
kfeng123 commented on code in PR #15362:
URL: https://github.com/apache/tvm/pull/15362#discussion_r1271237308


##########
src/relay/transforms/simplify_expr.cc:
##########
@@ -160,7 +160,7 @@ class SimplifyConsecutiveCast : public DFPatternRewrite {
   DFPattern cast1_;
 };
 
-bool CheckDataTypeMaxMinValue(DataType dtype, double min_value, double max_value) {
+bool CheckDataTypeMaxMinValue(DataType dtype, double min_value, double max_value, int mode = 0) {

Review Comment:
   Done



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org