未验证 提交 70a9b652 编写于 作者: F feng_shuai 提交者: GitHub

transpose/slice/stride_slice/squeeze/unsqueeze op_def_enhance-1.0 (#35391)

* transpose/slice/stride_slice/squeeze/unsqueeze op_def_enhance-1.0

* delete infer_flags and decrease-axis

* delet infer_flags and decrea_axis
上级 295253a6
......@@ -238,12 +238,14 @@ class SliceOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault({});
AddAttr<bool>("use_mkldnn",
"(bool, default false) Only used in mkldnn kernel")
.SetDefault(false);
.SetDefault(false)
.AsExtra();
AddAttr<std::string>(
"mkldnn_data_type",
"(string, default \"float32\"). Data type of mkldnn kernel")
.SetDefault("float32")
.InEnum({"float32", "bfloat16"});
.InEnum({"float32", "bfloat16"})
.AsExtra();
AddComment(R"DOC(
Slice Operator.
......
......@@ -162,12 +162,14 @@ class SqueezeOpMaker : public framework::OpProtoAndCheckerMaker {
.SetDefault({});
AddAttr<bool>("use_mkldnn",
"(bool, default false) Only used in mkldnn kernel")
.SetDefault(false);
.SetDefault(false)
.AsExtra();
AddAttr<std::string>(
"mkldnn_data_type",
"(string, default \"float32\"). Data type of mkldnn kernel")
.SetDefault("float32")
.InEnum({"float32", "bfloat16"});
.InEnum({"float32", "bfloat16"})
.AsExtra();
AddComment(R"DOC(
Squeeze Operator.
......
......@@ -133,12 +133,14 @@ class TransposeOpMaker : public framework::OpProtoAndCheckerMaker {
"use_quantizer",
"(bool, default false) "
"This parameter is no longer used. Use 'mkldnn_data_type' instead.")
.SetDefault(false);
.SetDefault(false)
.AsExtra();
AddAttr<std::string>(
"mkldnn_data_type",
"(string, default \"float32\"). Data type of mkldnn kernel")
.SetDefault("float32")
.InEnum({"float32", "int8", "bfloat16"});
.InEnum({"float32", "int8", "bfloat16"})
.AsExtra();
/* int8 parameters */
AddComment(R"DOC(
Transpose Operator.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册