diff --git a/paddle/function/GemmConvOp.cpp b/paddle/function/GemmConvOp.cpp index acf1415ebffe16c93109aa07e44aa3f47992dbe3..25cc3df6672d4f08383266e602bebd009e422bac 100644 --- a/paddle/function/GemmConvOp.cpp +++ b/paddle/function/GemmConvOp.cpp @@ -126,14 +126,11 @@ public: inputData += inputChannels * inputHeight * inputWidth; outputData += outputChannels * outputHeight * outputWidth; } -#ifdef PADDLE_MOBILE_INFERENCE - if (Device == DEVICE_TYPE_CPU) { - memory_.reset(); - } -#endif } }; +#ifdef PADDLE_MOBILE_INFERENCE + /* * \brief Forward calculation of convolution, optimized for mobile. */ @@ -284,6 +281,8 @@ public: } }; +#endif + /* * \brief Backward input calculation of convolution. */