diff --git a/paddle/fluid/framework/ir/squared_mat_sub_fuse_pass.cc b/paddle/fluid/framework/ir/squared_mat_sub_fuse_pass.cc index d74843611cdd238f1fb78153e6b946ae8a1c8473..542aadbe53d5e5da367fdd0433b9c1b570e52900 100644 --- a/paddle/fluid/framework/ir/squared_mat_sub_fuse_pass.cc +++ b/paddle/fluid/framework/ir/squared_mat_sub_fuse_pass.cc @@ -394,5 +394,5 @@ REGISTER_PASS_CAPABILITY(squared_mat_sub_fuse_pass) .EQ("square", 0) .EQ("elementwise_mul", 0) .EQ("elementwise_sub", 0) - .EQ("fill_constant", 0) + .EQ("fill_constant", 1) .EQ("fusion_squared_mat_sub", 0)); diff --git a/paddle/fluid/operators/fill_constant_op.cc b/paddle/fluid/operators/fill_constant_op.cc index 35d54577bfef88000cbd75607e68d35e72ac2a18..cc85c295965ba484943833a8a094bca1bd4fc867 100644 --- a/paddle/fluid/operators/fill_constant_op.cc +++ b/paddle/fluid/operators/fill_constant_op.cc @@ -14,6 +14,7 @@ limitations under the License. */ #include "paddle/fluid/operators/fill_constant_op.h" #include +#include "paddle/fluid/framework/op_version_registry.h" namespace paddle { namespace operators { @@ -143,3 +144,12 @@ REGISTER_OP_CPU_KERNEL(fill_constant, ops::FillConstantKernel, ops::FillConstantKernel, ops::FillConstantKernel, ops::FillConstantKernel); + +REGISTER_OP_VERSION(fill_constant) + .AddCheckpoint( + R"ROC( + Upgrade fill_constant, add a new input [ValueTensor]. + )ROC", + paddle::framework::compatible::OpVersionDesc().NewInput( + "ValueTensor", + "In order to support new feature tensor support of Value")); diff --git a/paddle/fluid/operators/gather_op.cc b/paddle/fluid/operators/gather_op.cc index 72b44b22f9c06060468c3ab9a11b18658082c716..34fd11e8c0d0d0a83698416145d9ea2e37a181ca 100644 --- a/paddle/fluid/operators/gather_op.cc +++ b/paddle/fluid/operators/gather_op.cc @@ -171,6 +171,6 @@ REGISTER_OP_CPU_KERNEL(gather_grad, ops::GatherGradientOpKernel, ops::GatherGradientOpKernel, ops::GatherGradientOpKernel); REGISTER_OP_VERSION(gather) - .AddCheckpoint(R"ROC(upgrad gather, add attribut [axis])ROC", - paddle::framework::compatible::OpVersionDesc().NewAttr( - "axis", "Specify the axis of gather operation.", {})); + .AddCheckpoint(R"ROC(upgrad gather, add a new input [Axis])ROC", + paddle::framework::compatible::OpVersionDesc().NewInput( + "Axis", "Specify the axis of gather operation."));