未验证 提交 893d37e5 编写于 作者: S ShenLiang 提交者: GitHub

Fix rank_attention op_version, test=op_version (#30006)

* fix rank_attention, test=op_version
上级 2bc5121d
...@@ -13,6 +13,7 @@ limitations under the License. */ ...@@ -13,6 +13,7 @@ limitations under the License. */
#include <memory> #include <memory>
#include <string> #include <string>
#include <vector> #include <vector>
#include "paddle/fluid/framework/op_version_registry.h"
namespace paddle { namespace paddle {
namespace operators { namespace operators {
...@@ -176,3 +177,18 @@ REGISTER_OP_CPU_KERNEL( ...@@ -176,3 +177,18 @@ REGISTER_OP_CPU_KERNEL(
rank_attention, rank_attention,
ops::RankAttentionKernel<paddle::platform::CPUDeviceContext, float>, ops::RankAttentionKernel<paddle::platform::CPUDeviceContext, float>,
ops::RankAttentionKernel<paddle::platform::CPUDeviceContext, double>); ops::RankAttentionKernel<paddle::platform::CPUDeviceContext, double>);
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));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册