提交 da114810 编写于 作者: qnqinan's avatar qnqinan 提交者: GitHub

Merge pull request #816 from qnqinan/develop

update closed #815
...@@ -49,7 +49,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> { ...@@ -49,7 +49,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> {
auto input_ptr = input->data<float>(); auto input_ptr = input->data<float>();
Tensor *output = param_.Out(); Tensor *output = param_.Out();
auto output_ptr = output->mutable_data<half>(); auto output_ptr = output->mutable_data<half>();
auto out_address = output->fpga_args().scale_pointer(); auto output_scale_address = output->fpga_args().scale_pointer();
fpga::BypassArgs args; fpga::BypassArgs args;
args.convert_type = fpga::DATA_FP32_TO_FP16; args.convert_type = fpga::DATA_FP32_TO_FP16;
args.layout_type = fpga::LAYOUT_CHW_TO_HWC; args.layout_type = fpga::LAYOUT_CHW_TO_HWC;
...@@ -60,7 +60,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> { ...@@ -60,7 +60,7 @@ class FeedOp : public framework::OperatorBase<DeviceType> {
args.image.pad_height = 0; args.image.pad_height = 0;
args.image.pad_width = 0; args.image.pad_width = 0;
args.output.address = output_ptr; args.output.address = output_ptr;
args.output.scale_address = out_address; args.output.scale_address = output_scale_address;
fpga::PerformBypass(args); fpga::PerformBypass(args);
} }
......
...@@ -62,23 +62,19 @@ class FusionElementwiseAddReluOp ...@@ -62,23 +62,19 @@ class FusionElementwiseAddReluOp
}; };
#ifdef PADDLE_MOBILE_CPU #ifdef PADDLE_MOBILE_CPU
/*
#ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER #ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER
static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( static framework::FusionOpRegistrar fusion_elementwise_relu_registrar(
new FusioneElementwiseAddReluMatcher()); new FusioneElementwiseAddReluMatcher());
#define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER
#endif #endif
*/
#endif #endif
#ifdef PADDLE_MOBILE_MALI_GPU #ifdef PADDLE_MOBILE_MALI_GPU
/*
#ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER #ifndef FUSION_ELEMENTWISE_ADD_RELU_REGISTER
static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( static framework::FusionOpRegistrar fusion_elementwise_relu_registrar(
new FusioneElementwiseAddReluMatcher()); new FusioneElementwiseAddReluMatcher());
#define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER
#endif #endif
*/
#endif #endif
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
...@@ -88,7 +84,6 @@ static framework::FusionOpRegistrar fusion_elementwise_relu_registrar( ...@@ -88,7 +84,6 @@ static framework::FusionOpRegistrar fusion_elementwise_relu_registrar(
#define FUSION_ELEMENTWISE_ADD_RELU_REGISTER #define FUSION_ELEMENTWISE_ADD_RELU_REGISTER
#endif #endif
#endif #endif
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
...@@ -66,30 +66,25 @@ class FusionFcOp : public framework::OperatorWithKernel< ...@@ -66,30 +66,25 @@ class FusionFcOp : public framework::OperatorWithKernel<
}; };
#ifdef PADDLE_MOBILE_CPU #ifdef PADDLE_MOBILE_CPU
#ifndef FUSION_FC_REGISTER
#ifndef FUSION_FC_CPU_REGISTER
#define FUSION_FC_CPU_REGISTER
static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#define FUSION_FC_REGISTER
#endif #endif
#endif #endif
#ifdef PADDLE_MOBILE_MALI_GPU #ifdef PADDLE_MOBILE_MALI_GPU
#ifndef FUSION_FC_REGISTER
#ifndef CONV_CPU_REGISTER
#define CONV_CPU_REGISTER
static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#define FUSION_FC_REGISTER
#endif #endif
#endif #endif
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
#ifndef FUSION_FC_CPU_REGISTER #ifndef FUSION_FC_REGISTER
#define FUSION_FC_CPU_REGISTER
static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#define FUSION_FC_REGISTER
#endif #endif
#endif #endif
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
...@@ -65,33 +65,28 @@ class FusionFcReluOp : public framework::OperatorWithKernel< ...@@ -65,33 +65,28 @@ class FusionFcReluOp : public framework::OperatorWithKernel<
}; };
#ifdef PADDLE_MOBILE_CPU #ifdef PADDLE_MOBILE_CPU
#ifndef FUSION_FC_RELU_REGISTER #ifndef FUSION_FC_RELU_REGISTER
#define FUSION_FC_RELU_REGISTER
static framework::FusionOpRegistrar fc_relu_registrar( static framework::FusionOpRegistrar fc_relu_registrar(
new FusionFcReluMatcher()); new FusionFcReluMatcher());
#define FUSION_FC_RELU_REGISTER
#endif #endif
#endif #endif
#ifdef PADDLE_MOBILE_MALI_GPU #ifdef PADDLE_MOBILE_MALI_GPU
#ifndef FUSION_FC_RELU_REGISTER #ifndef FUSION_FC_RELU_REGISTER
#define FUSION_FC_RELU_REGISTER
static framework::FusionOpRegistrar fc_relu_registrar( static framework::FusionOpRegistrar fc_relu_registrar(
new FusionFcReluMatcher()); new FusionFcReluMatcher());
#define FUSION_FC_RELU_REGISTER
#endif #endif
#endif #endif
#ifdef PADDLE_MOBILE_FPGA #ifdef PADDLE_MOBILE_FPGA
#ifndef FUSION_FC_RELU_REGISTER #ifndef FUSION_FC_RELU_REGISTER
#define FUSION_FC_RELU_REGISTER
static framework::FusionOpRegistrar fc_relu_registrar( static framework::FusionOpRegistrar fc_relu_registrar(
new FusionFcReluMatcher()); new FusionFcReluMatcher());
#define FUSION_FC_RELU_REGISTER
#endif #endif
#endif #endif
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册