提交 9ce3a516 编写于 作者: E eclipsycn 提交者: GitHub

Merge pull request #523 from codeWorm2015/develop

fix #522 update fusion register
...@@ -45,28 +45,6 @@ void FusionConvAddOp<Dtype, T>::InferShape() const { ...@@ -45,28 +45,6 @@ void FusionConvAddOp<Dtype, T>::InferShape() const {
this->param_.Output()->Resize(ddim); this->param_.Output()->Resize(ddim);
} }
#ifdef PADDLE_MOBILE_CPU
#ifndef CONV_ADD_REGISTER
framework::FusionOpRegistrar convadd_registrar(new FusionConvAddMatcher());
#define CONV_ADD_REGISTER
#endif
#endif
#ifdef PADDLE_MOBILE_MALI_GPU
#ifndef CONV_ADD_REGISTER
static framework::FusionOpRegistrar convadd_registrar(
new FusionConvAddMatcher());
#define CONV_ADD_REGISTER
#endif
#endif
#ifdef PADDLE_MOBILE_FPGA
#endif
template class FusionConvAddOp<CPU, float>; template class FusionConvAddOp<CPU, float>;
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
...@@ -69,7 +69,7 @@ class FusionConvAddOp : public framework::OperatorWithKernel< ...@@ -69,7 +69,7 @@ class FusionConvAddOp : public framework::OperatorWithKernel<
#ifdef PADDLE_MOBILE_CPU #ifdef PADDLE_MOBILE_CPU
#ifndef CONV_ADD_REGISTER #ifndef CONV_ADD_REGISTER
extern framework::FusionOpRegistrar convadd_registrar( static framework::FusionOpRegistrar convadd_registrar(
new FusionConvAddMatcher()); new FusionConvAddMatcher());
#define CONV_ADD_REGISTER #define CONV_ADD_REGISTER
#endif #endif
...@@ -82,6 +82,7 @@ extern framework::FusionOpRegistrar convadd_registrar( ...@@ -82,6 +82,7 @@ extern framework::FusionOpRegistrar convadd_registrar(
static framework::FusionOpRegistrar convadd_registrar( static framework::FusionOpRegistrar convadd_registrar(
new FusionConvAddMatcher()); new FusionConvAddMatcher());
#define CONV_ADD_REGISTER #define CONV_ADD_REGISTER
#endif #endif
#endif #endif
......
...@@ -50,27 +50,6 @@ void FusionFcOp<Dtype, T>::InferShape() const { ...@@ -50,27 +50,6 @@ void FusionFcOp<Dtype, T>::InferShape() const {
this->param_.Out()->Resize(ddim); this->param_.Out()->Resize(ddim);
} }
#ifdef PADDLE_MOBILE_CPU
#ifndef CONV_CPU_REGISTER
#define CONV_CPU_REGISTER
framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#endif
#endif
#ifdef PADDLE_MOBILE_MALI_GPU
#ifndef CONV_CPU_REGISTER
#define CONV_CPU_REGISTER
framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#endif
#endif
#ifdef PADDLE_MOBILE_FPGA
#endif
template class FusionFcOp<CPU, float>; template class FusionFcOp<CPU, float>;
} // namespace operators } // namespace operators
} // namespace paddle_mobile } // namespace paddle_mobile
......
...@@ -69,7 +69,7 @@ class FusionFcOp ...@@ -69,7 +69,7 @@ class FusionFcOp
#ifndef CONV_CPU_REGISTER #ifndef CONV_CPU_REGISTER
#define CONV_CPU_REGISTER #define CONV_CPU_REGISTER
extern framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#endif #endif
#endif #endif
...@@ -78,7 +78,7 @@ extern framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); ...@@ -78,7 +78,7 @@ extern framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#ifndef CONV_CPU_REGISTER #ifndef CONV_CPU_REGISTER
#define CONV_CPU_REGISTER #define CONV_CPU_REGISTER
extern framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher()); static framework::FusionOpRegistrar fc_registrar(new FusionFcMatcher());
#endif #endif
#endif #endif
......
...@@ -166,6 +166,7 @@ if (SCALE_OP) ...@@ -166,6 +166,7 @@ if (SCALE_OP)
endif() endif()
if (SLICE_OP) if (SLICE_OP)
add_definitions(-DSLICE_OP) add_definitions(-DSLICE_OP)
endif()
if (DROPOUT_OP) if (DROPOUT_OP)
add_definitions(-DDROPOUT_OP) add_definitions(-DDROPOUT_OP)
endif() endif()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册