-
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
[PHI] Migrate elementwise add, sub and mul kernels #47657
[PHI] Migrate elementwise add, sub and mul kernels #47657
Conversation
你的PR提交成功,感谢你对开源项目的贡献! |
@chenwhql I have a few issues with migrating the elementwise kernels:
Could you please help me solve these problems? |
… elementwise_phi_migration
@YuanRisheng can you help @piotrekobi out? |
For the first point, please provide more detailed error information. For the second point, the only kernel that uses Out tensor is For the third point, It is because the kernel you defined is not equal with the function declaration of |
… elementwise_phi_migration
@YuanRisheng Thanks a lot for your help with the elementwise_div_grad registration! The issues were simple to fix. I'm still getting compilation errors related to .cc tests after adding PD_DECLARE_KERNEL(...) to them. [ 89%] Linking CXX executable tests/test_mkldnn_caching
/usr/bin/ld: CMakeFiles/test_mkldnn_caching.dir/fluid/operators/mkldnn/test_mkldnn_caching.cc.o: in function `__static_initialization_and_destruction_0(int, int) [clone .constprop.994]':
test_mkldnn_caching.cc:(.text.startup+0x83d): undefined reference to `TouchKernelSymbolFor_elementwise_add_OneDNN_ONEDNN()'
/usr/bin/ld: test_mkldnn_caching.cc:(.text.startup+0x847): undefined reference to `TouchKernelSymbolFor_elementwise_mul_OneDNN_ONEDNN()'
collect2: error: ld returned 1 exit status
make[2]: *** [paddle/CMakeFiles/test_mkldnn_caching.dir/build.make:92: paddle/tests/test_mkldnn_caching] Error 1
make[1]: *** [CMakeFiles/Makefile2:7073: paddle/CMakeFiles/test_mkldnn_caching.dir/all] Error 2
make: *** [Makefile:141: all] Error 2 |
@piotrekobi Well, I get it. For elementwise_add, the kernel name registered in PHI is add_raw or add. So, you can modify it like this : |
@YuanRisheng Thanks! Everything seems to be working now. |
… elementwise_phi_migration
… elementwise_phi_migration
… phi_elementwises
… elementwise_phi_migration
… elementwise_phi_migration
很抱歉,经过我们的反复讨论,你的PR暂未达到合入标准,请阅读飞桨原生算子开发规范,你可以重新提交新的PR,我们先将此PR关闭,感谢你的贡献。 |
PR types
Others
PR changes
Others
Describe
Migrates the following oneDNN operator fluid kernels to PHI: