-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
adds new CPU kernel for SGD op supporting BF16 data type #32162
adds new CPU kernel for SGD op supporting BF16 data type #32162
Conversation
Thanks for your contribution! |
@wozna @arlesniak @jczaja Could you start review please? |
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.
Everything I mentioned is about PADDLE_ENFORCE
On this site, there is information on how we should write error messages: https://github.com/PaddlePaddle/Paddle/wiki/Paddle-Error-Message-Writing-Specification-(English-Verison)
Please make integration test i.e. test_fit_a_line.py to verify this implementation (it can be done in next PR) |
* Make easier to add new kerne invoke code.
@wozna, @arlesniak Please review again. |
@luotao1
I'm using
To not run tests on platforms which does not support bfloat16 data type.
I'm turning off dygraph mode since we does not support it with bfloat16 yet. |
@luotao1 Could you help with PR-CI-ROCM-Compile? |
@qili93 Could you help see error of PR-CI-ROCM-Compile? |
@arogowie-intel You can see the ROCM build step in https://www.paddlepaddle.org.cn/documentation/docs/zh/develop/guides/rocm_docs/paddle_install_cn.html |
Hi @arogowie-intel to fix the build error or "PR-CI-ROCM-Compile", please change your code as following: PADDLE_ENFORCE(grad_var->IsType<framework::SelectedRows>(),
# ------ change the above code to below ----------
PADDLE_ENFORCE_EQ(grad_var->IsType<framework::SelectedRows>(), true, ROCM defined
|
* Use specialized PADDLE_ENFORCE_xx functions.
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.
LGTM
@luotao1 Could you please start your review? |
@luotao1 I'm waiting for the last CI |
@arogowie-intel You can ignore the CI which is not the required one. |
PR types
New features
PR changes
OPs
Describe
This PR adds new CPU kernel for SGD op supporting BF16 data type.