From 714a837a24a9f303f3f3966d94cfcf1792f7be4e Mon Sep 17 00:00:00 2001 From: Yangrl <2535184404@qq.com> Date: Thu, 18 May 2023 06:25:38 +0000 Subject: [PATCH] test,test=develop --- paddle/phi/ops/compat/norm_sig.cc | 6 ++++-- paddle/phi/ops/compat/p_send_sig.cc | 3 ++- paddle/phi/ops/compat/pad_sig.cc | 3 ++- paddle/phi/ops/compat/pixel_unshuffle_sig.cc | 2 +- paddle/phi/ops/compat/pool_sig.cc | 14 +++++++++----- .../compat/pow2_decay_with_linear_warmup_sig.cc | 2 +- paddle/phi/ops/compat/prior_box_sig.cc | 3 ++- paddle/phi/ops/compat/psroi_pool_sig.cc | 2 +- paddle/phi/ops/compat/reduce_sig.cc | 14 +++++++------- paddle/phi/ops/compat/reshape_sig.cc | 4 ++-- paddle/phi/ops/compat/roi_align_sig.cc | 5 +++-- paddle/phi/ops/compat/roi_pool_sig.cc | 5 +++-- paddle/phi/ops/compat/rrelu_sig.cc | 5 +++-- paddle/phi/ops/compat/sequence_mask_sig.cc | 2 +- paddle/phi/ops/compat/sequence_pool_sig.cc | 4 ++-- paddle/phi/ops/compat/sync_batch_norm_sig.cc | 4 ++-- paddle/phi/ops/compat/transpose_sig.cc | 5 +++-- paddle/phi/ops/compat/tril_triu_sig.cc | 5 +++-- paddle/phi/tools/print_phi_kernels.cc | 2 +- 19 files changed, 52 insertions(+), 38 deletions(-) diff --git a/paddle/phi/ops/compat/norm_sig.cc b/paddle/phi/ops/compat/norm_sig.cc index b9e56f3d166d4f..6b3c5ecad4a5b3 100644 --- a/paddle/phi/ops/compat/norm_sig.cc +++ b/paddle/phi/ops/compat/norm_sig.cc @@ -16,12 +16,14 @@ namespace phi { -KernelSignature NormOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature NormOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "norm", {"X"}, {"axis", "epsilon", "is_test"}, {"Out", "Norm"}); } -KernelSignature NormGradOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature NormGradOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("norm_grad", {"X", "Norm", "Out@GRAD"}, {"axis", "epsilon", "is_test"}, diff --git a/paddle/phi/ops/compat/p_send_sig.cc b/paddle/phi/ops/compat/p_send_sig.cc index 48a5d72836988d..3a263d57aa1505 100644 --- a/paddle/phi/ops/compat/p_send_sig.cc +++ b/paddle/phi/ops/compat/p_send_sig.cc @@ -16,7 +16,8 @@ namespace phi { -KernelSignature PSendOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature PSendOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("p_send", {"x"}, {"peer", "dynamic_shape"}, {}); } diff --git a/paddle/phi/ops/compat/pad_sig.cc b/paddle/phi/ops/compat/pad_sig.cc index bb870eb256c9e0..d448fd85b5d56c 100644 --- a/paddle/phi/ops/compat/pad_sig.cc +++ b/paddle/phi/ops/compat/pad_sig.cc @@ -17,7 +17,8 @@ namespace phi { -KernelSignature PadGradOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature PadGradOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "pad_grad", {"Out@GRAD"}, {"paddings", "pad_value"}, {"X@GRAD"}); } diff --git a/paddle/phi/ops/compat/pixel_unshuffle_sig.cc b/paddle/phi/ops/compat/pixel_unshuffle_sig.cc index 817dc1a2288777..6c983c1e24c287 100644 --- a/paddle/phi/ops/compat/pixel_unshuffle_sig.cc +++ b/paddle/phi/ops/compat/pixel_unshuffle_sig.cc @@ -17,7 +17,7 @@ namespace phi { KernelSignature PixelUnshuffleGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pixel_unshuffle_grad", {"Out@GRAD"}, {"downscale_factor", "data_format"}, diff --git a/paddle/phi/ops/compat/pool_sig.cc b/paddle/phi/ops/compat/pool_sig.cc index 8bbb1d63c29ad5..9d5fda52cf2e32 100644 --- a/paddle/phi/ops/compat/pool_sig.cc +++ b/paddle/phi/ops/compat/pool_sig.cc @@ -16,7 +16,8 @@ namespace phi { -KernelSignature Pool2dOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature Pool2dOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pool2d", {"X"}, {"ksize", @@ -32,7 +33,8 @@ KernelSignature Pool2dOpArgumentMapping(const ArgumentMappingContext& ctx) { {"Out"}); } -KernelSignature Pool2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature Pool2dGradOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pool2d_grad", {"X", "Out", "Out@GRAD"}, {"ksize", @@ -49,7 +51,7 @@ KernelSignature Pool2dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature Pool2dDoubleGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pool2d_double_grad", {"X"}, {"ksize", @@ -65,7 +67,8 @@ KernelSignature Pool2dDoubleGradOpArgumentMapping( {"Out"}); } -KernelSignature Pool3dOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature Pool3dOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pool3d", {"X"}, {"ksize", @@ -81,7 +84,8 @@ KernelSignature Pool3dOpArgumentMapping(const ArgumentMappingContext& ctx) { {"Out"}); } -KernelSignature Pool3dGradOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature Pool3dGradOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pool3d_grad", {"X", "Out", "Out@GRAD"}, {"ksize", diff --git a/paddle/phi/ops/compat/pow2_decay_with_linear_warmup_sig.cc b/paddle/phi/ops/compat/pow2_decay_with_linear_warmup_sig.cc index 9a3323d90bff3e..cf35b6e9980958 100644 --- a/paddle/phi/ops/compat/pow2_decay_with_linear_warmup_sig.cc +++ b/paddle/phi/ops/compat/pow2_decay_with_linear_warmup_sig.cc @@ -17,7 +17,7 @@ namespace phi { KernelSignature Pow2DecayWithLinearWarmupOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("pow2_decay_with_linear_warmup", {"LearningRate", "Step"}, {"warmup_steps", "total_steps", "base_lr", "end_lr"}, diff --git a/paddle/phi/ops/compat/prior_box_sig.cc b/paddle/phi/ops/compat/prior_box_sig.cc index 47af77093a9a10..a8860246ca825a 100644 --- a/paddle/phi/ops/compat/prior_box_sig.cc +++ b/paddle/phi/ops/compat/prior_box_sig.cc @@ -16,7 +16,8 @@ namespace phi { -KernelSignature PriorBoxOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature PriorBoxOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("prior_box", {"Input", "Image"}, {"min_sizes", diff --git a/paddle/phi/ops/compat/psroi_pool_sig.cc b/paddle/phi/ops/compat/psroi_pool_sig.cc index df1dc1113cc184..f623f15f340ac5 100644 --- a/paddle/phi/ops/compat/psroi_pool_sig.cc +++ b/paddle/phi/ops/compat/psroi_pool_sig.cc @@ -25,7 +25,7 @@ KernelSignature PsroiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature PsroiPoolGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "psroi_pool_grad", {"X", "ROIs", "RoisNum", "Out@GRAD"}, diff --git a/paddle/phi/ops/compat/reduce_sig.cc b/paddle/phi/ops/compat/reduce_sig.cc index dc00897a559c42..a14745acb3de44 100644 --- a/paddle/phi/ops/compat/reduce_sig.cc +++ b/paddle/phi/ops/compat/reduce_sig.cc @@ -160,7 +160,7 @@ KernelSignature ReduceAllOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature ReduceSumGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("sum_grad", {"X", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -168,7 +168,7 @@ KernelSignature ReduceSumGradOpArgumentMapping( } KernelSignature ReduceMeanGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("mean_grad", {"X", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -176,7 +176,7 @@ KernelSignature ReduceMeanGradOpArgumentMapping( } KernelSignature ReduceMaxGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("max_grad", {"X", "Out", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -184,7 +184,7 @@ KernelSignature ReduceMaxGradOpArgumentMapping( } KernelSignature ReduceAMaxGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("amax_grad", {"X", "Out", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -192,7 +192,7 @@ KernelSignature ReduceAMaxGradOpArgumentMapping( } KernelSignature ReduceMinGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("min_grad", {"X", "Out", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -200,7 +200,7 @@ KernelSignature ReduceMinGradOpArgumentMapping( } KernelSignature ReduceAMinGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("amin_grad", {"X", "Out", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, @@ -208,7 +208,7 @@ KernelSignature ReduceAMinGradOpArgumentMapping( } KernelSignature ReduceProdGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("prod_grad", {"X", "Out", "Out@GRAD"}, {"dim", "keep_dim", "reduce_all"}, diff --git a/paddle/phi/ops/compat/reshape_sig.cc b/paddle/phi/ops/compat/reshape_sig.cc index 0c6937199c96ca..537088ef3302d4 100644 --- a/paddle/phi/ops/compat/reshape_sig.cc +++ b/paddle/phi/ops/compat/reshape_sig.cc @@ -38,12 +38,12 @@ KernelSignature ReshapeOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature ReshapeGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("reshape_grad", {"Out@GRAD"}, {}, {"X@GRAD"}); } KernelSignature ReshapeDoubleGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("reshape_double_grad", {"DOut", "DDX"}, {}, {"DDOut"}); } diff --git a/paddle/phi/ops/compat/roi_align_sig.cc b/paddle/phi/ops/compat/roi_align_sig.cc index 7279e82139bbc3..74665dde1b70be 100644 --- a/paddle/phi/ops/compat/roi_align_sig.cc +++ b/paddle/phi/ops/compat/roi_align_sig.cc @@ -16,7 +16,8 @@ namespace phi { -KernelSignature RoiAlignOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature RoiAlignOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("roi_align", {"X", "ROIs", "RoisNum"}, {"pooled_height", @@ -28,7 +29,7 @@ KernelSignature RoiAlignOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature RoiAlignGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("roi_align_grad", {"X", "ROIs", "RoisNum", "Out@GRAD"}, {"pooled_height", diff --git a/paddle/phi/ops/compat/roi_pool_sig.cc b/paddle/phi/ops/compat/roi_pool_sig.cc index 971b4b9d5bf320..2f010169ae72b1 100644 --- a/paddle/phi/ops/compat/roi_pool_sig.cc +++ b/paddle/phi/ops/compat/roi_pool_sig.cc @@ -16,7 +16,8 @@ namespace phi { -KernelSignature RoiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature RoiPoolOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("roi_pool", {"X", "ROIs", "RoisNum"}, {"pooled_height", "pooled_width", "spatial_scale"}, @@ -24,7 +25,7 @@ KernelSignature RoiPoolOpArgumentMapping(const ArgumentMappingContext& ctx) { } KernelSignature RoiPoolOpGradArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("roi_pool_grad", {"X", "ROIs", "RoisNum", "Argmax", "Out@GRAD"}, {"pooled_height", "pooled_width", "spatial_scale"}, diff --git a/paddle/phi/ops/compat/rrelu_sig.cc b/paddle/phi/ops/compat/rrelu_sig.cc index 00cd705a240769..18bda743e32555 100644 --- a/paddle/phi/ops/compat/rrelu_sig.cc +++ b/paddle/phi/ops/compat/rrelu_sig.cc @@ -16,13 +16,14 @@ namespace phi { -KernelSignature RReluOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature RReluOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "rrelu", {"X"}, {"lower", "upper", "is_test"}, {"Out", "Noise"}); } KernelSignature RReluGradGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "rrelu_grad", {"X", "Noise", "Out@GRAD"}, {}, {"X@GRAD"}); } diff --git a/paddle/phi/ops/compat/sequence_mask_sig.cc b/paddle/phi/ops/compat/sequence_mask_sig.cc index 93895e79f83afc..4ded422d8fdf51 100644 --- a/paddle/phi/ops/compat/sequence_mask_sig.cc +++ b/paddle/phi/ops/compat/sequence_mask_sig.cc @@ -14,7 +14,7 @@ limitations under the License. */ namespace phi { KernelSignature SequenceMaskOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "sequence_mask", {"X", "MaxLenTensor"}, {"maxlen", "out_dtype"}, {"Y"}); } diff --git a/paddle/phi/ops/compat/sequence_pool_sig.cc b/paddle/phi/ops/compat/sequence_pool_sig.cc index 224f83d1f32f9b..08ddea7c6cf79d 100644 --- a/paddle/phi/ops/compat/sequence_pool_sig.cc +++ b/paddle/phi/ops/compat/sequence_pool_sig.cc @@ -14,7 +14,7 @@ limitations under the License. */ namespace phi { KernelSignature SequencePoolOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("sequence_pool", {"X"}, {"is_test", "pooltype", "pad_value"}, @@ -22,7 +22,7 @@ KernelSignature SequencePoolOpArgumentMapping( } KernelSignature SequencePoolGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("sequence_pool_grad", {"X", "MaxIndex", "Out@GRAD"}, {"is_test", "pooltype", "pad_value"}, diff --git a/paddle/phi/ops/compat/sync_batch_norm_sig.cc b/paddle/phi/ops/compat/sync_batch_norm_sig.cc index 067d1905cf3770..b3fd99a4585957 100644 --- a/paddle/phi/ops/compat/sync_batch_norm_sig.cc +++ b/paddle/phi/ops/compat/sync_batch_norm_sig.cc @@ -17,7 +17,7 @@ namespace phi { KernelSignature SyncBatchNormOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("sync_batch_norm", {"X", "Mean", "Variance", "Scale", "Bias"}, {"is_test", @@ -35,7 +35,7 @@ KernelSignature SyncBatchNormOpArgumentMapping( } KernelSignature SyncBatchNormGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("sync_batch_norm_grad", { "X", diff --git a/paddle/phi/ops/compat/transpose_sig.cc b/paddle/phi/ops/compat/transpose_sig.cc index 0f2a3108ec9e69..ca5b76e1298a09 100644 --- a/paddle/phi/ops/compat/transpose_sig.cc +++ b/paddle/phi/ops/compat/transpose_sig.cc @@ -16,12 +16,13 @@ namespace phi { -KernelSignature TransposeOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature TransposeOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("transpose", {"X"}, {"axis"}, {"Out"}); } KernelSignature TransposeGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("transpose_grad", {"Out@GRAD"}, {"axis"}, {"X@GRAD"}); } diff --git a/paddle/phi/ops/compat/tril_triu_sig.cc b/paddle/phi/ops/compat/tril_triu_sig.cc index 3c5fa15b41cae0..e44684e14ffd22 100644 --- a/paddle/phi/ops/compat/tril_triu_sig.cc +++ b/paddle/phi/ops/compat/tril_triu_sig.cc @@ -16,12 +16,13 @@ limitations under the License. */ namespace phi { -KernelSignature TrilTriuOpArgumentMapping(const ArgumentMappingContext& ctx) { +KernelSignature TrilTriuOpArgumentMapping( + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature("tril_triu", {"X"}, {"diagonal", "lower"}, {"Out"}); } KernelSignature TrilTriuGradOpArgumentMapping( - const ArgumentMappingContext& ctx) { + const ArgumentMappingContext& ctx UNUSED) { return KernelSignature( "tril_triu_grad", {"Out@GRAD"}, {"diagonal", "lower"}, {"X@GRAD"}); } diff --git a/paddle/phi/tools/print_phi_kernels.cc b/paddle/phi/tools/print_phi_kernels.cc index 3cade0c5f1e339..0b79528139d0f6 100644 --- a/paddle/phi/tools/print_phi_kernels.cc +++ b/paddle/phi/tools/print_phi_kernels.cc @@ -18,7 +18,7 @@ #include "paddle/phi/core/kernel_registry.h" #include "paddle/phi/kernels/declarations.h" -int main(int argc, char** argv) { +int main(int argc UNUSED, char** argv UNUSED) { std::cout << phi::KernelFactory::Instance() << std::endl; return 0; }