Paddle
Paddle copied to clipboard
Migrate oneDNN operators to under PHI
需求描述 Feature Description
design doc: https://github.com/PaddlePaddle/docs/blob/develop/docs/design/phi/design_en.md
with Op name (op_type) as the unit, MKLDNN currently has a total of 100 OpKernels, which we divide into three categories:
- Migrate first: a total of 53 (42 to be migrated, 11 have been migrated by YuanRisheng). The parameters required by this type of Kernel are consistent with the CPU&GPU Kernel. Currently, the migration is non-blocking. In order to verify the mechanism, we have migrated 11 of them;
- Migrate later: 23 in total. This kind of Kernel has the problem of Extra parameters in OpMaker that we mentioned before. It requires more parameters than CPU&GPU Kernel, so this part of Kernel is recommended to be migrated after we complete the extra parameter cleaning. The specific time will be tell you later (expectedly in mid to late September);
- No need to migrate: 24 in total. This type of Kernel mainly includes two types of operators, one is the historical operators that have been abandoned, such as reshape, flatten, etc, these abandoned operators will be gradually removed from the framework, so they will no need to be migrated; the other is framework function related operators. For example, related to fusion or quantize, such operators may not be migrated to PHI in the future, and may continue to be maintained in the main framework.
替代实现 Alternatives
No response
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看官网API文档、常见问题、历史Issue、AI社区来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API,FAQ,Github Issue and AI community to get the answer.Have a nice day!
@chenwhql @jiangjiajun @jczaja @wozna
Merged
- [x]
abs,abs_grad,relu6https://github.com/PaddlePaddle/Paddle/pull/45397 - [x]
gaussian_randomhttps://github.com/PaddlePaddle/Paddle/pull/45481 - [x] Moving
fluid/mkldnn_reuse.htophi/onednn_reuse.hhttps://github.com/PaddlePaddle/Paddle/pull/45626 - [x]
scalehttps://github.com/PaddlePaddle/Paddle/pull/45537 - [x]
reduce_sum,reduce_sum_grad,reduce_mean,reduce_mean_grad,reduce_min,reduce_maxhttps://github.com/PaddlePaddle/Paddle/pull/45536 - [x]
cast,clip,clip_gradhttps://github.com/PaddlePaddle/Paddle/pull/45775 - [x]
shapehttps://github.com/PaddlePaddle/Paddle/pull/46051 - [x]
softmax_gradhttps://github.com/PaddlePaddle/Paddle/pull/46257 - [x]
slice,slice_grad,split,pad2d,pad3dhttps://github.com/PaddlePaddle/Paddle/pull/46101 - [x]
concat,concat_grad,expand_v2,expand_v2_grad,fill_constant,nearest_interp_v2,bilinear_interp_v2https://github.com/PaddlePaddle/Paddle/pull/45863 - [x] revert
pool2d,pool2d_gradhttps://github.com/PaddlePaddle/Paddle/pull/45989 - [x]
gelu,gelu_gradhttps://github.com/PaddlePaddle/Paddle/pull/45596 - [x]
sgd,stackhttps://github.com/PaddlePaddle/Paddle/pull/46374 - [x]
sumhttps://github.com/PaddlePaddle/Paddle/pull/46239 - [x]
relu6_gradhttps://github.com/PaddlePaddle/Paddle/pull/46501 - [x]
hard_swish_gradunit test https://github.com/PaddlePaddle/Paddle/pull/46621 - [x] fix accuracy drop in
gaussian_randomhttps://github.com/PaddlePaddle/Paddle/pull/46747 - [x]
transpose2_gradhttps://github.com/PaddlePaddle/Paddle/pull/46139
Cherry-picks to release/2.4 branch
- [x]
shapehttps://github.com/PaddlePaddle/Paddle/pull/46724 - [x]
softmax_gradhttps://github.com/PaddlePaddle/Paddle/pull/46725 - [x]
slice,slice_grad,split,pad2d,pad3dhttps://github.com/PaddlePaddle/Paddle/pull/46726 - [x]
concat,concat_grad,expand_v2,expand_v2_grad,fill_constant,nearest_interp_v2,bilinear_interp_v2https://github.com/PaddlePaddle/Paddle/pull/46727 - [x] revert
pool2d,pool2d_gradhttps://github.com/PaddlePaddle/Paddle/pull/46860 - [x]
gelu,gelu_gradhttps://github.com/PaddlePaddle/Paddle/pull/46862 - [x]
sgd,stackhttps://github.com/PaddlePaddle/Paddle/pull/46729 - [x]
sumhttps://github.com/PaddlePaddle/Paddle/pull/46730 - [x]
relu6_gradhttps://github.com/PaddlePaddle/Paddle/pull/46862 - [x]
hard_swish_gradunit test https://github.com/PaddlePaddle/Paddle/pull/46857 - [x] fix accuracy drop in
gaussian_randomhttps://github.com/PaddlePaddle/Paddle/pull/46858 - [x]
transpose2_gradhttps://github.com/PaddlePaddle/Paddle/pull/46873
@Silv3S @piotrekobi Our kernel migration work will be released in Paddle v2.4, and the release/2.4 branch bas been created at 9.9, so the PRs merged into develop after 9.9 need to be cherry-pick to release/2.4, remind attention it, thanks.
https://github.com/PaddlePaddle/Paddle/tree/release/2.4
Part II
Merged
- [x]
conv2d,conv2d_gradhttps://github.com/PaddlePaddle/Paddle/pull/46342 - [x]
softmaxhttps://github.com/PaddlePaddle/Paddle/pull/47339 - [x]
softplushttps://github.com/PaddlePaddle/Paddle/pull/47406 - [x]
pool2d,pool2d_gradhttps://github.com/PaddlePaddle/Paddle/pull/47423 - [x]
depthwise_conv2d,conv3dhttps://github.com/PaddlePaddle/Paddle/pull/47658 - [x]
depthwise_conv2d_grad,conv3d_gradhttps://github.com/PaddlePaddle/Paddle/pull/47686 - [x]
batch_normhttps://github.com/PaddlePaddle/Paddle/pull/47652 - [x]
prelu,prelu_gradhttps://github.com/PaddlePaddle/Paddle/pull/47422 - [x] Remove redundant FLUID files https://github.com/PaddlePaddle/Paddle/pull/47779
- [x]
conv2d_transposehttps://github.com/PaddlePaddle/Paddle/pull/48119 - [x]
matmul_v2_gradhttps://github.com/PaddlePaddle/Paddle/pull/48023 - [x]
mul_gradhttps://github.com/PaddlePaddle/Paddle/pull/48061 - [x]
elementwise_add_grad,elementwise_sub_grad,elementwise_mul_grad,elementwise_div_grad,elementwise_divhttps://github.com/PaddlePaddle/Paddle/pull/48210 - [x]
batch_norm_gradhttps://github.com/PaddlePaddle/Paddle/pull/48288 - [x] Remove redundant FLUID files https://github.com/PaddlePaddle/Paddle/pull/48352
- [x]
matmul_v2https://github.com/PaddlePaddle/Paddle/pull/48162 - [x]
transpose2https://github.com/PaddlePaddle/Paddle/pull/47748 - [x]
elementwise_subhttps://github.com/PaddlePaddle/Paddle/pull/48611 - [x]
mulhttps://github.com/PaddlePaddle/Paddle/pull/48299 - [x]
elementwise_add,elementwise_mulhttps://github.com/PaddlePaddle/Paddle/pull/48625 - [x]
squeeze2,squeeze2_gradhttps://github.com/PaddlePaddle/Paddle/pull/48634 - [x]
reshape2https://github.com/PaddlePaddle/Paddle/pull/48749 - [x] Copy method https://github.com/PaddlePaddle/Paddle/pull/48539