From 6598eb82a30482fe4fe9c5b00b89fd680121af6e Mon Sep 17 00:00:00 2001 From: yangfei Date: Wed, 14 Nov 2018 15:57:44 +0800 Subject: [PATCH] add cl kernel for mobilenetssd --- src/operators/kernel/cl/box_coder_kernel.cpp | 18 +++++++-------- src/operators/kernel/cl/concat_kernel.cpp | 18 +++++++-------- .../kernel/cl/conv_bn_relu_kernel.cpp | 23 +++++++++---------- .../kernel/cl/dwconv_bn_relu_kernel.cpp | 23 +++++++++---------- .../kernel/cl/multiclass_nms_kernel.cpp | 20 ++++++++-------- src/operators/kernel/cl/prior_box_kernel.cpp | 21 ++++++++--------- src/operators/kernel/cl/transpose_kernel.cpp | 18 +++++++-------- 7 files changed, 68 insertions(+), 73 deletions(-) diff --git a/src/operators/kernel/cl/box_coder_kernel.cpp b/src/operators/kernel/cl/box_coder_kernel.cpp index 66d5af5484..582f6131bf 100644 --- a/src/operators/kernel/cl/box_coder_kernel.cpp +++ b/src/operators/kernel/cl/box_coder_kernel.cpp @@ -17,18 +17,18 @@ limitations under the License. */ #include "operators/kernel/box_coder_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool BoxCoderKernel::Init(BoxCoderParam *param) { - return true; - } +template <> +bool BoxCoderKernel::Init(BoxCoderParam *param) { + return true; +} - template <> - void BoxCoderKernel::Compute(const BoxCoderParam ¶m) { - } +template <> +void BoxCoderKernel::Compute( + const BoxCoderParam ¶m) {} - } // namespace operators +} // namespace operators } // namespace paddle_mobile #endif diff --git a/src/operators/kernel/cl/concat_kernel.cpp b/src/operators/kernel/cl/concat_kernel.cpp index 97c996f84d..48fbd03315 100644 --- a/src/operators/kernel/cl/concat_kernel.cpp +++ b/src/operators/kernel/cl/concat_kernel.cpp @@ -17,19 +17,17 @@ limitations under the License. */ #include "operators/kernel/concat_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool ConcatKernel::Init(ConcatParam *param) { - return true; - } +template <> +bool ConcatKernel::Init(ConcatParam *param) { + return true; +} - template <> - void ConcatKernel::Compute(const ConcatParam ¶m) { +template <> +void ConcatKernel::Compute(const ConcatParam ¶m) {} - } - - } // namespace operators +} // 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 index ab82fc6510..be2da60de0 100644 --- a/src/operators/kernel/cl/conv_bn_relu_kernel.cpp +++ b/src/operators/kernel/cl/conv_bn_relu_kernel.cpp @@ -17,21 +17,20 @@ limitations under the License. */ #include "operators/kernel/conv_bn_relu_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool ConvBNReluKernel::Init(FusionConvBNReluParam *param) { +template <> +bool ConvBNReluKernel::Init( + FusionConvBNReluParam *param) { + return true; +} - return true; - } +template <> +void ConvBNReluKernel::Compute( + const FusionConvBNReluParam ¶m) {} +template class ConvBNReluKernel; - template <> - void ConvBNReluKernel::Compute( - const FusionConvBNReluParam ¶m) { - } - template class ConvBNReluKernel; - - } // namespace operators +} // 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 index c55d6a1eaa..48e08d69ec 100644 --- a/src/operators/kernel/cl/dwconv_bn_relu_kernel.cpp +++ b/src/operators/kernel/cl/dwconv_bn_relu_kernel.cpp @@ -17,21 +17,20 @@ limitations under the License. */ #include "operators/kernel/dwconv_bn_relu_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool DWConvBNReluKernel::Init(FusionDWConvBNReluParam *param) { +template <> +bool DWConvBNReluKernel::Init( + FusionDWConvBNReluParam *param) { + return true; +} - return true; - } +template <> +void DWConvBNReluKernel::Compute( + const FusionDWConvBNReluParam ¶m) {} +template class DWConvBNReluKernel; - template <> - void DWConvBNReluKernel::Compute( - const FusionDWConvBNReluParam ¶m) { - } - template class DWConvBNReluKernel; - - } // namespace operators +} // 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 index 99ef9e42df..e7bf02cde4 100644 --- a/src/operators/kernel/cl/multiclass_nms_kernel.cpp +++ b/src/operators/kernel/cl/multiclass_nms_kernel.cpp @@ -17,19 +17,19 @@ limitations under the License. */ #include "operators/kernel/multiclass_nms_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool MultiClassNMSKernel::Init(MultiClassNMSParam *param) { - return true; - } +template <> +bool MultiClassNMSKernel::Init( + MultiClassNMSParam *param) { + return true; +} - template <> - void MultiClassNMSKernel::Compute( - const MultiClassNMSParam ¶m) { - } +template <> +void MultiClassNMSKernel::Compute( + const MultiClassNMSParam ¶m) {} - } // namespace operators +} // 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 index 4ec1e08b8c..f8d8c51fca 100644 --- a/src/operators/kernel/cl/prior_box_kernel.cpp +++ b/src/operators/kernel/cl/prior_box_kernel.cpp @@ -17,20 +17,19 @@ limitations under the License. */ #include "operators/kernel/prior_box_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool PriorBoxKernel::Init(PriorBoxParam *param) { - return true; - } +template <> +bool PriorBoxKernel::Init(PriorBoxParam *param) { + return true; +} - template <> - void PriorBoxKernel::Compute(const PriorBoxParam ¶m) { +template <> +void PriorBoxKernel::Compute( + const PriorBoxParam ¶m) {} +template class PriorBoxKernel; - } - template class PriorBoxKernel; - - } // namespace operators +} // namespace operators } // namespace paddle_mobile #endif diff --git a/src/operators/kernel/cl/transpose_kernel.cpp b/src/operators/kernel/cl/transpose_kernel.cpp index aaef3ad899..3b41753f18 100644 --- a/src/operators/kernel/cl/transpose_kernel.cpp +++ b/src/operators/kernel/cl/transpose_kernel.cpp @@ -16,18 +16,18 @@ limitations under the License. */ #include "operators/kernel/transpose_kernel.h" namespace paddle_mobile { - namespace operators { +namespace operators { - template <> - bool TransposeKernel::Init(TransposeParam *param) { - return true; - } +template <> +bool TransposeKernel::Init(TransposeParam *param) { + return true; +} - template <> - void TransposeKernel::Compute(const TransposeParam ¶m) { - } +template <> +void TransposeKernel::Compute( + const TransposeParam ¶m) {} - } // namespace operators +} // namespace operators } // namespace paddle_mobile #endif -- GitLab