LCOV - code coverage report
Current view: top level - legacy/ascend950/service/collective/alg/coll_alg_factory/alg_template/prim_alg_template - temp_all_gather_concurr_mesh.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 2 0
Test Date: 2026-08-18 17:47:01 Functions: 0.0 % 1 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_TEMP_ALL_GATHER_CONCURR_MESH
      12              : #define HCCLV2_TEMP_ALL_GATHER_CONCURR_MESH
      13              : 
      14              : #include "string_util.h"
      15              : 
      16              : #include "alg_template_base_v2.h"
      17              : 
      18              : namespace Hccl {
      19              : class TempAllGatherConcurrMesh : public AlgTemplateBase {
      20              : public:
      21              :     explicit TempAllGatherConcurrMesh(
      22              :         const RankId virtualRank, const u32 tempRankSize, const std::vector<std::vector<RankId>>& tempVTopo,
      23              :         const std::map<RankId, u32>& tempVirtRankMap);
      24              :     ~TempAllGatherConcurrMesh() override;
      25              : 
      26            0 :     std::string Describe() const override
      27              :     {
      28              :         return StringFormat(
      29            0 :             "Template of all gather multi-dimensional concurrent mesh with tempRankSize [%u].", tempRankSize_);
      30              :     }
      31              : 
      32              :     HcclResult GenPrimQue(
      33              :         const TempFuncs& tempFuncs, const RankSliceInfo& sliceInfoVec, const BuffInfo& buffInfo,
      34              :         const ResLinks& tempLinks, std::vector<PrimQuePtr>& tempPrimQues) override;
      35              : 
      36              :     using AlgTemplateBase::CalcSliceInfo;
      37              :     HcclResult CalcSliceInfo(const AllignInfo& allignInfo, const u64 dataSize, RankSliceInfo& sliceInfoVec) override;
      38              : 
      39              :     using AlgTemplateBase::CalcRes;
      40              :     HcclResult CalcRes(AlgTempResReq& tempResReq) override;
      41              : 
      42              : private:
      43              :     HcclResult
      44              :     PreCopyOffload(const RankSliceInfo& sliceInfoVec, const bool forAllReduce, std::vector<PrimQuePtr>& tempPrimQues);
      45              : 
      46              :     HcclResult
      47              :     RunOneDimMesh(const RankSliceInfo& sliceInfoVec, const ResLinks& tempLinks, std::vector<PrimQuePtr>& tempPrimQues);
      48              :     HcclResult RunMesh(
      49              :         const u32 myAlgRank, const std::vector<RankId>& vTopo, const RankSliceInfo& sliceInfoVec,
      50              :         const ResLinks& tempLinks, std::vector<PrimQuePtr>& tempPrimQues);
      51              : 
      52              :     HcclResult
      53              :     RunConcurrMesh(const RankSliceInfo& sliceInfoVec, const ResLinks& tempLinks, std::vector<PrimQuePtr>& tempPrimQues);
      54              :     HcclResult RunSingleDimension(
      55              :         const u32& step, const u32& dim, const RankSliceInfo& sliceInfoVec, const ResLinks& tempLinks,
      56              :         std::vector<PrimQuePtr>& dimPrimQues);
      57              : 
      58              :     std::unique_ptr<PrimSend> RunSend(
      59              :         const RankSliceInfo& sliceInfoVec, const std::vector<u32>& sendChunkIdxs, const u32& sliceIdx,
      60              :         const RankId& neighborRank, const LinkData& priorLinkData);
      61              :     std::unique_ptr<PrimRecv> RunRecv(
      62              :         const RankSliceInfo& sliceInfoVec, const std::vector<u32>& recvChunkIdxs, const u32& sliceIdx,
      63              :         const RankId& neighborRank, const LinkData& priorLinkData);
      64              : };
      65              : 
      66              : } // namespace Hccl
      67              : 
      68              : #endif // !HCCLV2_TEMP_ALL_GATHER_CONCURR_MESH
        

Generated by: LCOV version 2.0-1