diff --git a/lite/kernels/x86/reduce_op_function.h b/lite/kernels/x86/reduce_op_function.h index adfe4668437cee4ec3ea24a25be91c1009918861..05785bf009791f07871b68f9dbfed5ff4a7c9984 100644 --- a/lite/kernels/x86/reduce_op_function.h +++ b/lite/kernels/x86/reduce_op_function.h @@ -65,7 +65,7 @@ void ReduceFunctor(const lite::Tensor& input, } else { auto te = strstr(typeid(Functor).name(), "SumFunctor"); if (D == 3 && R_D == 1 && te != NULL) { - lite::DDim input_dims = input.dims(); + const lite::DDim& input_dims = input.dims(); const T* input_data = input.data(); T* output_data = output->mutable_data(); for (int i = 0; i < input_dims[0]; i++) {