From 42d36504b255e01cde1652349d08a2b69e940f9c Mon Sep 17 00:00:00 2001 From: zmx Date: Fri, 3 Sep 2021 14:07:50 +0800 Subject: [PATCH] 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 --- paddle/fluid/operators/concat_op.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/concat_op.cc b/paddle/fluid/operators/concat_op.cc index 6095516f92f..4783aa3a86f 100644 --- a/paddle/fluid/operators/concat_op.cc +++ b/paddle/fluid/operators/concat_op.cc @@ -111,7 +111,8 @@ class ConcatOpMaker : public framework::OpProtoAndCheckerMaker { AddAttr( "use_mkldnn", "(bool, default false) Indicates if MKL-DNN kernel will be used") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr("axis", "The axis along which the input tensors will be concatenated." "The axis could also be negative numbers. Negative axis is " @@ -128,12 +129,14 @@ class ConcatOpMaker : 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( "mkldnn_data_type", "(string, default \"float32\"). Data type of mkldnn kernel") .SetDefault("float32") - .InEnum({"float32", "int8", "bfloat16"}); + .InEnum({"float32", "int8", "bfloat16"}) + .AsExtra(); AddComment(R"DOC( Concat Operator. -- GitLab