diff --git a/src/operators/feed_op.h b/src/operators/feed_op.h index 4a2f9285e0c1ee79e9820ef775436d39017f7f79..1edcb8406360becba25d522df0f67836519fd1de 100644 --- a/src/operators/feed_op.h +++ b/src/operators/feed_op.h @@ -49,7 +49,7 @@ class FeedOp : public framework::OperatorBase { auto input_ptr = input->data(); Tensor *output = param_.Out(); auto output_ptr = output->mutable_data(); - auto out_address = output->fpga_args().scale_pointer(); + auto output_scale_address = output->fpga_args().scale_pointer(); fpga::BypassArgs args; args.convert_type = fpga::DATA_FP32_TO_FP16; args.layout_type = fpga::LAYOUT_CHW_TO_HWC; @@ -60,7 +60,7 @@ class FeedOp : public framework::OperatorBase { args.image.pad_height = 0; args.image.pad_width = 0; args.output.address = output_ptr; - args.output.scale_address = out_address; + args.output.scale_address = output_scale_address; fpga::PerformBypass(args); } diff --git a/src/operators/fusion_elementwise_add_relu_op.h b/src/operators/fusion_elementwise_add_relu_op.h index 078d09858c391214f13d70543e70da8c38e67b69..2a92f1e2471cb9e14d84ef03e4bfb872fc738d68 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 20721bcf9b91ef355744252cbc6ba71210a77e72..076a95d745e8d44a417dd95fb75844a67b11e653 100644 --- a/src/operators/fusion_fc_op.h +++ b/src/operators/fusion_fc_op.h @@ -66,30 +66,25 @@ class FusionFcOp : public framework::OperatorWithKernel< }; #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 bac6524c43641b757815c3d46c3904932ee42098..fa7d4045fc10d6e240d93e129aa736be793f7bbf 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