use IndexList to improve performance of dot op#25133
Closed
zhangting2020 wants to merge 1 commit intoPaddlePaddle:developfrom
Closed
use IndexList to improve performance of dot op#25133zhangting2020 wants to merge 1 commit intoPaddlePaddle:developfrom
zhangting2020 wants to merge 1 commit intoPaddlePaddle:developfrom
Conversation
|
Thanks for your contribution! |
Xreki
reviewed
Jun 19, 2020
| #else | ||
| Eigen::IndexList<Eigen::type2index<1>> axis; | ||
| #endif | ||
| out.device(dev) = (x * y).sum(axis); |
Contributor
There was a problem hiding this comment.
这个功能,是不是可以在eigen.h里面封装一个公用的函数啊,我看#25132 中也有类似的逻辑。
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR types
Performance optimizationPR changes
OPsDescribe
Using IndexList instead of arrays of indices can speed up CPU and GPU performance. This PR use it to improve performance of dot op. For more information, please refer to #25132
performace
GPU: v100, cuda10
由于修改错误,以上数据存在问题,实际没有提升,此PR暂时关闭