diff --git a/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc b/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc index 356926e2ff5c9435e0043e16f2150137f7295a96..16a82500b43f94acbd71f73567b7d492e693ae6f 100644 --- a/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc +++ b/mindspore/ccsrc/pre_activate/ascend/ascend_backend_optimization.cc @@ -276,6 +276,7 @@ void AscendBackendOptimization(const std::shared_ptr &kern auto other_pm = std::make_shared("other_pm"); other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); + other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); other_pm->AddPass(std::make_shared()); diff --git a/mindspore/ccsrc/pre_activate/pass/communication_op_fusion.h b/mindspore/ccsrc/pre_activate/pass/communication_op_fusion.h index af8b557d5fc60c02af58fe7054a8b5f1b2c88fb2..e98da1f0ccd7d1bbe4ee6a71d97e0e8340ecaa6b 100644 --- a/mindspore/ccsrc/pre_activate/pass/communication_op_fusion.h +++ b/mindspore/ccsrc/pre_activate/pass/communication_op_fusion.h @@ -62,6 +62,12 @@ class AllGatherFusion : public CommunicationOpFusion { explicit AllGatherFusion(size_t groups = 1) : CommunicationOpFusion("all_gather_fusion", kAllGatherOpName, groups) {} ~AllGatherFusion() override = default; }; + +class BroadcastFusion : public CommunicationOpFusion { + public: + explicit BroadcastFusion(size_t groups = 1) : CommunicationOpFusion("broadcast_fusion", kBroadcastOpName, groups) {} + ~BroadcastFusion() override = default; +}; } // namespace opt } // namespace mindspore #endif // MINDSPORE_CCSRC_PRE_ACTIVATE_PASS_COMMUNICATION_OP_FUSION_H_ diff --git a/tests/ut/cpp/pre_activate/common/ir_fusion/allreduce_fusion_test.cc b/tests/ut/cpp/pre_activate/pass/allreduce_fusion_test.cc similarity index 100% rename from tests/ut/cpp/pre_activate/common/ir_fusion/allreduce_fusion_test.cc rename to tests/ut/cpp/pre_activate/pass/allreduce_fusion_test.cc