From 3483d02ded713bd07bb3593b38661527968e8c36 Mon Sep 17 00:00:00 2001 From: qnqinan Date: Mon, 20 Aug 2018 13:24:12 +0800 Subject: [PATCH] update --- src/operators/fusion_elementwise_add_relu_op.h | 13 ++++--------- src/operators/fusion_fc_op.h | 17 ++++++----------- src/operators/fusion_fc_relu_op.h | 11 +++-------- 3 files changed, 13 insertions(+), 28 deletions(-) diff --git a/src/operators/fusion_elementwise_add_relu_op.h b/src/operators/fusion_elementwise_add_relu_op.h index b9d662cae5..286b1efcc8 100644 --- a/src/operators/fusion_elementwise_add_relu_op.h +++ b/src/operators/fusion_elementwise_add_relu_op.h @@ -62,23 +62,19 @@ class FusionElementwiseAddReluOp }; #ifdef PADDLE_MOBILE_CPU -/* #ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER - static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( - new FusioneElementwiseAddReluMatcher()); +static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( + new FusioneElementwiseAddReluMatcher()); #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #endif -*/ #endif #ifdef PADDLE_MOBILE_MALI_GPU -/* #ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER - static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( - new FusioneElementwiseAddReluMatcher()); +static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( + new FusioneElementwiseAddReluMatcher()); #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #endif -*/ #endif #ifdef PADDLE_MOBILE_FPGA @@ -88,7 +84,6 @@ static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #endif #endif - } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/fusion_fc_op.h b/src/operators/fusion_fc_op.h index e6c7e9fdbd..a6fefc16a8 100644 --- a/src/operators/fusion_fc_op.h +++ b/src/operators/fusion_fc_op.h @@ -66,30 +66,25 @@ class FusionFcOp }; #ifdef PADDLE_MOBILE_CPU - -#ifndef FUSION_FC_CPU_REGISTER -#define FUSION_FC_CPU_REGISTER +#ifndef FUSION_FC_REGISTER static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); +#define FUSION_FC_REGISTER #endif - #endif #ifdef PADDLE_MOBILE_MALI_GPU - -#ifndef CONV_CPU_REGISTER -#define CONV_CPU_REGISTER +#ifndef FUSION_FC_REGISTER static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); +#define FUSION_FC_REGISTER #endif - #endif #ifdef PADDLE_MOBILE_FPGA -#ifndef FUSION_FC_CPU_REGISTER -#define FUSION_FC_CPU_REGISTER +#ifndef FUSION_FC_REGISTER static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); +#define FUSION_FC_REGISTER #endif #endif - } // namespace operators } // namespace paddle_mobile diff --git a/src/operators/fusion_fc_relu_op.h b/src/operators/fusion_fc_relu_op.h index 7a68069571..10bbf55802 100644 --- a/src/operators/fusion_fc_relu_op.h +++ b/src/operators/fusion_fc_relu_op.h @@ -65,33 +65,28 @@ class FusionFcReluOp : public framework::OperatorWithKernel< }; #ifdef PADDLE_MOBILE_CPU - #ifndef FUSION_FC_RELU_REGISTER -#define FUSION_FC_RELU_REGISTER static framework::FusionOpRegistrar fc_relu_registrar( new FusionFcReluMatcher()); +#define FUSION_FC_RELU_REGISTER #endif - #endif #ifdef PADDLE_MOBILE_MALI_GPU - #ifndef FUSION_FC_RELU_REGISTER -#define FUSION_FC_RELU_REGISTER static framework::FusionOpRegistrar fc_relu_registrar( new FusionFcReluMatcher()); +#define FUSION_FC_RELU_REGISTER #endif - #endif #ifdef PADDLE_MOBILE_FPGA #ifndef FUSION_FC_RELU_REGISTER -#define FUSION_FC_RELU_REGISTER static framework::FusionOpRegistrar fc_relu_registrar( new FusionFcReluMatcher()); +#define FUSION_FC_RELU_REGISTER #endif #endif - } // namespace operators } // namespace paddle_mobile -- GitLab