LCOV - code coverage report
Current view: top level - legacy/ascend910/algorithm/impl/coll_executor/coll_all_gather - coll_all_gather_ring_zerocopy_executor.h (source / functions) Coverage Total Hit
Test: coverage.info Lines: 0.0 % 1 0
Test Date: 2026-07-28 12:11:00 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 COLL_ALLGATHER_RING_ZEROCOPY_EXECUTOR_H
      12              : #define COLL_ALLGATHER_RING_ZEROCOPY_EXECUTOR_H
      13              : #include "coll_all_gather_executor.h"
      14              : namespace hccl {
      15              : class CollAllGatherRingZerocopyExecutor : public CollAllGatherExecutor {
      16              : public:
      17              :     explicit CollAllGatherRingZerocopyExecutor(const HcclDispatcher dispatcher, std::unique_ptr<TopoMatcher> &topoMatcher);
      18            0 :     ~CollAllGatherRingZerocopyExecutor() override = default;
      19              : 
      20              : protected:
      21              :     HcclResult CalcCommInfo(std::vector<LevelNSubCommTransport>& opTransport) override;
      22              :     u32 level0Rank_ = INVALID_VALUE_RANKID;
      23              :     u32 level1Rank_ = INVALID_VALUE_RANKID;
      24              :     u32 level2Rank_ = INVALID_VALUE_RANKID;
      25              :     u32 level0RankSize_ = INVALID_VALUE_RANKSIZE;
      26              :     u32 level1RankSize_ = INVALID_VALUE_RANKSIZE;
      27              :     u32 level2RankSize_ = INVALID_VALUE_RANKSIZE;
      28              : 
      29              : private:
      30              :     /* *************** 资源计算 *************** */
      31              :     HcclResult CalcStreamNum(u32& streamNum) override;
      32              :     HcclResult CalcLevel0CommInfo(TransportMemType inputType, TransportMemType outputType,
      33              :         std::vector<LevelNSubCommTransport>& opTransport) override;
      34              :     HcclResult CalcTransportMemType(TransportMemType &inputType, TransportMemType &outputType);
      35              :     u64 CalcLoopMaxCount(const u64 cclBuffSize, const u32 unitSize) override;
      36              :     void ParseParam(const OpParam& param) override;
      37              : 
      38              :     /* *************** 算法编排 *************** */
      39              :     HcclResult SemiRingAllGather(
      40              :         const std::string &tag, DeviceMem &inputMem, DeviceMem &outputMem,
      41              :         const u64 count, const HcclDataType &dataType, const std::vector<std::vector<Slice>> &multRingsSliceZero,
      42              :         const Stream &stream, s32 profStage, const u64 baseOffset, const HcomCollOpInfo *opInfo,
      43              :         const std::vector<std::vector<Slice>> &multRingsUserMemSlice);
      44              :     virtual HcclResult KernelRunInterServerPreProcess(const OpParam &param, const ExecMem &execMem);
      45              :     HcclResult KernelRunInterServer(const OpParam &param, ExecMem &execMem) override;
      46              :     HcclResult KernelRunIntraServerPost(const OpParam &param, ExecMem &execMem) override;
      47              :     virtual HcclResult CalcLevel0DataSlices(const OpParam &param, const ExecMem &execMem, std::vector<Slice> &dataSegsSlice);
      48              :     virtual HcclResult KernelRunInterServerPostProcess(const OpParam &param, const ExecMem &execMem);
      49              : };
      50              : 
      51              : } // namespace hccl
      52              : 
      53              : #endif
        

Generated by: LCOV version 2.0-1