LCOV - code coverage report
Current view: top level - legacy/ascend950/service/collective/alg/coll_alg_factory/alg_executor/ins_alg_executor/all_reduce - ins_v2_all_reduce_sole_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 % 11 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_INS_V2_ALL_REDUCE_SOLE_EXECUTOR_H
      12              : #define HCCLV2_INS_V2_ALL_REDUCE_SOLE_EXECUTOR_H
      13              : #include "ins_coll_alg_base.h"
      14              : 
      15              : namespace Hccl {
      16              : template <typename AlgTopoMatch, typename InsAlgTemplate>
      17              : class InsV2AllReduceSoleExecutor : public InsCollAlgBase {
      18              : public:
      19              :     explicit InsV2AllReduceSoleExecutor();
      20              :     ~InsV2AllReduceSoleExecutor() override;
      21              : 
      22            0 :     std::string Describe() const override
      23              :     {
      24            0 :         return "Instruction based All Reduce Sole Executor.";
      25              :     }
      26              :    
      27              :     // AICPU 接口
      28              :     HcclResult Orchestrate(const AlgTopoInfo &topoInfo, const CollAlgOperator &op, const CollAlgParams &params,
      29              :         ConnectedLinkMgr *linkMgr, InsQuePtr insQue) override;
      30              : 
      31              :     HcclResult CalcResOffload(
      32              :         const RankGraph *rankGraph, const u64 &dataSize, CollOffloadOpResReq &resReq) override;
      33              : 
      34              :     HcclResult CalcRes(const RankGraph *rankGraph, CollAlgResReq &algResReq) override;
      35              :     HcclResult CalNumBlocks(u32& numBlocks, u64 dataSize, u32 numBlocksLimit) override;
      36              :     // HOST 接口
      37              :     HcclResult Orchestrate(const RankGraph *rankGraph, const CollAlgOperator &op, const CollAlgParams &params,
      38              :         InsQuePtr insQue) override;
      39              : 
      40              : private:
      41              :     HcclResult CreateTemplates(std::shared_ptr<InsAlgTemplate> &algTemplatePtr);
      42              :     HcclResult GetTemplateResRequest(
      43              :         const RankGraph *rankGraph, std::shared_ptr<InsAlgTemplate> &algTemplate, AlgTempResReq &tempResReq) const;
      44              :     HcclResult GetTemplateResRequest(
      45              :         ConnectedLinkMgr *linkMgr, std::shared_ptr<InsAlgTemplate> &algTemplate, AlgTempResReq &tempResReq) const;
      46              :     HcclResult OrchestrateLoop(std::shared_ptr<InsAlgTemplate> algTemplate);
      47              :     HcclResult InitCommInfo(const RankGraph *rankGraph);
      48              :     HcclResult InitCommInfo(const AlgTopoInfo &topoInfo);
      49              : 
      50              :     std::vector<RankId> virtRanks_;
      51              :     std::vector<std::vector<RankId>> vTopo_;
      52              :     ResLinks tempResLinks_;
      53              :     std::vector<InsQuePtr> tempInsQue_;
      54              :     std::map<RankId, u32> virtRankMap_;
      55              : };
      56              : }  // namespace Hccl
      57              : 
      58              : #endif  // HCCLV2_INS_V2_ALL_REDUCE_SOLE_EXECUTOR_H
        

Generated by: LCOV version 2.0-1