From e42e1e80dcd92ce2c659afc21c598fec4ea57946 Mon Sep 17 00:00:00 2001 From: ruri Date: Fri, 8 Jan 2021 13:18:32 +0800 Subject: [PATCH] Add version checking, test=op_version (#30129) --- paddle/fluid/operators/pixel_shuffle_op.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/paddle/fluid/operators/pixel_shuffle_op.cc b/paddle/fluid/operators/pixel_shuffle_op.cc index 111a82c6cc..cb9bbe727d 100644 --- a/paddle/fluid/operators/pixel_shuffle_op.cc +++ b/paddle/fluid/operators/pixel_shuffle_op.cc @@ -11,6 +11,7 @@ limitations under the License. */ #include "paddle/fluid/operators/pixel_shuffle_op.h" #include +#include "paddle/fluid/framework/op_version_registry.h" namespace paddle { namespace operators { @@ -185,3 +186,10 @@ REGISTER_OP_CPU_KERNEL( pixel_shuffle_grad, ops::PixelShuffleGradOpKernel, ops::PixelShuffleGradOpKernel); + +REGISTER_OP_VERSION(pixel_shuffle) + .AddCheckpoint( + R"ROC( + Compatible upgrade of pixel_shuffle, add a new attribute [data_format])ROC", + paddle::framework::compatible::OpVersionDesc().NewAttr( + "data_format", "Specify the data format of the input data", true)); -- GitLab