[phi] Migrate update_loss_scaling XPU kernel to PHI.#45515
Closed
jiahy0825 wants to merge 9 commits intoPaddlePaddle:developfrom
Closed
[phi] Migrate update_loss_scaling XPU kernel to PHI.#45515jiahy0825 wants to merge 9 commits intoPaddlePaddle:developfrom
jiahy0825 wants to merge 9 commits intoPaddlePaddle:developfrom
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
850879e to
5b9f827
Compare
… update_loss_scaling, test=kunlun
… update_loss_scaling, test=kunlun
helen88
reviewed
Aug 30, 2022
| reinterpret_cast<XPUTyp*>(out_data), | ||
| num, | ||
| XPUTyp(0.0)); | ||
| PADDLE_ENFORCE_EQ(r, |
Contributor
There was a problem hiding this comment.
PADDLE_ENFORCE_XDNN_SUCCESS 请用这个宏
chenwhql
reviewed
Aug 30, 2022
| #include <string> | ||
| #include <vector> | ||
|
|
||
| #include "paddle/phi/kernels/amp_kernel.h" |
| #include "paddle/phi/backends/xpu/xpu_context.h" | ||
| #include "paddle/phi/common/amp_type_traits.h" | ||
| #include "paddle/phi/common/float16.h" | ||
| #include "paddle/phi/common/scalar.h" |
Contributor
There was a problem hiding this comment.
scalar.h头文件中有了,是不是不需要include了
Contributor
Author
|
|
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
Others
PR changes
Others
Describe
Migrate update_loss_scaling XPU kernel to PHI.