From 109ef3eb5f9398f8c8a5685d30dbc45b54854f6c Mon Sep 17 00:00:00 2001 From: zhaojiaying01 Date: Wed, 17 Oct 2018 16:55:06 +0800 Subject: [PATCH] add PADDLE_MOBILE_CL macro in fetch_op.h --- src/operators/fetch_op.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/operators/fetch_op.h b/src/operators/fetch_op.h index 59b9c46ed3..4e313092cc 100644 --- a/src/operators/fetch_op.h +++ b/src/operators/fetch_op.h @@ -24,6 +24,7 @@ namespace operators { using std::string; template +#ifdef PADDLE_MOBILE_CL class FetchOp : public framework::OperatorWithKernel, FetchKernel> { @@ -34,12 +35,26 @@ class FetchOp : framework::OperatorWithKernel, FetchKernel>( type, inputs, outputs, attrs, scope) {} +#else +class FetchOp : public framework::OperatorBase { + public: + FetchOp(const string &type, const VariableNameMap &inputs, + const VariableNameMap &outputs, const framework::AttributeMap attrs, + std::shared_ptr scope) + : framework::OperatorBase(type, inputs, outputs, attrs, + scope), + param_(inputs, outputs, attrs, *scope) {} + void Init() {} +#endif void InferShape() const override; void RunImpl() override; protected: +#ifndef PADDLE_MOBILE_CL + FetchParam param_; +#endif }; } // namespace operators -- GitLab