From 648e3775dafdc446d7ecedbb4b6476bf850a1212 Mon Sep 17 00:00:00 2001 From: JYChen Date: Fri, 3 Sep 2021 10:35:26 +0800 Subject: [PATCH] add AsExtra() mark for layer_norm (#35415) --- paddle/fluid/operators/layer_norm_op.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/layer_norm_op.cc b/paddle/fluid/operators/layer_norm_op.cc index 42048ff3733..444478c2ead 100644 --- a/paddle/fluid/operators/layer_norm_op.cc +++ b/paddle/fluid/operators/layer_norm_op.cc @@ -179,16 +179,19 @@ class LayerNormOpMaker : public framework::OpProtoAndCheckerMaker { }); AddAttr("use_mkldnn", "(bool, default false) Only used in mkldnn kernel") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr( "mkldnn_data_type", "(string, default \"float32\"). Data type of mkldnn kernel") .SetDefault("float32") - .InEnum({"float32", "bfloat16"}); + .InEnum({"float32", "bfloat16"}) + .AsExtra(); AddAttr("is_test", "(bool, default false) Set to true for inference only, false " "for training. Some layers may run faster when this is true.") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddComment(R"DOC( Assume feature vectors exist on dimensions -- GitLab