diff --git a/paddle/fluid/operators/save_op.cc b/paddle/fluid/operators/save_op.cc index 3277d09ab20ae64ada7f7a66220b286400d03753..b54bd7db36745a44b6e7deda38c3d0beafafa000 100644 --- a/paddle/fluid/operators/save_op.cc +++ b/paddle/fluid/operators/save_op.cc @@ -96,8 +96,8 @@ class SaveOp : public framework::OperatorBase { } } - SaveLodTensor(const std::string &filename, const platform::Place &place, - framework::Variable *var) { + void SaveLodTensor(const std::string &filename, const platform::Place &place, + framework::Variable *var) const { auto &tensor = var->Get(); // get device context from pool @@ -128,8 +128,9 @@ class SaveOp : public framework::OperatorBase { fout.close(); } - SaveSelectedRows(const std::string &filename, const platform::Place &place, - framework::Variable *var) { + void SaveSelectedRows(const std::string &filename, + const platform::Place &place, + framework::Variable *var) const { auto &selectedRows = var->Get(); // get device context from pool