LCOV - code coverage report
Current view: top level - legacy/ascend950/service/collective/alg/coll_alg_factory/alg_topo_match - topo_match_mesh.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 2 0
Test Date: 2026-07-28 12:11:00 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_TOPO_MATCH_MESH
      12              : #define HCCLV2_TOPO_MATCH_MESH
      13              : #include <string>
      14              : #include <vector>
      15              : #include <map>
      16              : 
      17              : #include <hccl/hccl_types.h>
      18              : #include "hccl/base.h"
      19              : #include "types/types.h"
      20              : #include "dev_type.h"
      21              : #include "topo_match_base.h"
      22              : #include "rank_gph.h"
      23              : #include "net_instance.h"
      24              : 
      25              : namespace Hccl {
      26              : 
      27              : class TopoMatchMesh : public TopoMatchBase {
      28              : public:
      29              :     explicit TopoMatchMesh(const RankId vRank, const u32 rankSize, const RankGraph *rankGraph,
      30              :                            const DevType devType);
      31              :     ~TopoMatchMesh() override;
      32              : 
      33            0 :     std::string Describe() const override
      34              :     {
      35            0 :         return "Topo Match for Mesh Algorithm (CURRENTLY only 950 is supported).";
      36              :     }
      37              :     using TopoMatchBase::MatchTopo;
      38              :     HcclResult MatchTopo(std::vector<std::vector<RankId>> &vTopo, std::vector<RankId> &virtRanks,
      39              :                          std::map<RankId, u32> &virtRankMap) override;
      40              : 
      41              : private:
      42              :     HcclResult MeshTopoForAllLevel();
      43              :     std::vector<RankId> rankIds_; // virtualTopoRank
      44              :     std::vector<std::vector<RankId>> rankOnSameBoardVector_;  // ranks vector with same boardIds in rack
      45              :     std::vector<std::vector<RankId>> rankOnSameSlotVector_;  // ranks vector with same slotIds in rack
      46              :     std::vector<u32> numRanksPerBoard_;  // ranks num with same boardIds in rack
      47              : };
      48              : } // namespace Hccl
      49              : 
      50              : #endif // !HCCLV2_TOPO_MATCH_MESH
        

Generated by: LCOV version 2.0-1