diff --git a/paddle/fluid/operators/lookup_table_op.cc b/paddle/fluid/operators/lookup_table_op.cc index 57425fe26218ba25f84cd3b78d7e9342677a3771..1b482235da54b1d47b461ee0586ee1f1794ff7c7 100644 --- a/paddle/fluid/operators/lookup_table_op.cc +++ b/paddle/fluid/operators/lookup_table_op.cc @@ -17,6 +17,7 @@ limitations under the License. */ #include #include "paddle/fluid/framework/no_need_buffer_vars_inference.h" +#include "paddle/fluid/framework/op_version_registry.h" #include "paddle/fluid/framework/var_type_inference.h" namespace paddle { @@ -224,3 +225,16 @@ REGISTER_OP_CPU_KERNEL(lookup_table, ops::LookupTableKernel, ops::LookupTableKernel); REGISTER_OP_CPU_KERNEL(lookup_table_grad, ops::LookupTableGradKernel, ops::LookupTableGradKernel); + +/* ========================== register checkpoint ===========================*/ + +REGISTER_OP_VERSION(lookup_table) + .AddCheckpoint( + R"ROC( + Upgrade lookup_table add 1 attribute [entry_config]. + )ROC", + paddle::framework::compatible::OpVersionDesc().NewAttr( + "entry_config", + "(std::string) embedding sparse feature entry config.", "")); + +/* ========================================================================== */