Line data Source code
1 : /**
2 : * Copyright (c) 2026 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 : #ifndef HCCLV2_CCU_TEMP_ALL_MESH_1D_2DIE_H_
11 : #define HCCLV2_CCU_TEMP_ALL_MESH_1D_2DIE_H_
12 : #include "string_util.h"
13 : #include "env_config.h"
14 : #include "ccu_alg_template_base.h"
15 : #include "ccu_instruction_all_gather_mesh1d_2die.h"
16 : #include "executor_utils.h"
17 :
18 :
19 : namespace Hccl {
20 : class CcuTempAllGatherMesh1D2Die : public CcuAlgTemplateBase {
21 : public:
22 : explicit CcuTempAllGatherMesh1D2Die(const RankId virtualRank, const u32 tempRankSize,
23 : const std::vector<std::vector<RankId>> &tempVTopo,
24 : const std::map<RankId, u32> &tempVirtRankMap);
25 : ~CcuTempAllGatherMesh1D2Die() override;
26 :
27 0 : std::string Describe() const override
28 : {
29 0 : return StringFormat("Template of all gather ccu mesh 1D 2Die with tempRankSize [%u].", tempRankSize_);
30 : }
31 :
32 : HcclResult GenExtIns(const TempFuncs &tempFuncs, TemplateDataParams &tempAlgParams,
33 : const ResLinks &tempLinks, std::vector<InsQuePtr> &tempInsQues);
34 : HcclResult CalcRes(AlgTempResReq &tempResReq) override;
35 : uint64_t GetMaxSliceSize() const;
36 : };
37 :
38 : } // namespace Hccl
39 :
40 : #endif // HCCLV2_CCU_TEMP_ALL_GATHER_NHR_MESH_1D_MEM2MEM_H_
|