Line data Source code
1 : /**
2 : * Copyright (c) 2025 Huawei Technologies Co., Ltd.
3 : * This program is free software, you can redistribute it and/or modify it under the terms and conditions of
4 : * CANN Open Software License Agreement Version 2.0 (the "License").
5 : * Please refer to the License for details. You may not use this file except in compliance with the License.
6 : * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED,
7 : * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
8 : * See LICENSE in the root of the software repository for the full text of the License.
9 : */
10 :
11 : #ifndef COLL_ALL_GATHER_DOUBLE_RING_MID_COUNT_EXECUTOR_H
12 : #define COLL_ALL_GATHER_DOUBLE_RING_MID_COUNT_EXECUTOR_H
13 : #include "coll_all_gather_ring_for_910_93_executor.h"
14 : namespace hccl {
15 : class CollAllGatherSemiRingExecutor : public CollAllGatherRingFor91093Executor {
16 :
17 : public:
18 : explicit CollAllGatherSemiRingExecutor(const HcclDispatcher dispatcher, std::unique_ptr<TopoMatcher> &topoMatcher);
19 0 : ~CollAllGatherSemiRingExecutor() override = default;
20 :
21 : private:
22 : /* *************** 资源计算 *************** */
23 : HcclResult CalcStreamNum(u32& streamNum) override;
24 : HcclResult CalcNotifyNum(u32 streamNum, u32 ¬ifyNum) override;
25 : HcclResult CalcLevel0CommInfo(TransportMemType inputType,
26 : TransportMemType outputType,
27 : std::vector<LevelNSubCommTransport>& opTransport) override;
28 :
29 : /* *************** 算法编排 *************** */
30 : HcclResult DoubleRingMidCountAllGather(const std::string &tag, DeviceMem &inputMem, DeviceMem &outputMem,
31 : const u64 count, const HcclDataType &dataType,
32 : const std::vector<std::vector<Slice>> &multRingsSliceZero, const Stream &stream,
33 : s32 profStage, const u64 baseOffset = 0, const HcomCollOpInfo *opInfo = nullptr,
34 : const std::vector<std::vector<Slice>> &multRingsUserMemSlice = std::vector<std::vector<Slice>> (0));
35 : HcclResult RunIntraSeverAllGather(const std::string &tag, DeviceMem &inputMem, DeviceMem &outputMem,
36 : const u64 count, const HcclDataType &dataType,
37 : const std::vector<std::vector<Slice>> &multRingsSliceZero, const Stream &stream,
38 : s32 profStage, const u64 baseOffset = 0, const HcomCollOpInfo *opInfo = nullptr,
39 : const std::vector<std::vector<Slice>> &multRingsUserMemSlice = std::vector<std::vector<Slice>> (0)) override;
40 : };
41 :
42 : } // namespace hccl
43 :
44 : #endif
|