-
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
Added elementwise_sub_mkldnn operator #35662
Added elementwise_sub_mkldnn operator #35662
Conversation
✅ This PR's description meets the template requirements! |
Thanks for your contribution! |
@piotrekobiIntel Hi, this PR failed on this CI test
Do you know how to run unit test locally? Just do |
def init_input_output(self): | ||
self.x = np.random.rand(2, 3, 4).astype(self.dtype) | ||
self.y = np.random.rand(1, 1).astype(self.dtype) | ||
self.out = self.x - self.y | ||
|
||
|
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.
@OpTestTool.skip_if(True, "Grad not yet implemented") |
You have disabled the upper test, now CI fails on that one having no FP16 kernel
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.
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.
Most of the elementwise_sub tests will be removed anyway, because they were copied from elementwise_add and it turned out that most are just not supported. Right now I'm working on making sure that grad tests work with the mkldnn implementation, because there were disabled until now.
I ran the unit tests locally before pushing and they passed, they only failed in the CI for some reason. Most of the elementwise_sub tests will be removed though, after I'm done implementing mkldnn grad support. |
@piotrekobiIntel some machines are testing CUDA implementation and maybe that is causing problem? For example when CUDA is running, bfloat16 tests must be disabled, maybe float16 must be disabled as well? |
287d5e8
to
b4d7c9e
Compare
This reverts commit fc3b122.
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.
Thank you for contribution
paddle/fluid/operators/elementwise/mkldnn/elementwise_sub_mkldnn_op.cc
Outdated
Show resolved
Hide resolved
paddle/fluid/operators/elementwise/mkldnn/elementwise_sub_mkldnn_op.cc
Outdated
Show resolved
Hide resolved
* Add elementwise_sub_mkldnn_op without grad * Add test to static_mode_white_list * Refactor code, change license years * Remove invalid grad implementation * Fix element_wise_sub_op test * Fix CI Approval error * Remove unnecessary EltwiseSubMKLDNNGradKernel class * Fix CI Approval 2 * Fix CI Approval 3 * Fix CI Approval Attempt #4 * Fix CI Approve Attempt #5 * Fix CI Approval Attempt #6 * Fix CI Approval Attemt #7 * Change test names containing add to sub * Fix old tests testing add instead of sub * Copy grad implementation from elementwise_add_mkldnn * CI test fix attempt * Revert "CI test fix attempt" This reverts commit c647cacf41e6a87c715385a185de5cbf65fc8900. * Fix CI attempt 2 * Fix elementwise_sub tests, temporary mkldnn broadcast test disable * Add working implementation of elementwise_sub grad * Fix build errors caused by pull * Fix format error * Fix format error 2 * Disable elementwise_sub_mkldnn test on GPU * Apply fix for paddle.fluid import * Revert changes of test_elementwise_sub and Fix mkldnn test * Revert "Apply fix for paddle.fluid import" This reverts commit fc3b122. * fix bug of module 'paddle' has no attribute 'fluid' for python3.6 (PaddlePaddle#35862) * Add changes suggested by reviewers * Change @unittest.skipIf... to @OpTestTool.skip_if_not_cpu_bf16() to satisfy Approval CI * Remove check_dygraph=False to satisify CI Approval Co-authored-by: zhangbo9674 <82555433+zhangbo9674@users.noreply.github.com>
PR types
Function optimization
PR changes
OPs
Describe
Added elementwise_sub_mkldnn operator.