From fb6559aac37c976822ef3fb34f0a9cba8d0b00fe Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 01:19:25 +0800 Subject: [PATCH 01/11] 5.3 --- paddle/fluid/memory/allocation/aligned_allocator.cc | 6 ++++-- paddle/fluid/memory/allocation/aligned_allocator.h | 2 +- paddle/fluid/memory/allocation/allocator_facade.cc | 5 +++-- .../memory/allocation/auto_growth_best_fit_allocator.cc | 5 +++-- .../memory/allocation/auto_growth_best_fit_allocator.h | 2 +- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/memory/allocation/aligned_allocator.cc b/paddle/fluid/memory/allocation/aligned_allocator.cc index 141cf91258449..b32dfa1afd362 100644 --- a/paddle/fluid/memory/allocation/aligned_allocator.cc +++ b/paddle/fluid/memory/allocation/aligned_allocator.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/memory/allocation/aligned_allocator.h" +#include + #include "paddle/common/macros.h" #include "paddle/fluid/platform/enforce.h" @@ -39,8 +41,8 @@ class AlignedAllocation : public Allocation { }; AlignedAllocator::AlignedAllocator( - const std::shared_ptr& underlying_allocator, size_t alignment) - : underlying_allocator_(underlying_allocator), alignment_(alignment) { + std::shared_ptr underlying_allocator, size_t alignment) + : underlying_allocator_(std::move(underlying_allocator)), alignment_(alignment) { PADDLE_ENFORCE_GT( alignment_, 0, diff --git a/paddle/fluid/memory/allocation/aligned_allocator.h b/paddle/fluid/memory/allocation/aligned_allocator.h index b129249a673bd..ff0ab8085dee1 100644 --- a/paddle/fluid/memory/allocation/aligned_allocator.h +++ b/paddle/fluid/memory/allocation/aligned_allocator.h @@ -24,7 +24,7 @@ namespace allocation { class AlignedAllocator : public Allocator { public: - AlignedAllocator(const std::shared_ptr& underlying_allocator, + AlignedAllocator(std::shared_ptr underlying_allocator, size_t alignment); bool IsAllocThreadSafe() const override; diff --git a/paddle/fluid/memory/allocation/allocator_facade.cc b/paddle/fluid/memory/allocation/allocator_facade.cc index d1f627070f4e9..89ef60c724aa2 100644 --- a/paddle/fluid/memory/allocation/allocator_facade.cc +++ b/paddle/fluid/memory/allocation/allocator_facade.cc @@ -31,6 +31,7 @@ #if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP) #include +#include #include "paddle/fluid/memory/allocation/cuda_allocator.h" #include "paddle/fluid/memory/allocation/cuda_managed_allocator.h" @@ -141,8 +142,8 @@ class CUDAGraphAllocator DecoratedAllocationPtr underlying_allocation_; }; - explicit CUDAGraphAllocator(const std::shared_ptr& allocator) - : underlying_allocator_(allocator) {} + explicit CUDAGraphAllocator(std::shared_ptr allocator) + : underlying_allocator_(std::move(allocator)) {} public: ~CUDAGraphAllocator() override = default; diff --git a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc index 2dcc1295fec25..0d4ddca4f237e 100644 --- a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc +++ b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.cc @@ -16,6 +16,7 @@ #include #include // NOLINT +#include #include "paddle/fluid/memory/allocation/aligned_allocator.h" #include "paddle/fluid/platform/flags.h" @@ -46,12 +47,12 @@ namespace memory { namespace allocation { AutoGrowthBestFitAllocator::AutoGrowthBestFitAllocator( - const std::shared_ptr &underlying_allocator, + std::shared_ptr underlying_allocator, size_t alignment, size_t chunk_size, bool allow_free_idle_chunk, int extra_padding_size) - : underlying_allocator_(underlying_allocator), + : underlying_allocator_(std::move(underlying_allocator)), alignment_(alignment), chunk_size_(std::max(AlignedSize(chunk_size, alignment), alignment)), allow_free_idle_chunk_(allow_free_idle_chunk), diff --git a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h index 572ca695cef9a..24fcc2f8d4c27 100644 --- a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h +++ b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h @@ -30,7 +30,7 @@ namespace allocation { class AutoGrowthBestFitAllocator : public Allocator { public: AutoGrowthBestFitAllocator( - const std::shared_ptr &underlying_allocator, + std::shared_ptr underlying_allocator, size_t alignment, size_t chunk_size = 0, bool allow_free_idle_chunk = true, From cc6b6f17f353538fffd18982a64e82f7534ec5cc Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 12:45:32 +0800 Subject: [PATCH 02/11] 5.3 --- paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc | 6 ++++-- paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h | 2 +- paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc | 6 ++++-- paddle/fluid/pir/dialect/operator/ir/ir_tensor.h | 2 +- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc index 384560ef591fc..ec7c665b4da5a 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc +++ b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc @@ -13,6 +13,8 @@ // limitations under the License. #include "paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h" + +#include #include "paddle/common/enforce.h" namespace paddle { @@ -20,9 +22,9 @@ namespace dialect { IrSelectedRows::IrSelectedRows(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - const LoD& lod, + LoD lod, size_t offset) - : dims_(dims), dtype_(dtype), layout_(layout), lod_(lod), offset_(offset) {} + : dims_(dims), dtype_(dtype), layout_(layout), lod_(std::move(lod)), offset_(offset) {} IrSelectedRows::IrSelectedRows(const IrSelectedRows& other) { dims_ = other.dims(); diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h index 856ddb2f7542c..d409a5e81bc53 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h +++ b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h @@ -34,7 +34,7 @@ class IrSelectedRows IrSelectedRows(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - const LoD& lod, + LoD lod, size_t offset = 0); IrSelectedRows(IrSelectedRows&& other) = default; diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc index 131a8b1848bd4..943e6dab97373 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc +++ b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/dialect/operator/ir/ir_tensor.h" +#include + #include "paddle/common/enforce.h" namespace paddle { @@ -21,9 +23,9 @@ namespace dialect { IrTensor::IrTensor(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - const LoD& lod, + LoD lod, size_t offset) - : dims_(dims), dtype_(dtype), layout_(layout), lod_(lod), offset_(offset) {} + : dims_(dims), dtype_(dtype), layout_(layout), lod_(std::move(lod)), offset_(offset) {} IrTensor::IrTensor(const IrTensor& other) { dims_ = other.dims(); diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h index 45847d3080387..8c18f636b1759 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h +++ b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h @@ -33,7 +33,7 @@ class IrTensor : public phi::TensorBase, IrTensor(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - const LoD& lod, + LoD lod, size_t offset = 0); IrTensor(IrTensor&& other) = default; From ea822dad2c29fc348b0bac4165b0085052f65ee3 Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 16:21:40 +0800 Subject: [PATCH 03/11] 5.3 --- .../pir/dialect/operator/utils/op_yaml_info_parser.cc | 6 ++++-- .../fluid/pir/dialect/operator/utils/op_yaml_info_parser.h | 2 +- paddle/fluid/pir/drr/include/drr_rewrite_pattern.h | 2 +- paddle/fluid/pir/drr/src/match_context.cc | 3 ++- paddle/fluid/pir/drr/src/rewrite_pattern.cc | 7 ++++--- 5 files changed, 12 insertions(+), 8 deletions(-) diff --git a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc index aeecd67bcf920..4019bb846fab2 100644 --- a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc +++ b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc @@ -13,14 +13,16 @@ // limitations under the License. #include "paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h" + +#include #include "paddle/phi/core/enforce.h" namespace paddle { namespace dialect { -OpYamlInfoParser::OpYamlInfoParser(const OpInfoTuple& op_info_tuple, +OpYamlInfoParser::OpYamlInfoParser(OpInfoTuple op_info_tuple, bool is_legacy_op) - : op_info_tuple_(op_info_tuple), is_legacy_op_(is_legacy_op) { + : op_info_tuple_(std::move(op_info_tuple)), is_legacy_op_(is_legacy_op) { parse(); } diff --git a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h index 4ff03f336dae2..aca025625eabc 100644 --- a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h +++ b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h @@ -23,7 +23,7 @@ class OpYamlInfoParser { public: OpYamlInfoParser() = delete; - TEST_API explicit OpYamlInfoParser(const OpInfoTuple& op_info_tuple, + TEST_API explicit OpYamlInfoParser(OpInfoTuple op_info_tuple, bool is_legacy_op = false); TEST_API bool IsTensorAttribute(size_t index) const; diff --git a/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h b/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h index 5778263750e5e..93a0bdd45b225 100644 --- a/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h +++ b/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h @@ -44,7 +44,7 @@ class DrrRewritePattern : public pir::RewritePattern { const DrrPatternContext& drr_context, pir::IrContext* context, pir::PatternBenefit benefit, - const std::shared_ptr& drr_pattern_owner); + std::shared_ptr drr_pattern_owner); bool MatchAndRewrite( pir::Operation* op, diff --git a/paddle/fluid/pir/drr/src/match_context.cc b/paddle/fluid/pir/drr/src/match_context.cc index 64d8ed588484a..572f75c43e9e5 100644 --- a/paddle/fluid/pir/drr/src/match_context.cc +++ b/paddle/fluid/pir/drr/src/match_context.cc @@ -13,6 +13,7 @@ // limitations under the License. #include +#include #include "paddle/fluid/pir/drr/include/drr_match_context.h" #include "paddle/fluid/pir/drr/src/match_context_impl.h" @@ -22,7 +23,7 @@ namespace paddle { namespace drr { MatchContext::MatchContext(std::shared_ptr impl) - : impl_(impl) {} + : impl_(std::move(impl)) {} const pir::Value& MatchContext::Tensor(const std::string& tensor_name) const { return impl_->Tensor(tensor_name); diff --git a/paddle/fluid/pir/drr/src/rewrite_pattern.cc b/paddle/fluid/pir/drr/src/rewrite_pattern.cc index 7752881b76697..d8a4d168fc8bd 100644 --- a/paddle/fluid/pir/drr/src/rewrite_pattern.cc +++ b/paddle/fluid/pir/drr/src/rewrite_pattern.cc @@ -14,6 +14,7 @@ #include #include +#include #include "glog/vlog_is_on.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -33,7 +34,7 @@ DrrRewritePattern::DrrRewritePattern( const DrrPatternContext& drr_context, pir::IrContext* context, pir::PatternBenefit benefit, - const std::shared_ptr& drr_pattern_owner) + std::shared_ptr drr_pattern_owner) : pir::RewritePattern( (*drr_context.source_pattern_graph()->OutputNodes().begin())->name(), benefit, @@ -44,7 +45,7 @@ DrrRewritePattern::DrrRewritePattern( constraints_(drr_context.constraints()), post_processes_(drr_context.post_processes()), result_pattern_graph_(drr_context.result_pattern_graph()), - drr_pattern_owner_(drr_pattern_owner) { + drr_pattern_owner_(std::move(drr_pattern_owner)) { PADDLE_ENFORCE_NE(source_pattern_graph_->owned_op_call().empty(), true, phi::errors::InvalidArgument( @@ -544,7 +545,7 @@ MatchContextImpl DrrRewritePattern::CreateOperations( size_t new_max_input_op_index = max_input_op_index + 1; op_2_temp_program_index[new_op] = new_max_input_op_index; if (new_max_input_op_index >= temp_program.size()) { - temp_program.emplace_back(); + temp_program.push_back({}); } temp_program[new_max_input_op_index].push_back(new_op); }); From 65dd98714edf1632504b95550c341a1a8f2ab1ce Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 19:09:11 +0800 Subject: [PATCH 04/11] 5.3 --- .../transforms/gpu/fused_weight_only_linear_pass.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc b/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc index f6c312fa7a8d3..29ea7b4d567cc 100644 --- a/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc +++ b/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" #include "paddle/fluid/pir/utils/general_functions.h" @@ -46,9 +48,9 @@ class FusedWeightOnlyLinearWithBiasPattern public: FusedWeightOnlyLinearWithBiasPattern(bool reverse_add, - const std::string &algo, + std::string algo, int sm_version) - : reverse_add_(reverse_add), algo_(algo), sm_version_(sm_version) {} + : reverse_add_(reverse_add), algo_(std::move(algo)), sm_version_(sm_version) {} std::string name() const override { return "FusedWeightOnlyLinearWithBiasPattern"; @@ -165,8 +167,8 @@ class FusedWeightOnlyLinearNoBiasPattern : public paddle::drr::DrrPatternBase { int sm_version_; public: - FusedWeightOnlyLinearNoBiasPattern(const std::string &algo, int sm_version) - : algo_(algo), sm_version_(sm_version) {} + FusedWeightOnlyLinearNoBiasPattern(std::string algo, int sm_version) + : algo_(std::move(algo)), sm_version_(sm_version) {} public: std::string name() const override { From 8d6310dd2367d93ed3bd10973201f2f3b5d1c13c Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 19:18:23 +0800 Subject: [PATCH 05/11] 5.3 --- paddle/fluid/pir/drr/src/rewrite_pattern.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/pir/drr/src/rewrite_pattern.cc b/paddle/fluid/pir/drr/src/rewrite_pattern.cc index d8a4d168fc8bd..a062864f74747 100644 --- a/paddle/fluid/pir/drr/src/rewrite_pattern.cc +++ b/paddle/fluid/pir/drr/src/rewrite_pattern.cc @@ -545,7 +545,7 @@ MatchContextImpl DrrRewritePattern::CreateOperations( size_t new_max_input_op_index = max_input_op_index + 1; op_2_temp_program_index[new_op] = new_max_input_op_index; if (new_max_input_op_index >= temp_program.size()) { - temp_program.push_back({}); + temp_program.emplace_back(); } temp_program[new_max_input_op_index].push_back(new_op); }); From de5133499aba675935d311fb6e5cb49fe352bd5d Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Fri, 3 May 2024 23:40:10 +0800 Subject: [PATCH 06/11] 5.3 --- .../onednn/batch_norm_act_fuse_pass.cc | 8 +++--- .../conv_activation_onednn_fuse_pass.cc | 14 +++++----- .../transforms/onednn/conv_bias_fuse_pass.cc | 8 +++--- ...conv_concat_activation_onednn_fuse_pass.cc | 18 +++++++------ .../conv_elementwise_add_onednn_fuse_pass.cc | 26 ++++++++++--------- 5 files changed, 42 insertions(+), 32 deletions(-) diff --git a/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc index 7a03a431af64b..3b4acca3548a9 100644 --- a/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -29,9 +31,9 @@ class BatchNormActFusePattern : public paddle::drr::DrrPatternBase { std::string fused_bn_name_; public: - BatchNormActFusePattern(const std::string &bn_name, - const std::string &fused_bn_name) - : bn_name_(bn_name), fused_bn_name_(fused_bn_name) {} + BatchNormActFusePattern(std::string bn_name, + std::string fused_bn_name) + : bn_name_(std::move(bn_name)), fused_bn_name_(std::move(fused_bn_name)) {} std::string name() const override { return "BatchNormActFusePattern"; } diff --git a/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc index d7d1d4286159e..de36bb530e342 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -38,10 +40,10 @@ class ConvActivationFusePattern : public paddle::drr::DrrPatternBase { public: ConvActivationFusePattern(size_t activation_count, - const std::string &activation_name, + std::string activation_name, int fused_level) : activation_count_(activation_count), - activation_name_(activation_name), + activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { @@ -224,8 +226,8 @@ class ConvGeluFusePattern : public paddle::drr::DrrPatternBase { const int fused_level_; public: - ConvGeluFusePattern(const std::string &activation_name, int fused_level) - : activation_name_(activation_name), fused_level_(fused_level) {} + ConvGeluFusePattern(std::string activation_name, int fused_level) + : activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { return "ConvGeluFusePattern"; } @@ -367,8 +369,8 @@ class ConvClipFusePattern : public paddle::drr::DrrPatternBase { const int fused_level_; public: - ConvClipFusePattern(const std::string &activation_name, int fused_level) - : activation_name_(activation_name), fused_level_(fused_level) {} + ConvClipFusePattern(std::string activation_name, int fused_level) + : activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { return "ConvClipFusePattern"; } diff --git a/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc index d4bd9a9c2e56a..7df0f2e2e7e9a 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -30,9 +32,9 @@ class ConvBiasFusePattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - ConvBiasFusePattern(const std::string &conv_name, - const std::string &fused_conv_name) - : conv_name_(conv_name), fused_conv_name_(fused_conv_name) {} + ConvBiasFusePattern(std::string conv_name, + std::string fused_conv_name) + : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvBiasFusePattern"; } diff --git a/paddle/fluid/pir/transforms/onednn/conv_concat_activation_onednn_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_concat_activation_onednn_fuse_pass.cc index 910a78dcdd84c..53f456e477f8f 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_concat_activation_onednn_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_concat_activation_onednn_fuse_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/onednn/conv_concat_activation_onednn_fuse_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -38,11 +40,11 @@ class NConvConcatActivationFusePattern : public paddle::drr::DrrPatternBase { public: NConvConcatActivationFusePattern(size_t concat_count, - const std::string &activation_name, + std::string activation_name, int fused_level, int benefit) : concat_count_(concat_count), - activation_name_(activation_name), + activation_name_(std::move(activation_name)), fused_level_(fused_level), benefit_(benefit) {} @@ -293,10 +295,10 @@ class NConvConcatHardSigmoidFusePattern : public paddle::drr::DrrPatternBase { public: NConvConcatHardSigmoidFusePattern(size_t concat_count, - const std::string &activation_name, + std::string activation_name, int fused_level) : concat_count_(concat_count), - activation_name_(activation_name), + activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { @@ -512,10 +514,10 @@ class NConvConcatGeluFusePattern : public paddle::drr::DrrPatternBase { public: NConvConcatGeluFusePattern(size_t concat_count, - const std::string &activation_name, + std::string activation_name, int fused_level) : concat_count_(concat_count), - activation_name_(activation_name), + activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { @@ -737,10 +739,10 @@ class NConvConcatClipFusePattern : public paddle::drr::DrrPatternBase { public: NConvConcatClipFusePattern(size_t concat_count, - const std::string &activation_name, + std::string activation_name, int fused_level) : concat_count_(concat_count), - activation_name_(activation_name), + activation_name_(std::move(activation_name)), fused_level_(fused_level) {} std::string name() const override { diff --git a/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc index 5a1af48a55726..5e62d75215647 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc @@ -14,6 +14,8 @@ #include "paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.h" +#include + #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -30,9 +32,9 @@ class ConvElementwiseAddPattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - ConvElementwiseAddPattern(const std::string &conv_name, - const std::string &fused_conv_name) - : conv_name_(conv_name), fused_conv_name_(fused_conv_name) {} + ConvElementwiseAddPattern(std::string conv_name, + std::string fused_conv_name) + : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvElementwiseAddPattern"; } @@ -109,9 +111,9 @@ class ConvElementwiseAddAsYPattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - ConvElementwiseAddAsYPattern(const std::string &conv_name, - const std::string &fused_conv_name) - : conv_name_(conv_name), fused_conv_name_(fused_conv_name) {} + ConvElementwiseAddAsYPattern(std::string conv_name, + std::string fused_conv_name) + : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvElementwiseAddAsYPattern"; } @@ -188,9 +190,9 @@ class FusedConvBiasElementwiseAddPattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - FusedConvBiasElementwiseAddPattern(const std::string &conv_name, - const std::string &fused_conv_name) - : conv_name_(conv_name), fused_conv_name_(fused_conv_name) {} + FusedConvBiasElementwiseAddPattern(std::string conv_name, + std::string fused_conv_name) + : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "FusedConvBiasElementwiseAddPattern"; @@ -284,9 +286,9 @@ class FusedConvBiasElementwiseAddAsYPattern std::string fused_conv_name_; public: - FusedConvBiasElementwiseAddAsYPattern(const std::string &conv_name, - const std::string &fused_conv_name) - : conv_name_(conv_name), fused_conv_name_(fused_conv_name) {} + FusedConvBiasElementwiseAddAsYPattern(std::string conv_name, + std::string fused_conv_name) + : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "FusedConvBiasElementwiseAddAsYPattern"; From 1845c325ca7b0f38c1502fe45c30195a2486ef0c Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Sun, 5 May 2024 22:21:22 +0800 Subject: [PATCH 07/11] 5.5 --- .../pir/transforms/onednn/batch_norm_act_fuse_pass.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc index 3b4acca3548a9..7a03a431af64b 100644 --- a/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.cc @@ -14,8 +14,6 @@ #include "paddle/fluid/pir/transforms/onednn/batch_norm_act_fuse_pass.h" -#include - #include "paddle/fluid/pir/dialect/operator/ir/onednn_op.h" #include "paddle/fluid/pir/dialect/operator/ir/pd_op.h" #include "paddle/fluid/pir/drr/include/drr_pattern_base.h" @@ -31,9 +29,9 @@ class BatchNormActFusePattern : public paddle::drr::DrrPatternBase { std::string fused_bn_name_; public: - BatchNormActFusePattern(std::string bn_name, - std::string fused_bn_name) - : bn_name_(std::move(bn_name)), fused_bn_name_(std::move(fused_bn_name)) {} + BatchNormActFusePattern(const std::string &bn_name, + const std::string &fused_bn_name) + : bn_name_(bn_name), fused_bn_name_(fused_bn_name) {} std::string name() const override { return "BatchNormActFusePattern"; } From 66d52316b35ad4ef866003389fe978d759e0a677 Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Tue, 7 May 2024 13:46:03 +0800 Subject: [PATCH 08/11] 5.7 --- .../fluid/memory/allocation/aligned_allocator.cc | 5 +++-- .../fluid/memory/allocation/aligned_allocator.h | 2 +- .../fluid/memory/allocation/allocator_facade.cc | 2 +- .../allocation/auto_growth_best_fit_allocator.h | 11 +++++------ .../pir/dialect/operator/ir/ir_selected_rows.cc | 8 ++++++-- .../pir/dialect/operator/ir/ir_selected_rows.h | 2 +- paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc | 8 ++++++-- paddle/fluid/pir/dialect/operator/ir/ir_tensor.h | 2 +- .../dialect/operator/utils/op_yaml_info_parser.cc | 3 +-- .../dialect/operator/utils/op_yaml_info_parser.h | 2 +- .../fluid/pir/drr/include/drr_rewrite_pattern.h | 11 +++++------ paddle/fluid/pir/drr/src/rewrite_pattern.cc | 2 +- .../gpu/fused_weight_only_linear_pass.cc | 4 +++- .../onednn/conv_activation_onednn_fuse_pass.cc | 6 ++++-- .../pir/transforms/onednn/conv_bias_fuse_pass.cc | 6 +++--- .../conv_elementwise_add_onednn_fuse_pass.cc | 15 +++++++++------ 16 files changed, 51 insertions(+), 38 deletions(-) diff --git a/paddle/fluid/memory/allocation/aligned_allocator.cc b/paddle/fluid/memory/allocation/aligned_allocator.cc index b32dfa1afd362..5c1757d705cc0 100644 --- a/paddle/fluid/memory/allocation/aligned_allocator.cc +++ b/paddle/fluid/memory/allocation/aligned_allocator.cc @@ -41,8 +41,9 @@ class AlignedAllocation : public Allocation { }; AlignedAllocator::AlignedAllocator( - std::shared_ptr underlying_allocator, size_t alignment) - : underlying_allocator_(std::move(underlying_allocator)), alignment_(alignment) { + std::shared_ptr underlying_allocator, size_t alignment) + : underlying_allocator_(std::move(underlying_allocator)), + alignment_(alignment) { PADDLE_ENFORCE_GT( alignment_, 0, diff --git a/paddle/fluid/memory/allocation/aligned_allocator.h b/paddle/fluid/memory/allocation/aligned_allocator.h index ff0ab8085dee1..5dc15646e8856 100644 --- a/paddle/fluid/memory/allocation/aligned_allocator.h +++ b/paddle/fluid/memory/allocation/aligned_allocator.h @@ -24,7 +24,7 @@ namespace allocation { class AlignedAllocator : public Allocator { public: - AlignedAllocator(std::shared_ptr underlying_allocator, + AlignedAllocator(std::shared_ptr underlying_allocator, size_t alignment); bool IsAllocThreadSafe() const override; diff --git a/paddle/fluid/memory/allocation/allocator_facade.cc b/paddle/fluid/memory/allocation/allocator_facade.cc index 89ef60c724aa2..158c56d7f94f6 100644 --- a/paddle/fluid/memory/allocation/allocator_facade.cc +++ b/paddle/fluid/memory/allocation/allocator_facade.cc @@ -142,7 +142,7 @@ class CUDAGraphAllocator DecoratedAllocationPtr underlying_allocation_; }; - explicit CUDAGraphAllocator(std::shared_ptr allocator) + explicit CUDAGraphAllocator(std::shared_ptr allocator) : underlying_allocator_(std::move(allocator)) {} public: diff --git a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h index 24fcc2f8d4c27..112555bfe4118 100644 --- a/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h +++ b/paddle/fluid/memory/allocation/auto_growth_best_fit_allocator.h @@ -29,12 +29,11 @@ namespace allocation { class AutoGrowthBestFitAllocator : public Allocator { public: - AutoGrowthBestFitAllocator( - std::shared_ptr underlying_allocator, - size_t alignment, - size_t chunk_size = 0, - bool allow_free_idle_chunk = true, - int extra_padding_size = 0); + AutoGrowthBestFitAllocator(std::shared_ptr underlying_allocator, + size_t alignment, + size_t chunk_size = 0, + bool allow_free_idle_chunk = true, + int extra_padding_size = 0); bool IsAllocThreadSafe() const override { return true; } diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc index ec7c665b4da5a..3e191ff4d2fec 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc +++ b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.cc @@ -22,9 +22,13 @@ namespace dialect { IrSelectedRows::IrSelectedRows(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - LoD lod, + LoD lod, size_t offset) - : dims_(dims), dtype_(dtype), layout_(layout), lod_(std::move(lod)), offset_(offset) {} + : dims_(dims), + dtype_(dtype), + layout_(layout), + lod_(std::move(lod)), + offset_(offset) {} IrSelectedRows::IrSelectedRows(const IrSelectedRows& other) { dims_ = other.dims(); diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h index d409a5e81bc53..dd41a7467a78d 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h +++ b/paddle/fluid/pir/dialect/operator/ir/ir_selected_rows.h @@ -34,7 +34,7 @@ class IrSelectedRows IrSelectedRows(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - LoD lod, + LoD lod, size_t offset = 0); IrSelectedRows(IrSelectedRows&& other) = default; diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc index 943e6dab97373..07849efab963a 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc +++ b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.cc @@ -23,9 +23,13 @@ namespace dialect { IrTensor::IrTensor(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - LoD lod, + LoD lod, size_t offset) - : dims_(dims), dtype_(dtype), layout_(layout), lod_(std::move(lod)), offset_(offset) {} + : dims_(dims), + dtype_(dtype), + layout_(layout), + lod_(std::move(lod)), + offset_(offset) {} IrTensor::IrTensor(const IrTensor& other) { dims_ = other.dims(); diff --git a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h index 8c18f636b1759..7d58bb63e5586 100644 --- a/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h +++ b/paddle/fluid/pir/dialect/operator/ir/ir_tensor.h @@ -33,7 +33,7 @@ class IrTensor : public phi::TensorBase, IrTensor(phi::DataType dtype, const phi::DDim& dims, phi::DataLayout layout, - LoD lod, + LoD lod, size_t offset = 0); IrTensor(IrTensor&& other) = default; diff --git a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc index 4019bb846fab2..32c45d20f8d25 100644 --- a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc +++ b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.cc @@ -20,8 +20,7 @@ namespace paddle { namespace dialect { -OpYamlInfoParser::OpYamlInfoParser(OpInfoTuple op_info_tuple, - bool is_legacy_op) +OpYamlInfoParser::OpYamlInfoParser(OpInfoTuple op_info_tuple, bool is_legacy_op) : op_info_tuple_(std::move(op_info_tuple)), is_legacy_op_(is_legacy_op) { parse(); } diff --git a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h index aca025625eabc..b72e8ef1327cb 100644 --- a/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h +++ b/paddle/fluid/pir/dialect/operator/utils/op_yaml_info_parser.h @@ -23,7 +23,7 @@ class OpYamlInfoParser { public: OpYamlInfoParser() = delete; - TEST_API explicit OpYamlInfoParser(OpInfoTuple op_info_tuple, + TEST_API explicit OpYamlInfoParser(OpInfoTuple op_info_tuple, bool is_legacy_op = false); TEST_API bool IsTensorAttribute(size_t index) const; diff --git a/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h b/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h index 93a0bdd45b225..60b1e40441320 100644 --- a/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h +++ b/paddle/fluid/pir/drr/include/drr_rewrite_pattern.h @@ -39,12 +39,11 @@ class ResultPatternGraph; class DrrRewritePattern : public pir::RewritePattern { public: - DrrRewritePattern( - const std::string& pattern_name, - const DrrPatternContext& drr_context, - pir::IrContext* context, - pir::PatternBenefit benefit, - std::shared_ptr drr_pattern_owner); + DrrRewritePattern(const std::string& pattern_name, + const DrrPatternContext& drr_context, + pir::IrContext* context, + pir::PatternBenefit benefit, + std::shared_ptr drr_pattern_owner); bool MatchAndRewrite( pir::Operation* op, diff --git a/paddle/fluid/pir/drr/src/rewrite_pattern.cc b/paddle/fluid/pir/drr/src/rewrite_pattern.cc index a062864f74747..f4b846db7f612 100644 --- a/paddle/fluid/pir/drr/src/rewrite_pattern.cc +++ b/paddle/fluid/pir/drr/src/rewrite_pattern.cc @@ -34,7 +34,7 @@ DrrRewritePattern::DrrRewritePattern( const DrrPatternContext& drr_context, pir::IrContext* context, pir::PatternBenefit benefit, - std::shared_ptr drr_pattern_owner) + std::shared_ptr drr_pattern_owner) : pir::RewritePattern( (*drr_context.source_pattern_graph()->OutputNodes().begin())->name(), benefit, diff --git a/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc b/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc index 29ea7b4d567cc..efe0053b5bee3 100644 --- a/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc +++ b/paddle/fluid/pir/transforms/gpu/fused_weight_only_linear_pass.cc @@ -50,7 +50,9 @@ class FusedWeightOnlyLinearWithBiasPattern FusedWeightOnlyLinearWithBiasPattern(bool reverse_add, std::string algo, int sm_version) - : reverse_add_(reverse_add), algo_(std::move(algo)), sm_version_(sm_version) {} + : reverse_add_(reverse_add), + algo_(std::move(algo)), + sm_version_(sm_version) {} std::string name() const override { return "FusedWeightOnlyLinearWithBiasPattern"; diff --git a/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc index de36bb530e342..4f0267b3b9f3e 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_activation_onednn_fuse_pass.cc @@ -227,7 +227,8 @@ class ConvGeluFusePattern : public paddle::drr::DrrPatternBase { public: ConvGeluFusePattern(std::string activation_name, int fused_level) - : activation_name_(std::move(activation_name)), fused_level_(fused_level) {} + : activation_name_(std::move(activation_name)), + fused_level_(fused_level) {} std::string name() const override { return "ConvGeluFusePattern"; } @@ -370,7 +371,8 @@ class ConvClipFusePattern : public paddle::drr::DrrPatternBase { public: ConvClipFusePattern(std::string activation_name, int fused_level) - : activation_name_(std::move(activation_name)), fused_level_(fused_level) {} + : activation_name_(std::move(activation_name)), + fused_level_(fused_level) {} std::string name() const override { return "ConvClipFusePattern"; } diff --git a/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc index 7df0f2e2e7e9a..7f7f81767c1e2 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_bias_fuse_pass.cc @@ -32,9 +32,9 @@ class ConvBiasFusePattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - ConvBiasFusePattern(std::string conv_name, - std::string fused_conv_name) - : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} + ConvBiasFusePattern(std::string conv_name, std::string fused_conv_name) + : conv_name_(std::move(conv_name)), + fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvBiasFusePattern"; } diff --git a/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc b/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc index 5e62d75215647..c1990f632fd1e 100644 --- a/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc +++ b/paddle/fluid/pir/transforms/onednn/conv_elementwise_add_onednn_fuse_pass.cc @@ -32,9 +32,9 @@ class ConvElementwiseAddPattern : public paddle::drr::DrrPatternBase { std::string fused_conv_name_; public: - ConvElementwiseAddPattern(std::string conv_name, - std::string fused_conv_name) - : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} + ConvElementwiseAddPattern(std::string conv_name, std::string fused_conv_name) + : conv_name_(std::move(conv_name)), + fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvElementwiseAddPattern"; } @@ -113,7 +113,8 @@ class ConvElementwiseAddAsYPattern : public paddle::drr::DrrPatternBase { public: ConvElementwiseAddAsYPattern(std::string conv_name, std::string fused_conv_name) - : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} + : conv_name_(std::move(conv_name)), + fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "ConvElementwiseAddAsYPattern"; } @@ -192,7 +193,8 @@ class FusedConvBiasElementwiseAddPattern : public paddle::drr::DrrPatternBase { public: FusedConvBiasElementwiseAddPattern(std::string conv_name, std::string fused_conv_name) - : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} + : conv_name_(std::move(conv_name)), + fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "FusedConvBiasElementwiseAddPattern"; @@ -288,7 +290,8 @@ class FusedConvBiasElementwiseAddAsYPattern public: FusedConvBiasElementwiseAddAsYPattern(std::string conv_name, std::string fused_conv_name) - : conv_name_(std::move(conv_name)), fused_conv_name_(std::move(fused_conv_name)) {} + : conv_name_(std::move(conv_name)), + fused_conv_name_(std::move(fused_conv_name)) {} std::string name() const override { return "FusedConvBiasElementwiseAddAsYPattern"; From 7354eb1c68539cca55b8ecadbc2e4de0f453aead Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Tue, 7 May 2024 17:05:10 +0800 Subject: [PATCH 09/11] 5.7 --- paddle/fluid/memory/allocation/aligned_allocator.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/paddle/fluid/memory/allocation/aligned_allocator.cc b/paddle/fluid/memory/allocation/aligned_allocator.cc index b32dfa1afd362..10680720e76d4 100644 --- a/paddle/fluid/memory/allocation/aligned_allocator.cc +++ b/paddle/fluid/memory/allocation/aligned_allocator.cc @@ -20,7 +20,6 @@ #include "paddle/fluid/platform/enforce.h" REGISTER_FILE_SYMBOLS(aligned_allocator); - namespace paddle { namespace memory { namespace allocation { From ffcf05c5bbe240e0265606f1ecb98b7d9f4c84b2 Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Sun, 19 May 2024 23:18:09 +0800 Subject: [PATCH 10/11] 5.19 --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 1653cef5fa1aa..302a6956cd946 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -180,7 +180,7 @@ modernize-redundant-void-arg, -modernize-shrink-to-fit, -modernize-unary-static-assert, modernize-use-bool-literals, -modernize-use-emplace, +-modernize-use-emplace, modernize-use-equals-default, -modernize-use-equals-delete, -modernize-use-noexcept, From 5e7597dcfb082fbca379fe5402e66445ed98c7a5 Mon Sep 17 00:00:00 2001 From: ApricityXX <1470600398@qq.com> Date: Sun, 19 May 2024 23:23:21 +0800 Subject: [PATCH 11/11] 5.19 --- .clang-tidy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.clang-tidy b/.clang-tidy index 302a6956cd946..1653cef5fa1aa 100644 --- a/.clang-tidy +++ b/.clang-tidy @@ -180,7 +180,7 @@ modernize-redundant-void-arg, -modernize-shrink-to-fit, -modernize-unary-static-assert, modernize-use-bool-literals, --modernize-use-emplace, +modernize-use-emplace, modernize-use-equals-default, -modernize-use-equals-delete, -modernize-use-noexcept,