diff --git a/paddle/fluid/operators/argsort_op.cc b/paddle/fluid/operators/argsort_op.cc index 999e2510a8db5859b248cf6582106411a02bb55f..1995b7ba048bb71b6c1fe357967e7317230825e8 100644 --- a/paddle/fluid/operators/argsort_op.cc +++ b/paddle/fluid/operators/argsort_op.cc @@ -93,4 +93,6 @@ REGISTER_OPERATOR( paddle::framework::EmptyGradOpMaker); REGISTER_OP_CPU_KERNEL(argsort, ops::ArgsortKernel, - ops::ArgsortKernel); + ops::ArgsortKernel, + ops::ArgsortKernel, + ops::ArgsortKernel); diff --git a/paddle/fluid/operators/argsort_op.cu b/paddle/fluid/operators/argsort_op.cu index 8eb56e70b59ca486601862b501eca0b5731d2b31..0ea7e3dcb14867002b48e66c322160f8a2c49ba7 100644 --- a/paddle/fluid/operators/argsort_op.cu +++ b/paddle/fluid/operators/argsort_op.cu @@ -240,4 +240,6 @@ class ArgsortOpCUDAKernel : public framework::OpKernel { REGISTER_OP_CUDA_KERNEL( argsort, paddle::operators::ArgsortOpCUDAKernel, paddle::operators::ArgsortOpCUDAKernel, + paddle::operators::ArgsortOpCUDAKernel, + paddle::operators::ArgsortOpCUDAKernel, paddle::operators::ArgsortOpCUDAKernel); diff --git a/paddle/fluid/operators/cumsum_op.cc b/paddle/fluid/operators/cumsum_op.cc index ab81a2873bf12455baa6ba222ff9aa50db0f9008..89cd5c697743e61fa945680cf84d81aea74ecfa9 100644 --- a/paddle/fluid/operators/cumsum_op.cc +++ b/paddle/fluid/operators/cumsum_op.cc @@ -81,4 +81,5 @@ REGISTER_OPERATOR(cumsum, ops::CumOp, ops::CumsumOpMaker, ops::CumsumGradMaker); REGISTER_OP_CPU_KERNEL(cumsum, ops::CumKernel>, ops::CumKernel>, - ops::CumKernel>); + ops::CumKernel>, + ops::CumKernel>); diff --git a/paddle/fluid/operators/cumsum_op.cu b/paddle/fluid/operators/cumsum_op.cu index eb5fd99ccb844b1f1717b818e7807a384d6515eb..a1388f20dc5203867134b952d82fea7f1c87337f 100644 --- a/paddle/fluid/operators/cumsum_op.cu +++ b/paddle/fluid/operators/cumsum_op.cu @@ -19,4 +19,5 @@ using CUDA = paddle::platform::CUDADeviceContext; REGISTER_OP_CUDA_KERNEL(cumsum, ops::CumKernel>, ops::CumKernel>, - ops::CumKernel>); + ops::CumKernel>, + ops::CumKernel>); diff --git a/paddle/fluid/operators/expand_as_op.cc b/paddle/fluid/operators/expand_as_op.cc index e72a16cb5f0b8d7109140f2861e9c7901a525ab5..da20ed3bbc2322bf3f124c488f628ffa7f18ac51 100644 --- a/paddle/fluid/operators/expand_as_op.cc +++ b/paddle/fluid/operators/expand_as_op.cc @@ -130,8 +130,11 @@ REGISTER_OP_CPU_KERNEL( expand_as, ops::ExpandAsKernel, ops::ExpandAsKernel, ops::ExpandAsKernel, + ops::ExpandAsKernel, ops::ExpandAsKernel); REGISTER_OP_CPU_KERNEL( expand_as_grad, + ops::ExpandAsGradKernel, + ops::ExpandAsGradKernel, ops::ExpandAsGradKernel, ops::ExpandAsGradKernel); diff --git a/paddle/fluid/operators/expand_as_op.cu b/paddle/fluid/operators/expand_as_op.cu index d7c894d24816298d4bd9b61ac0dfbb7f40679f1c..dbb1fcf3ab32619b73363bf064cb1cc286efde6e 100755 --- a/paddle/fluid/operators/expand_as_op.cu +++ b/paddle/fluid/operators/expand_as_op.cu @@ -15,8 +15,11 @@ REGISTER_OP_CUDA_KERNEL( expand_as, ops::ExpandAsKernel, ops::ExpandAsKernel, ops::ExpandAsKernel, + ops::ExpandAsKernel, ops::ExpandAsKernel); REGISTER_OP_CUDA_KERNEL( expand_as_grad, + ops::ExpandAsGradKernel, + ops::ExpandAsGradKernel, ops::ExpandAsGradKernel, ops::ExpandAsGradKernel); diff --git a/paddle/fluid/operators/isfinite_op.cc b/paddle/fluid/operators/isfinite_op.cc index f8c584163fbef040a96d696e5da07095854f1cc3..8936a8c9a2a7da1af8df3f199091192ab18e65ce 100644 --- a/paddle/fluid/operators/isfinite_op.cc +++ b/paddle/fluid/operators/isfinite_op.cc @@ -104,6 +104,8 @@ namespace ops = paddle::operators; REGISTER_OP_CPU_KERNEL( \ op_type, ops::OverflowKernel, \ + ops::OverflowKernel, \ ops::OverflowKernel, \ ops::OverflowKernel); REGISTER_OPERATOR(pad2d_grad, ops::Pad2dOpGrad, ops::Pad2dOpGradNoNeedBufferVarsInference); -REGISTER_OP_CPU_KERNEL(pad2d, ops::Pad2dCPUKernel); -REGISTER_OP_CPU_KERNEL(pad2d_grad, ops::Pad2dGradCPUKernel); +REGISTER_OP_CPU_KERNEL(pad2d, ops::Pad2dCPUKernel, + ops::Pad2dCPUKernel, ops::Pad2dCPUKernel, + ops::Pad2dCPUKernel); +REGISTER_OP_CPU_KERNEL(pad2d_grad, ops::Pad2dGradCPUKernel, + ops::Pad2dGradCPUKernel); diff --git a/paddle/fluid/operators/pad2d_op.cu b/paddle/fluid/operators/pad2d_op.cu index 72eca08b06b144335424a669241b5754beda758d..4b6e3e9521d675964e61061d17f49d274bfe1606 100644 --- a/paddle/fluid/operators/pad2d_op.cu +++ b/paddle/fluid/operators/pad2d_op.cu @@ -459,5 +459,8 @@ class Pad2dGradCUDAKernel : public framework::OpKernel { } // namespace paddle namespace ops = paddle::operators; -REGISTER_OP_CUDA_KERNEL(pad2d, ops::Pad2dCUDAKernel); -REGISTER_OP_CUDA_KERNEL(pad2d_grad, ops::Pad2dGradCUDAKernel); +REGISTER_OP_CUDA_KERNEL(pad2d, ops::Pad2dCUDAKernel, + ops::Pad2dCUDAKernel, ops::Pad2dCUDAKernel, + ops::Pad2dCUDAKernel); +REGISTER_OP_CUDA_KERNEL(pad2d_grad, ops::Pad2dGradCUDAKernel, + ops::Pad2dGradCUDAKernel); diff --git a/paddle/fluid/operators/pad_constant_like_op.cc b/paddle/fluid/operators/pad_constant_like_op.cc index d408275d8e5ca9ee97b3ca4dc99f7154ffa6cc5a..4fb4f7a022f6bd8ff0843b62d735a3535ae77d81 100644 --- a/paddle/fluid/operators/pad_constant_like_op.cc +++ b/paddle/fluid/operators/pad_constant_like_op.cc @@ -224,8 +224,13 @@ REGISTER_OPERATOR(pad_constant_like_grad, ops::PadConstantLikeOpGrad); REGISTER_OP_CPU_KERNEL( pad_constant_like, ops::PadConstantLikeKernel, - ops::PadConstantLikeKernel); + ops::PadConstantLikeKernel, + ops::PadConstantLikeKernel, + ops::PadConstantLikeKernel); REGISTER_OP_CPU_KERNEL( pad_constant_like_grad, ops::PadConstantLikeGradKernel, - ops::PadConstantLikeGradKernel); + ops::PadConstantLikeGradKernel, + ops::PadConstantLikeGradKernel, + ops::PadConstantLikeGradKernel); diff --git a/paddle/fluid/operators/pad_constant_like_op.cu b/paddle/fluid/operators/pad_constant_like_op.cu index 9e62a6dc9d34a96c59a08d0e5fd6cdd9f0d6d51d..76faf30ed92000d7093eb73bf6499a43f6ab5b57 100644 --- a/paddle/fluid/operators/pad_constant_like_op.cu +++ b/paddle/fluid/operators/pad_constant_like_op.cu @@ -17,9 +17,14 @@ namespace ops = paddle::operators; REGISTER_OP_CUDA_KERNEL( pad_constant_like, ops::PadConstantLikeKernel, - ops::PadConstantLikeKernel); + ops::PadConstantLikeKernel, + ops::PadConstantLikeKernel, + ops::PadConstantLikeKernel); REGISTER_OP_CUDA_KERNEL( pad_constant_like_grad, + ops::PadConstantLikeGradKernel, + ops::PadConstantLikeGradKernel, ops::PadConstantLikeGradKernel, ops::PadConstantLikeGradKernel); diff --git a/paddle/fluid/operators/pad_op.cc b/paddle/fluid/operators/pad_op.cc index b98f201e8a1699577d8948f3754ddc2c00c05841..a604c28cb006f8d7e5696ed8937fd1212a79173b 100644 --- a/paddle/fluid/operators/pad_op.cc +++ b/paddle/fluid/operators/pad_op.cc @@ -147,6 +147,10 @@ REGISTER_OPERATOR(pad, ops::PadOp, ops::PadOpMaker, ops::PadOpGradMaker); REGISTER_OPERATOR(pad_grad, ops::PadOpGrad); REGISTER_OP_CPU_KERNEL( - pad, ops::PadKernel); + pad, ops::PadKernel, + ops::PadKernel, + ops::PadKernel, + ops::PadKernel); REGISTER_OP_CPU_KERNEL( - pad_grad, ops::PadGradKernel); + pad_grad, ops::PadGradKernel, + ops::PadGradKernel); diff --git a/paddle/fluid/operators/pad_op.cu b/paddle/fluid/operators/pad_op.cu index e07c99b12ba818d126ffbb68f7a4928987792e08..391e305352e55188fb0c502b8efe03af597d48ca 100644 --- a/paddle/fluid/operators/pad_op.cu +++ b/paddle/fluid/operators/pad_op.cu @@ -18,6 +18,8 @@ namespace plat = paddle::platform; REGISTER_OP_CUDA_KERNEL( pad, ops::PadKernel, ops::PadKernel, + ops::PadKernel, + ops::PadKernel, ops::PadKernel); REGISTER_OP_CUDA_KERNEL( pad_grad, ops::PadGradKernel, diff --git a/paddle/fluid/operators/save_combine_op.cc b/paddle/fluid/operators/save_combine_op.cc index 953e2655d13328b986a67398dca54f8a5e3aedcf..68144e603bddf3457bde373b69f99b67625534d0 100644 --- a/paddle/fluid/operators/save_combine_op.cc +++ b/paddle/fluid/operators/save_combine_op.cc @@ -86,4 +86,5 @@ REGISTER_OP_CPU_KERNEL( save_combine, ops::SaveCombineOpKernel, ops::SaveCombineOpKernel, - ops::SaveCombineOpKernel); + ops::SaveCombineOpKernel, + ops::SaveCombineOpKernel); diff --git a/paddle/fluid/operators/save_combine_op.cu b/paddle/fluid/operators/save_combine_op.cu index 78607823a0368d216310bbbb390fd7face002839..71476fd802bdd9e617e69d422b1e931178f05322 100644 --- a/paddle/fluid/operators/save_combine_op.cu +++ b/paddle/fluid/operators/save_combine_op.cu @@ -20,4 +20,5 @@ REGISTER_OP_CUDA_KERNEL( save_combine, ops::SaveCombineOpKernel, ops::SaveCombineOpKernel, - ops::SaveCombineOpKernel); + ops::SaveCombineOpKernel, + ops::SaveCombineOpKernel); diff --git a/paddle/fluid/operators/scatter_op.cc b/paddle/fluid/operators/scatter_op.cc index 6ba5ba7bb277c21384c12b60f9f573e4afc31513..12dadc4eb9288e334dfc90b83f4ccd5658abf565 100644 --- a/paddle/fluid/operators/scatter_op.cc +++ b/paddle/fluid/operators/scatter_op.cc @@ -146,5 +146,10 @@ REGISTER_OPERATOR(scatter, ops::ScatterOp, ops::ScatterOpMaker, REGISTER_OPERATOR(scatter_grad, ops::ScatterGradOp, ops::ScatterGradNoNeedBufferVarsInference, ops::ScatterGradInplaceInferer); -REGISTER_OP_CPU_KERNEL(scatter, ops::ScatterOpKernel); -REGISTER_OP_CPU_KERNEL(scatter_grad, ops::ScatterGradientOpKernel); +REGISTER_OP_CPU_KERNEL(scatter, ops::ScatterOpKernel, + ops::ScatterOpKernel, ops::ScatterOpKernel, + ops::ScatterOpKernel); +REGISTER_OP_CPU_KERNEL(scatter_grad, ops::ScatterGradientOpKernel, + ops::ScatterGradientOpKernel, + ops::ScatterGradientOpKernel, + ops::ScatterGradientOpKernel); diff --git a/paddle/fluid/operators/scatter_op.cu b/paddle/fluid/operators/scatter_op.cu index f3e0faa164c2f95bcb2402a7ba92847cfb67167c..938616e86c71f2787aa847d68d73b9e1f85de71d 100644 --- a/paddle/fluid/operators/scatter_op.cu +++ b/paddle/fluid/operators/scatter_op.cu @@ -94,5 +94,9 @@ class ScatterGradOpCUDAKernel : public framework::OpKernel { } // namespace paddle namespace ops = paddle::operators; -REGISTER_OP_CUDA_KERNEL(scatter, ops::ScatterOpCUDAKernel); -REGISTER_OP_CUDA_KERNEL(scatter_grad, ops::ScatterGradOpCUDAKernel); +REGISTER_OP_CUDA_KERNEL(scatter, ops::ScatterOpCUDAKernel, + ops::ScatterOpCUDAKernel, + ops::ScatterOpCUDAKernel, + ops::ScatterOpCUDAKernel); +REGISTER_OP_CUDA_KERNEL(scatter_grad, ops::ScatterGradOpCUDAKernel, + ops::ScatterGradOpCUDAKernel); diff --git a/paddle/fluid/operators/sequence_ops/sequence_concat_op.cc b/paddle/fluid/operators/sequence_ops/sequence_concat_op.cc index ac513dee29ef8632b74f64d4b3e75ba2a9bc7a85..d8214ac2ca62a870e4cccd37eedd75913d11a701 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_concat_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_concat_op.cc @@ -126,7 +126,7 @@ REGISTER_OPERATOR(sequence_concat, op::SequenceConcatOp, op::SeqConcatOpMaker, template using Kernel = op::SeqConcatKernel; REGISTER_OP_CPU_KERNEL(sequence_concat, Kernel, Kernel, - Kernel); + Kernel, Kernel); REGISTER_OPERATOR(sequence_concat_grad, op::SeqConcatGradOp, op::SeqConcatGradNoNeedBufferVarsInference); @@ -134,4 +134,5 @@ template using GradKernel = op::SeqConcatGradKernel; REGISTER_OP_CPU_KERNEL(sequence_concat_grad, GradKernel, - GradKernel, GradKernel); + GradKernel, GradKernel, + GradKernel); diff --git a/paddle/fluid/operators/sequence_ops/sequence_concat_op.cu.cc b/paddle/fluid/operators/sequence_ops/sequence_concat_op.cu.cc index 7b8043bc4538b486bb73e005769e1585e5c4817e..43fd84a711ff7fbf999a66bfdfe320b4daceb1a7 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_concat_op.cu.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_concat_op.cu.cc @@ -17,10 +17,12 @@ template using Kernel = paddle::operators::SeqConcatKernel; -REGISTER_OP_CUDA_KERNEL(sequence_concat, Kernel, Kernel); +REGISTER_OP_CUDA_KERNEL(sequence_concat, Kernel, Kernel, + Kernel, Kernel); template using GradKernel = paddle::operators::SeqConcatGradKernel; REGISTER_OP_CUDA_KERNEL(sequence_concat_grad, GradKernel, - GradKernel); + GradKernel, GradKernel, + GradKernel); diff --git a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc index 9e31a81c4353ea8622c258fc5cc4d89eabee4f28..655afe7e53f19c9bbdc3e8f6bf4560cc31e3a7cd 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc +++ b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cc @@ -150,7 +150,14 @@ REGISTER_OPERATOR(sequence_slice_grad, ops::SequenceSliceGradOp, ops::SequenceSliceGradNoNeedBufferVarsInference); REGISTER_OP_CPU_KERNEL( sequence_slice, - ops::SequenceSliceOpKernel); + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel); REGISTER_OP_CPU_KERNEL( sequence_slice_grad, - ops::SequenceSliceGradOpKernel); + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel); diff --git a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cu b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cu index 1e4a1b8323dbaacdf3f74c33e7aa4484d9be2478..a4b0ea2e5b2f4972a3004e427bcae96e87a5a9e9 100644 --- a/paddle/fluid/operators/sequence_ops/sequence_slice_op.cu +++ b/paddle/fluid/operators/sequence_ops/sequence_slice_op.cu @@ -17,7 +17,14 @@ limitations under the License. */ namespace ops = paddle::operators; REGISTER_OP_CUDA_KERNEL( sequence_slice, - ops::SequenceSliceOpKernel); + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel, + ops::SequenceSliceOpKernel); REGISTER_OP_CUDA_KERNEL( sequence_slice_grad, - ops::SequenceSliceGradOpKernel); + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel, + ops::SequenceSliceGradOpKernel); diff --git a/paddle/fluid/operators/space_to_depth_op.cc b/paddle/fluid/operators/space_to_depth_op.cc index 133be773ac76e376b3bcb57e0b3a9061091cc16b..1042d2acd3928a2a1287917cb50c53f0f9654bde 100644 --- a/paddle/fluid/operators/space_to_depth_op.cc +++ b/paddle/fluid/operators/space_to_depth_op.cc @@ -187,9 +187,11 @@ REGISTER_OP_CPU_KERNEL( space_to_depth, ops::SpaceToDepthKernel, ops::SpaceToDepthKernel, + ops::SpaceToDepthKernel, ops::SpaceToDepthKernel); REGISTER_OP_CPU_KERNEL( space_to_depth_grad, ops::SpaceToDepthGradKernel, ops::SpaceToDepthGradKernel, + ops::SpaceToDepthGradKernel, ops::SpaceToDepthGradKernel); diff --git a/paddle/fluid/operators/space_to_depth_op.cu b/paddle/fluid/operators/space_to_depth_op.cu index 38d0a662733222386b8ecd68d064f3d1abe56c3b..5a9f7c288d12c571df02828f9ad5a07563f127b4 100644 --- a/paddle/fluid/operators/space_to_depth_op.cu +++ b/paddle/fluid/operators/space_to_depth_op.cu @@ -21,10 +21,12 @@ REGISTER_OP_CUDA_KERNEL( space_to_depth, ops::SpaceToDepthKernel, ops::SpaceToDepthKernel, + ops::SpaceToDepthKernel, ops::SpaceToDepthKernel); REGISTER_OP_CUDA_KERNEL( space_to_depth_grad, ops::SpaceToDepthGradKernel, ops::SpaceToDepthGradKernel, + ops::SpaceToDepthGradKernel, ops::SpaceToDepthGradKernel); diff --git a/paddle/fluid/operators/top_k_op.cc b/paddle/fluid/operators/top_k_op.cc index 7b9960c8b47e73c7f7a8c29a789f02eadee06eed..c18ec5d41884f7cec09236c5b16b010616cce4b3 100644 --- a/paddle/fluid/operators/top_k_op.cc +++ b/paddle/fluid/operators/top_k_op.cc @@ -99,4 +99,6 @@ REGISTER_OPERATOR( paddle::framework::EmptyGradOpMaker); REGISTER_OP_CPU_KERNEL(top_k, ops::TopkKernel, - ops::TopkKernel); + ops::TopkKernel, + ops::TopkKernel, + ops::TopkKernel); diff --git a/paddle/fluid/operators/top_k_op.cu b/paddle/fluid/operators/top_k_op.cu index 0375611dfb5b9c129e9cfa26808ec40185eac47d..c56716f8ed37965474e980d0f1338317369b18d1 100644 --- a/paddle/fluid/operators/top_k_op.cu +++ b/paddle/fluid/operators/top_k_op.cu @@ -549,4 +549,6 @@ class TopkOpCUDAKernel : public framework::OpKernel { REGISTER_OP_CUDA_KERNEL( top_k, paddle::operators::TopkOpCUDAKernel, paddle::operators::TopkOpCUDAKernel, + paddle::operators::TopkOpCUDAKernel, + paddle::operators::TopkOpCUDAKernel, paddle::operators::TopkOpCUDAKernel);