From 295253a65cac3a4fb5adc890b2f53a78e005ae09 Mon Sep 17 00:00:00 2001 From: Double_V Date: Mon, 6 Sep 2021 13:48:01 +0800 Subject: [PATCH] add pool2d pool3d extra() (#35393) * add pool2d pool3d extra() * delete ceil_mode extra() * delete ceil_mode extra() * delete ceil_mode extra() * add extra to use_mkldnn --- paddle/fluid/operators/pool_op.cc | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/paddle/fluid/operators/pool_op.cc b/paddle/fluid/operators/pool_op.cc index feb47a73ee..03766ebb46 100644 --- a/paddle/fluid/operators/pool_op.cc +++ b/paddle/fluid/operators/pool_op.cc @@ -336,7 +336,8 @@ void Pool2dOpMaker::Make() { AddAttr( "use_cudnn", "(bool) Only used in cudnn kernel, need install cudnn. Default False") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr( "ceil_mode", "(bool) Whether to use the ceil function to calculate " @@ -345,17 +346,20 @@ void Pool2dOpMaker::Make() { .SetDefault(false); AddAttr("use_mkldnn", "(bool) Only used in mkldnn kernel. Default False") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr( "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(); AddAttr( "data_format", "(string, default NCHW) Only used in " @@ -366,7 +370,8 @@ void Pool2dOpMaker::Make() { 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(); AddAttr( "padding_algorithm", @@ -540,7 +545,8 @@ void Pool3dOpMaker::Make() { AddAttr( "use_cudnn", "(bool) Only used in cudnn kernel, need install cudnn. Default False") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr( "ceil_mode", "(bool) Whether to use the ceil function to calculate " @@ -549,7 +555,8 @@ void Pool3dOpMaker::Make() { .SetDefault(false); AddAttr("use_mkldnn", "(bool) Only used in mkldnn kernel. Default False") - .SetDefault(false); + .SetDefault(false) + .AsExtra(); AddAttr( "data_format", "(string, default NCDHW) Only used in " -- GitLab