diff --git a/paddle/fluid/operators/reshape_op.cc b/paddle/fluid/operators/reshape_op.cc index a90ffb4ff3e6e1bfcc0d00bc4714b3067fdede6c..3580932356fd5f29d5e4d00a70e64c207c64e41e 100644 --- a/paddle/fluid/operators/reshape_op.cc +++ b/paddle/fluid/operators/reshape_op.cc @@ -121,10 +121,15 @@ class ReshapeGradOp : public framework::OperatorWithKernel { } // namespace operators } // namespace paddle namespace ops = paddle::operators; +using CPU = paddle::platform::CPUDeviceContext; REGISTER_OP(reshape, ops::ReshapeOp, ops::ReshapeOpMaker, reshape_grad, ops::ReshapeGradOp); -REGISTER_OP_CPU_KERNEL(reshape, - ops::ReshapeKernel); -REGISTER_OP_CPU_KERNEL( - reshape_grad, ops::ReshapeGradKernel); +REGISTER_OP_CPU_KERNEL(reshape, ops::ReshapeKernel, + ops::ReshapeKernel, + ops::ReshapeKernel, + ops::ReshapeKernel); +REGISTER_OP_CPU_KERNEL(reshape_grad, ops::ReshapeGradKernel, + ops::ReshapeGradKernel, + ops::ReshapeGradKernel, + ops::ReshapeGradKernel); diff --git a/paddle/fluid/operators/reshape_op.cu b/paddle/fluid/operators/reshape_op.cu index d5ceaf784c0e4b1c8d527958be31d5186c2823d3..c628c634e2bc9ae260948a6e7ccf786cbd6c5c3c 100644 --- a/paddle/fluid/operators/reshape_op.cu +++ b/paddle/fluid/operators/reshape_op.cu @@ -13,10 +13,14 @@ See the License for the specific language governing permissions and limitations under the License. */ #include "paddle/fluid/operators/reshape_op.h" +using CUDA = paddle::platform::CUDADeviceContext; -REGISTER_OP_CUDA_KERNEL( - reshape, - paddle::operators::ReshapeKernel); -REGISTER_OP_CUDA_KERNEL( - reshape_grad, - paddle::operators::ReshapeGradKernel); +REGISTER_OP_CUDA_KERNEL(reshape, paddle::operators::ReshapeKernel, + paddle::operators::ReshapeKernel, + paddle::operators::ReshapeKernel, + paddle::operators::ReshapeKernel); +REGISTER_OP_CUDA_KERNEL(reshape_grad, + paddle::operators::ReshapeGradKernel, + paddle::operators::ReshapeGradKernel, + paddle::operators::ReshapeGradKernel, + paddle::operators::ReshapeGradKernel);