You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2022/10/31 10:29:16 UTC
[GitHub] [tvm] ibsidorenko opened a new pull request, #13236: [Relay] Add ClipAndConsecutiveCast and CastClip to SimplifyExpr
ibsidorenko opened a new pull request, #13236:
URL: https://github.com/apache/tvm/pull/13236
This commit adds SimplifyClipAndConsecutiveCast and SimplifyCastClip to SimplifyExpr Relay pass. These simplify sequence clip->cast->cast and cast->clip based on Clip min/max attributes and Cast target data type.
1) SimplifyClipAndConsecutiveCast example:
%0 == [type=int32]
%1 = clip(%0, a_min=0f, a_max=255f) [type=int32]
%2 = cast(%1, dtype="uint8") [type=uint8]
%3 = cast(%2, dtype="int32") [type=int32]
--> Here Clip dtype == Cast2 dtype and max_value("uint8") == 255
min_value("uint8") == 0
Optimized sequence (both casts can be removed):
%1 = clip(%0, a_min=0f, a_max=255f) [type=int32]
2) SimplifyCastClip example:
%1 = cast(%0, dtype="uint8") [type=uint8]
%2 = clip(%1, a_min=0f, a_max=255f) [type=int8]
Optimized sequence (remove Clip):
%1 = cast(%0, dtype="uint8") [type=uint8]
--
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] masahi commented on pull request #13236: [Relay] Add ClipAndConsecutiveCast and CastClip to SimplifyExpr
Posted by GitBox <gi...@apache.org>.
masahi commented on PR #13236:
URL: https://github.com/apache/tvm/pull/13236#issuecomment-1297580699
@tvm-bot rerun
--
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 #13236: [Relay] Add ClipAndConsecutiveCast and CastClip to SimplifyExpr
Posted by GitBox <gi...@apache.org>.
tvm-bot commented on PR #13236:
URL: https://github.com/apache/tvm/pull/13236#issuecomment-1296890304
<!---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-->
* No users to tag found in teams: `relay` <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] masahi commented on pull request #13236: [Relay] Add ClipAndConsecutiveCast and CastClip to SimplifyExpr
Posted by GitBox <gi...@apache.org>.
masahi commented on PR #13236:
URL: https://github.com/apache/tvm/pull/13236#issuecomment-1297823136
@tvm-bot run
--
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] masahi merged pull request #13236: [Relay] Add ClipAndConsecutiveCast and CastClip to SimplifyExpr
Posted by GitBox <gi...@apache.org>.
masahi merged PR #13236:
URL: https://github.com/apache/tvm/pull/13236
--
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