未验证 提交 42d36504 编写于 作者: Z zmx 提交者: GitHub

add AsExtra to concat op (#35380)

add AsExtra to the  following attribute of concat op:
  1. use_mkldnn
  2. use_quantizer
  3. mkldnn_data_type
上级 6cdc1dc9
...@@ -111,7 +111,8 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -111,7 +111,8 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker {
AddAttr<bool>( AddAttr<bool>(
"use_mkldnn", "use_mkldnn",
"(bool, default false) Indicates if MKL-DNN kernel will be used") "(bool, default false) Indicates if MKL-DNN kernel will be used")
.SetDefault(false); .SetDefault(false)
.AsExtra();
AddAttr<int>("axis", AddAttr<int>("axis",
"The axis along which the input tensors will be concatenated." "The axis along which the input tensors will be concatenated."
"The axis could also be negative numbers. Negative axis is " "The axis could also be negative numbers. Negative axis is "
...@@ -128,12 +129,14 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker { ...@@ -128,12 +129,14 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker {
"use_quantizer", "use_quantizer",
"(bool, default false) " "(bool, default false) "
"This parameter is no longer used. Use 'mkldnn_data_type' instead.") "This parameter is no longer used. Use 'mkldnn_data_type' instead.")
.SetDefault(false); .SetDefault(false)
.AsExtra();
AddAttr<std::string>( AddAttr<std::string>(
"mkldnn_data_type", "mkldnn_data_type",
"(string, default \"float32\"). Data type of mkldnn kernel") "(string, default \"float32\"). Data type of mkldnn kernel")
.SetDefault("float32") .SetDefault("float32")
.InEnum({"float32", "int8", "bfloat16"}); .InEnum({"float32", "int8", "bfloat16"})
.AsExtra();
AddComment(R"DOC( AddComment(R"DOC(
Concat Operator. Concat Operator.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册