Checkout point add (#28488)

* upgrade pass capability
TCChenlong-patch-1
wangchaochaohu 4 years ago committed by GitHub
parent 98dc11bb6a
commit d7cfee9b31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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));

@ -14,6 +14,7 @@ limitations under the License. */
#include "paddle/fluid/operators/fill_constant_op.h"
#include <string>
#include "paddle/fluid/framework/op_version_registry.h"
namespace paddle {
namespace operators {
@ -143,3 +144,12 @@ REGISTER_OP_CPU_KERNEL(fill_constant, ops::FillConstantKernel<float>,
ops::FillConstantKernel<int>,
ops::FillConstantKernel<bool>,
ops::FillConstantKernel<paddle::platform::float16>);
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"));

@ -171,6 +171,6 @@ REGISTER_OP_CPU_KERNEL(gather_grad, ops::GatherGradientOpKernel<float>,
ops::GatherGradientOpKernel<uint8_t>,
ops::GatherGradientOpKernel<int64_t>);
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."));

Loading…
Cancel
Save