Skip to content

Conversation

@pangyoki
Copy link
Contributor

@pangyoki pangyoki commented Jun 30, 2021

PR types

Performance optimization

PR changes

OPs

Describe

In the original implementation of gelu grad op, GELU NPU OP is used to calculate an intermediate variable named out. However, we found that this variable was not actually used. In order to improve performance, the useless GELU operation was deleted.

  • unittest result

图片

图片

  • timeline of gelu grad op
    Before:
    图片
    After:
    图片

  • model performance
    29491 tokens/s -> 30101 tokens/s, about 2.1% performance improvement.

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

@pangyoki pangyoki changed the title [NPU] delete useless GELU in gelu npu op [NPU] delete useless GELU in gelu grad npu op Jun 30, 2021
Copy link
Contributor

@zhiqiu zhiqiu left a comment

Choose a reason for hiding this comment

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

LGTM

@phlrain phlrain self-requested a review July 2, 2021 13:51
@pangyoki pangyoki merged commit 4d16724 into PaddlePaddle:develop Jul 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants