未验证 提交 e42e1e80 编写于 作者: R ruri 提交者: GitHub

Add version checking, test=op_version (#30129)

上级 31ed9a5e
...@@ -11,6 +11,7 @@ limitations under the License. */ ...@@ -11,6 +11,7 @@ limitations under the License. */
#include "paddle/fluid/operators/pixel_shuffle_op.h" #include "paddle/fluid/operators/pixel_shuffle_op.h"
#include <memory> #include <memory>
#include "paddle/fluid/framework/op_version_registry.h"
namespace paddle { namespace paddle {
namespace operators { namespace operators {
...@@ -185,3 +186,10 @@ REGISTER_OP_CPU_KERNEL( ...@@ -185,3 +186,10 @@ REGISTER_OP_CPU_KERNEL(
pixel_shuffle_grad, pixel_shuffle_grad,
ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, float>, ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, float>,
ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, double>); ops::PixelShuffleGradOpKernel<paddle::platform::CPUDeviceContext, double>);
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));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册