diff --git a/src/operators/box_coder_op.cpp b/src/operators/box_coder_op.cpp index 9e57c9021dac1b6857752989727c1c86051e33f7..c4005bcfd665eebe805e781966e28df026c190c2 100644 --- a/src/operators/box_coder_op.cpp +++ b/src/operators/box_coder_op.cpp @@ -55,6 +55,9 @@ namespace ops = paddle_mobile::operators; #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(box_coder, ops::BoxCoderOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(box_coder, ops::BoxCoderOp); +#endif #ifdef PADDLE_MOBILE_MALI_GPU #endif #ifdef PADDLE_MOBILE_FPGA diff --git a/src/operators/concat_op.cpp b/src/operators/concat_op.cpp index f767f3481c999a16da46e75e314e8ebcb54193fa..e64cbccd4192f1e04679d37f775ba79a9229f211 100644 --- a/src/operators/concat_op.cpp +++ b/src/operators/concat_op.cpp @@ -66,6 +66,9 @@ namespace ops = paddle_mobile::operators; #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(concat, ops::ConcatOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(concat, ops::ConcatOp); +#endif #ifdef PADDLE_MOBILE_MALI_GPU REGISTER_OPERATOR_MALI_GPU(concat, ops::ConcatOp); #endif diff --git a/src/operators/fusion_conv_bn_relu_op.cpp b/src/operators/fusion_conv_bn_relu_op.cpp index 2ec72dafc0134776c465e0ffe3d55cc3d06823a2..54c9f85cbb7dc00bd0df5747caac8fd2ee9e2782 100644 --- a/src/operators/fusion_conv_bn_relu_op.cpp +++ b/src/operators/fusion_conv_bn_relu_op.cpp @@ -54,6 +54,9 @@ REGISTER_FUSION_MATCHER(fusion_conv_bn_relu, ops::FusionConvBNReluMatcher); #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(fusion_conv_bn_relu, ops::FusionConvBNReluOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(fusion_conv_bn_relu, ops::FusionConvBNReluOp); +#endif #ifdef PADDLE_MOBILE_FPGA REGISTER_OPERATOR_FPGA(fusion_conv_bn_relu, ops::FusionConvBNReluOp); #endif diff --git a/src/operators/fusion_dwconv_bn_relu_op.cpp b/src/operators/fusion_dwconv_bn_relu_op.cpp index 060d8b895610be4220718d6fd8be8c0ed255a2e8..f5040987e42f9c0b3068d730a9926b9fcff8c8c3 100644 --- a/src/operators/fusion_dwconv_bn_relu_op.cpp +++ b/src/operators/fusion_dwconv_bn_relu_op.cpp @@ -54,6 +54,9 @@ REGISTER_FUSION_MATCHER(fusion_dwconv_bn_relu, ops::FusionDWConvBNReluMatcher); #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(fusion_dwconv_bn_relu, ops::FusionDWConvBNReluOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(fusion_dwconv_bn_relu, ops::FusionDWConvBNReluOp); +#endif #ifdef PADDLE_MOBILE_FPGA #endif diff --git a/src/operators/kernel/cl/box_coder_kernel.cpp b/src/operators/kernel/cl/box_coder_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..582f6131bf60f02fb67f0479622123a28e89f713 --- /dev/null +++ b/src/operators/kernel/cl/box_coder_kernel.cpp @@ -0,0 +1,34 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef BOXCODER_OP + +#include "operators/kernel/box_coder_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool BoxCoderKernel::Init(BoxCoderParam *param) { + return true; +} + +template <> +void BoxCoderKernel::Compute( + const BoxCoderParam ¶m) {} + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/concat_kernel.cpp b/src/operators/kernel/cl/concat_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48fbd03315957f54873e5ee18bc95896ca306554 --- /dev/null +++ b/src/operators/kernel/cl/concat_kernel.cpp @@ -0,0 +1,33 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef CONCAT_OP + +#include "operators/kernel/concat_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool ConcatKernel::Init(ConcatParam *param) { + return true; +} + +template <> +void ConcatKernel::Compute(const ConcatParam ¶m) {} + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/conv_bn_relu_kernel.cpp b/src/operators/kernel/cl/conv_bn_relu_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..be2da60de0bf429656978d696f8c0067b74559ad --- /dev/null +++ b/src/operators/kernel/cl/conv_bn_relu_kernel.cpp @@ -0,0 +1,36 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef FUSION_CONVBNRELU_OP + +#include "operators/kernel/conv_bn_relu_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool ConvBNReluKernel::Init( + FusionConvBNReluParam *param) { + return true; +} + +template <> +void ConvBNReluKernel::Compute( + const FusionConvBNReluParam ¶m) {} +template class ConvBNReluKernel; + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/dwconv_bn_relu_kernel.cpp b/src/operators/kernel/cl/dwconv_bn_relu_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..48e08d69ec22f128885bb7aa9165e0898ca67b7a --- /dev/null +++ b/src/operators/kernel/cl/dwconv_bn_relu_kernel.cpp @@ -0,0 +1,36 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef FUSION_DWCONVBNRELU_OP + +#include "operators/kernel/dwconv_bn_relu_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool DWConvBNReluKernel::Init( + FusionDWConvBNReluParam *param) { + return true; +} + +template <> +void DWConvBNReluKernel::Compute( + const FusionDWConvBNReluParam ¶m) {} +template class DWConvBNReluKernel; + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/multiclass_nms_kernel.cpp b/src/operators/kernel/cl/multiclass_nms_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..e7bf02cde4b5562fd17508a29bd2e820f2e668b6 --- /dev/null +++ b/src/operators/kernel/cl/multiclass_nms_kernel.cpp @@ -0,0 +1,35 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef MULTICLASSNMS_OP + +#include "operators/kernel/multiclass_nms_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool MultiClassNMSKernel::Init( + MultiClassNMSParam *param) { + return true; +} + +template <> +void MultiClassNMSKernel::Compute( + const MultiClassNMSParam ¶m) {} + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/prior_box_kernel.cpp b/src/operators/kernel/cl/prior_box_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..f8d8c51fcaca214e6248b83d9e135670fa28fe94 --- /dev/null +++ b/src/operators/kernel/cl/prior_box_kernel.cpp @@ -0,0 +1,35 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ + +#ifdef PRIORBOX_OP + +#include "operators/kernel/prior_box_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool PriorBoxKernel::Init(PriorBoxParam *param) { + return true; +} + +template <> +void PriorBoxKernel::Compute( + const PriorBoxParam ¶m) {} +template class PriorBoxKernel; + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/kernel/cl/transpose_kernel.cpp b/src/operators/kernel/cl/transpose_kernel.cpp new file mode 100644 index 0000000000000000000000000000000000000000..3b41753f186967b7dd419fed05201989d45252b6 --- /dev/null +++ b/src/operators/kernel/cl/transpose_kernel.cpp @@ -0,0 +1,33 @@ +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ +#ifdef TRANSPOSE_OP + +#include "operators/kernel/transpose_kernel.h" + +namespace paddle_mobile { +namespace operators { + +template <> +bool TransposeKernel::Init(TransposeParam *param) { + return true; +} + +template <> +void TransposeKernel::Compute( + const TransposeParam ¶m) {} + +} // namespace operators +} // namespace paddle_mobile + +#endif diff --git a/src/operators/multiclass_nms_op.cpp b/src/operators/multiclass_nms_op.cpp index 9d6ffaf3a78c036beb3e1783930c68d08be0cc0e..1dd7883c8be08628ae6d8a6981d5dc4dc48dc53b 100644 --- a/src/operators/multiclass_nms_op.cpp +++ b/src/operators/multiclass_nms_op.cpp @@ -43,5 +43,8 @@ namespace ops = paddle_mobile::operators; #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(multiclass_nms, ops::MultiClassNMSOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(multiclass_nms, ops::MultiClassNMSOp); +#endif #endif diff --git a/src/operators/prior_box_op.cpp b/src/operators/prior_box_op.cpp index bd48013b52f9e4b8651e61afc4c280be3f96b2ac..8647db41d78b3dab0c87a692ebf207b03386761b 100644 --- a/src/operators/prior_box_op.cpp +++ b/src/operators/prior_box_op.cpp @@ -54,5 +54,7 @@ REGISTER_OPERATOR_CPU(prior_box, ops::PriorBoxOp); #endif #ifdef PADDLE_MOBILE_MALI_GPU #endif - +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(prior_box, ops::PriorBoxOp); +#endif #endif diff --git a/src/operators/transpose_op.cpp b/src/operators/transpose_op.cpp index 74e0c022f7d80b57235f1b3b3dac704728bda780..820a4e354dba9c2ffa03b422c590b409f0c3e687 100644 --- a/src/operators/transpose_op.cpp +++ b/src/operators/transpose_op.cpp @@ -55,5 +55,8 @@ namespace ops = paddle_mobile::operators; #ifdef PADDLE_MOBILE_CPU REGISTER_OPERATOR_CPU(transpose, ops::TransposeOp); #endif +#ifdef PADDLE_MOBILE_CL +REGISTER_OPERATOR_CL(transpose, ops::TransposeOp); +#endif #endif // TRANSPOSE_OP