Skip to content

Commit e42e1e8

Browse files
authored
Add version checking, test=op_version (#30129)
1 parent 31ed9a5 commit e42e1e8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

paddle/fluid/operators/pixel_shuffle_op.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ limitations under the License. */
1111

1212
#include "paddle/fluid/operators/pixel_shuffle_op.h"
1313
#include <memory>
14+
#include "paddle/fluid/framework/op_version_registry.h"
1415

1516
namespace paddle {
1617
namespace operators {
@@ -185,3 +186,10 @@ REGISTER_OP_CPU_KERNEL(
185186
pixel_shuffle_grad,
186187
ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, float>,
187188
ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, double>);
189+
190+
REGISTER_OP_VERSION(pixel_shuffle)
191+
.AddCheckpoint(
192+
R"ROC(
193+
Compatible upgrade of pixel_shuffle, add a new attribute [data_format])ROC",
194+
paddle::framework::compatible::OpVersionDesc().NewAttr(
195+
"data_format", "Specify the data format of the input data", true));

0 commit comments

Comments
 (0)