未验证 提交 6e93fb92 编写于 作者: Y yinhaofeng 提交者: GitHub

Register op version for linspace,test=op_version (#30025)

* Register op version for linspace,test=op_version

* Register op version for linspace,test=op_version

* Register op version for linspace,test=op_version

* Register op version for linspace,test=op_version

* Register op version for linspace,test=op_version
上级 9e51e383
......@@ -14,6 +14,7 @@ limitations under the License. */
#include "paddle/fluid/operators/linspace_op.h"
#include <string>
#include "paddle/fluid/framework/op_version_registry.h"
namespace paddle {
namespace operators {
......@@ -92,3 +93,11 @@ REGISTER_OP_CPU_KERNEL(linspace, ops::CPULinspaceKernel<float>,
ops::CPULinspaceKernel<int32_t>,
ops::CPULinspaceKernel<int64_t>,
ops::CPULinspaceKernel<double>);
REGISTER_OP_VERSION(linspace)
.AddCheckpoint(
R"ROC(
Upgrade linspace to add a new attribute [dtype].
)ROC",
paddle::framework::compatible::OpVersionDesc().NewAttr(
"dtype", "In order to change output data type ", 5));
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册