LCOV - code coverage report
Current view: top level - legacy/ascend950/service/collective/alg/coll_alg_factory/alg_executor/prim_alg_executor - all_reduce_comb_executor.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 2 0
Test Date: 2026-08-04 10:52:23 Functions: 0.0 % 2 0

            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 HCCLV2_ALL_REDUCE_COMB_EXECUTOR
      12              : #define HCCLV2_ALL_REDUCE_COMB_EXECUTOR
      13              : 
      14              : #include "temp_reduce_scatter_ring.h"
      15              : #include "temp_reduce_scatter_concurr_mesh.h"
      16              : #include "temp_reduce_scatter_mesh.h"
      17              : #include "temp_all_gather_ring.h"
      18              : #include "temp_all_gather_concurr_mesh.h"
      19              : #include "temp_all_gather_mesh.h"
      20              : #include "coll_alg_base.h"
      21              : #include "topo_match_concurr_mesh.h"
      22              : #include "topo_match_mesh.h"
      23              : 
      24              : namespace Hccl {
      25              : 
      26              : template <typename AlgTopoMatch, typename AlgTempRS, typename AlgTempAG>
      27              : class AllReduceCombExecutor : public CollAlgBase {
      28              : public:
      29              :     explicit AllReduceCombExecutor();
      30              :     ~AllReduceCombExecutor() override;
      31              : 
      32            0 :     std::string Describe() const override
      33              :     {
      34            0 :         return "All Reduce Comb Executor: sole TempReduceScatter + sole TempAllGather.";
      35              :     }
      36              : 
      37              :     HcclResult GenPrimQues(const RankGraph *rankGraph, const CollAlgOperator &op, const CollAlgParams &params,
      38              :                            PrimQuePtr primQue) override;
      39              :     HcclResult CalcResOffload(const RankGraph *rankGraph, const u64 &dataSize,
      40              :                               CollOffloadOpResReq &resReq) override;
      41              :     HcclResult CalcRes(const RankGraph *rankGraph, CollAlgResReq &algResReq) override;
      42              : 
      43              :     HcclResult GenPrimQuesAIC(const AlgTopoInfo &topoInfo, const CollAlgOperator &op, const CollAlgParams &params,
      44              :                               ConnectedLinkMgr *linkMgr, PrimQuePtr primQue) override;
      45              : 
      46              : private:
      47              :     HcclResult GenPrimQues4Offload(AlgTemplateBase &tempRSAlg, AlgTemplateBase &tempAGAlg);
      48              :     HcclResult GenPrimQues4Opbase(const u32 requiredScratchMultiplier, const u32 dataSizePerVolume,
      49              :                                   AlgTemplateBase &tempRSAlg, AlgTemplateBase &tempAGAlg);
      50              : 
      51              :     std::vector<RankId>              virtRanks_;
      52              :     std::map<RankId, u32>            virtRankMap_; // map<virtRank, virtRankOrder>
      53              :     std::vector<std::vector<RankId>> vTopo_;
      54              : 
      55              :     std::vector<PrimQuePtr> requiredQue_;
      56              :     ResLinks                tempResLinks_;
      57              : };
      58              : 
      59              : } // namespace Hccl
      60              : 
      61              : #endif // HCCLV2_ALL_REDUCE_COMB_EXECUTOR
        

Generated by: LCOV version 2.0-1