diff --git a/paddle/fluid/operators/rank_attention_op.cc b/paddle/fluid/operators/rank_attention_op.cc index 460df0333f841953b4f2e506f67c04cb570dc927..d7490220da0a0cdd90726bfeeb3e00f042ec4dc1 100644 --- a/paddle/fluid/operators/rank_attention_op.cc +++ b/paddle/fluid/operators/rank_attention_op.cc @@ -13,6 +13,7 @@ limitations under the License. */ #include #include #include +#include "paddle/fluid/framework/op_version_registry.h" namespace paddle { namespace operators { @@ -176,3 +177,18 @@ REGISTER_OP_CPU_KERNEL( rank_attention, ops::RankAttentionKernel, ops::RankAttentionKernel); + +REGISTER_OP_VERSION(rank_attention) + .AddCheckpoint( + R"ROC( + Upgrade rank_attention, add 1 outputs [InputHelp] and 1 attribute + [MaxSize]. + )ROC", + paddle::framework::compatible::OpVersionDesc() + .NewOutput("InputHelp", + "Output tensor of rank_attention_Op operator " + "in order to assist calculation in the reverse process.") + .NewAttr( + "MaxSize", + "Forward calculation to set the pre-applied video memory size", + 0));