Skip to content

Conversation

@hwangdeyu
Copy link
Contributor

@hwangdeyu hwangdeyu commented Jul 18, 2022

Replace cast + mul(value 0) + cast to shape + ConstantShape(value 0) when opset >= 9 ConstantShape, which can get a better inference performance.

fixes #1997

Signed-off-by: Deyu Huang <deyhuang@microsoft.com> Co-authored-by: Guenther Schmuelling <guschmue@microsoft.com>
@hwangdeyu hwangdeyu added the enhancement New feature or request label Jul 18, 2022
@lgtm-com
Copy link

lgtm-com bot commented Jul 18, 2022

This pull request introduces 2 alerts when merging f87b98b into e896723 - view on LGTM.com

new alerts:

  • 2 for Unused local variable
@hwangdeyu hwangdeyu marked this pull request as draft July 18, 2022 16:52
@hwangdeyu hwangdeyu marked this pull request as ready for review July 19, 2022 09:36
@hwangdeyu hwangdeyu requested a review from guschmue July 19, 2022 09:39
@hwangdeyu hwangdeyu changed the title Improve ZerosLike implementation for opset >= 9 Improve ZerosLike implementation and optimize for opset >= 9 Jul 19, 2022
@hwangdeyu hwangdeyu force-pushed the optimize_zero_like_mul branch from 5cc8045 to 7df65e0 Compare July 19, 2022 10:09
Signed-off-by: Deyu Huang <deyhuang@microsoft.com>
@hwangdeyu hwangdeyu force-pushed the optimize_zero_like_mul branch from 7df65e0 to 0e50360 Compare July 19, 2022 13:37
@onnx onnx deleted a comment from lgtm-com bot Jul 19, 2022
hwangdeyu and others added 2 commits July 24, 2022 16:16
Signed-off-by: Deyu Huang <deyhuang@microsoft.com>
Copy link
Collaborator

@fatcat-z fatcat-z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

@hwangdeyu hwangdeyu merged commit d72b4d1 into onnx:main Jul 27, 2022
@hwangdeyu hwangdeyu deleted the optimize_zero_like_mul branch July 27, 2022 23:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

2 participants