forked from mindspore-Ecosystem/mindspore
Add broadcast fusion pass
This commit is contained in:
parent
905467be9d
commit
31d8db9fc6
|
@ -276,6 +276,7 @@ void AscendBackendOptimization(const std::shared_ptr<session::KernelGraph> &kern
|
|||
auto other_pm = std::make_shared<PassManager>("other_pm");
|
||||
other_pm->AddPass(std::make_shared<AllReduceFusion>());
|
||||
other_pm->AddPass(std::make_shared<AllGatherFusion>());
|
||||
other_pm->AddPass(std::make_shared<BroadcastFusion>());
|
||||
other_pm->AddPass(std::make_shared<ParameterTransOpFusion>());
|
||||
other_pm->AddPass(std::make_shared<RefreshParameterFormat>());
|
||||
other_pm->AddPass(std::make_shared<BufferFusion>());
|
||||
|
|
|
@ -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_
|
||||
|
|
Loading…
Reference in New Issue