From 9c9eba13c3b7e5f59ed7a9d7ac260ca7e8c8b81e Mon Sep 17 00:00:00 2001 From: Jiawei Wang Date: Fri, 10 Sep 2021 11:14:47 +0800 Subject: [PATCH] fix extra op for expand, expand_as, tile, unstack (#35598) * fix extra op for expand, expand_as, tile, unstack * Update expand_v2_op.cc --- paddle/fluid/operators/expand_v2_op.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/paddle/fluid/operators/expand_v2_op.cc b/paddle/fluid/operators/expand_v2_op.cc index 3c2b939e799..dc6da979671 100644 --- a/paddle/fluid/operators/expand_v2_op.cc +++ b/paddle/fluid/operators/expand_v2_op.cc @@ -140,12 +140,14 @@ class ExpandV2OpMaker : public framework::OpProtoAndCheckerMaker { .SetDefault({}); 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(); AddComment(R"DOC( Expand the input to the given shape. The rank of X should be in [1, 6] and size of 'shape' must be in [1, 6] also. -- GitLab