未验证 提交 6ac4f0af 编写于 作者: G Guo Sheng 提交者: GitHub

Register op version for coalesce_tensor. (#29940)

test=develop
test=op_version
上级 a1d9a14e
......@@ -15,6 +15,7 @@
#include <sstream>
#include <vector>
#include "paddle/fluid/framework/op_registry.h"
#include "paddle/fluid/framework/op_version_registry.h"
#include "paddle/fluid/framework/operator.h"
#include "paddle/fluid/framework/var_type.h"
#include "paddle/fluid/operators/math/math_function.h"
......@@ -277,3 +278,14 @@ REGISTER_OP_CUDA_KERNEL(
ops::CoalesceTensorOpKernel<paddle::platform::CUDADeviceContext, float>,
ops::CoalesceTensorOpKernel<paddle::platform::CUDADeviceContext, double>);
#endif
REGISTER_OP_VERSION(coalesce_tensor)
.AddCheckpoint(
R"ROC(
Upgrade coalesce_tensor: add a new attribute [use_align].)ROC",
paddle::framework::compatible::OpVersionDesc().NewAttr(
"use_align",
"In order to optionally take memory alignment into account when "
"coalescing tensors. The default value is true to be compatible "
"with before.",
true));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册