From ddcff254db1fcc2abdb204fc8c97e36d6721d54a Mon Sep 17 00:00:00 2001 From: channings Date: Mon, 4 Jan 2021 10:44:08 +0800 Subject: [PATCH] fix op_register_version for compare ops, test=op_version (#30007) Co-authored-by: zhoushunjie --- paddle/fluid/operators/controlflow/compare_op.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/controlflow/compare_op.cc b/paddle/fluid/operators/controlflow/compare_op.cc index 21c28f9818b..3cad86d96c2 100644 --- a/paddle/fluid/operators/controlflow/compare_op.cc +++ b/paddle/fluid/operators/controlflow/compare_op.cc @@ -133,9 +133,9 @@ class CompareOp : public framework::OperatorWithKernel { REGISTER_OP_VERSION(op_type) \ .AddCheckpoint( \ R"ROC(Upgrade compare ops, add a new attribute [force_cpu])ROC", \ - paddle::framework::compatible::OpVersionDesc().NewAttr( \ + paddle::framework::compatible::OpVersionDesc().ModifyAttr( \ "force_cpu", \ - "In order to force fill output variable to cpu memory.", \ + "In order to force fill output variable to gpu memory.", \ false)); #define REGISTER_COMPARE_OP(op_type, _equation) \ -- GitLab