diff --git a/src/operators/fetch_op.h b/src/operators/fetch_op.h index 59b9c46ed35c25feefe19f8e4a0d8a23b0dddcaf..4e313092ccb9121ebfc307afe1705de466cd6774 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