-
Notifications
You must be signed in to change notification settings - Fork 5.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Clean fluid] Add inner function _elementwise_op_with_axis #48748
Merged
jiahy0825
merged 18 commits into
PaddlePaddle:develop
from
jiahy0825:clean_fluid_elem_arithmetic_API_divide
Dec 12, 2022
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
3f41133
add inner function _elementwise_op_with_axis
jiahy0825 5191ea6
fix transformer_model
jiahy0825 82caea9
polish API code
jiahy0825 c36c15d
remove elementwise_div/mul api
jiahy0825 1fd1ed4
delete API in __all__
jiahy0825 ee3599c
delete elementwise_mul completely
jiahy0825 e9922be
polish elementwise_mul call
jiahy0825 c48d60c
polish internal api
jiahy0825 d0f9765
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
jiahy0825 c432583
resolve conflict, fix rnn.py
jiahy0825 c92dc9e
use non-inplace call
jiahy0825 9b82b49
delete elementwise_mul api test
jiahy0825 43242f5
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
jiahy0825 a3727d5
delete elementwise_mul api test
jiahy0825 38b72d7
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
jiahy0825 112dfb8
clean elementwise_add/sub
jiahy0825 fdd033b
restore _elementwise_op_in_dygraph in nn.py
jiahy0825 f11a0e0
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle into…
jiahy0825 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里需要使用内部接口的原因是什么?paddle.multiply是否能满足需求?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddle.add/subtract/multiply/divide 这几个 API 没有 axis 参数,然而需要清理的 elementwise.add/sub/mul/div API 有 axis 参数并且在多个地方都使用了这个参数,因此需要封装一个内部接口,专门用来处理带有 axis 参数的四则运算
(注:对于没有用到 axis 参数的 elementwise API,先前已经尽可能用 paddle.add/subtract/multiply/divide 来代替了)
paddle.add/subtract/multiply/divide API doesn't have the parameter
axis
. However, elementwise.add/sub/mul/div API hasaxis
and the corresponding API is called in several places. Therefore, it is necessary to encapsulate an internal interface, which is specially used to deal with arithmetic operations with axis parameters.