LCOV - code coverage report
Current view: top level - legacy/ascend910/framework/communicator/impl - hccl_communicator_device.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 71.0 % 534 379
Test Date: 2026-08-17 10:19:35 Functions: 74.7 % 296 221

            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              : #include <memory>
      12              : #include <atomic>
      13              : #include <chrono>
      14              : #include <thread>
      15              : #include <algorithm>
      16              : #include <numeric>
      17              : #include <unordered_set>
      18              : #include <sys/time.h>
      19              : #include "hccl_aiv.h"
      20              : #include "hccl_communicator.h"
      21              : 
      22              : using namespace std;
      23              : 
      24              : constexpr u32 MODULE_NUM_FOUR = 4;
      25              : 
      26              : namespace hccl {
      27            1 : HcclCommunicator::HcclCommunicator()
      28            1 :     : dispatcher_(nullptr),
      29            1 :       vDispatcher_(nullptr),
      30            1 :       notifyPool_(nullptr),
      31            1 :       initializedFlag_(ATOMIC_FLAG_INIT),
      32            1 :       userRank_(INVALID_VALUE_RANKID),
      33            1 :       realUserRank_(INVALID_VALUE_RANKID),
      34            1 :       userRankSize_(INVALID_VALUE_RANKSIZE),
      35            1 :       drvInit_(false),
      36            1 :       inlineReduceSwitchOn_(true),
      37            1 :       nicDeployment_(NICDeployment::NIC_DEPLOYMENT_DEVICE),
      38            1 :       devicePhyId_(INVALID_UINT),
      39            1 :       deviceLogicId_(-1),
      40            1 :       localRank_(INVALID_VALUE_RANKID),
      41            1 :       hostSocketHandle_(nullptr),
      42            1 :       isUsedRdmaLevel0_(false),
      43            1 :       nicInitialized_(0),
      44            1 :       hcomGroupNicInit_(false),
      45            1 :       profilingMode_(HcomProfilingMode::PROFILING_CLOSE),
      46            1 :       raResourceInit_(false),
      47            1 :       interServer_(false),
      48            1 :       isSingleMeshAggregation_(false),
      49            1 :       cclBufferManager_(CCLBufferManager()),
      50            1 :       isExecuteProfilingInit_(false),
      51            1 :       deviceType_(DevType::DEV_TYPE_COUNT),
      52            1 :       commHandle_(nullptr),
      53            1 :       commWorkMode_(WorkMode::HCCL_MODE_NORMAL),
      54            1 :       meshAggregationRankSize_(0),
      55            1 :       isHaveCpuRank_(false),
      56            1 :       ranktableCrc_(0),
      57            1 :       multiModuleDiffDeviceNumMode_(false),
      58            1 :       multiSuperPodDiffServerNumMode_(false),
      59            1 :       isStandardCard_(false),
      60            1 :       is310PDuoCard_(false),
      61            1 :       hccsPortNum_(-1),
      62            1 :       loopBackIp_(HcclIpAddress(COMM_LOOPBACK_IP)),
      63            1 :       profilingInitiated_(false),
      64            1 :       callbackThreadId_(INVALID_U64),
      65            1 :       role_(SERVER_ROLE_SOCKET),
      66            1 :       isHostUseDevNic_(false),
      67            1 :       isAllRankSamePlane_(false),
      68            1 :       serverNum_(0),
      69          771 :       moduleNum_(0)
      70            1 : {}
      71              : 
      72            0 : HcclCommunicator::HcclCommunicator(const CommConfig& commConfig)
      73            0 :     : dispatcher_(nullptr),
      74            0 :       vDispatcher_(nullptr),
      75            0 :       notifyPool_(nullptr),
      76            0 :       initializedFlag_(ATOMIC_FLAG_INIT),
      77            0 :       userRank_(INVALID_VALUE_RANKID),
      78            0 :       realUserRank_(INVALID_VALUE_RANKID),
      79            0 :       userRankSize_(INVALID_VALUE_RANKSIZE),
      80            0 :       drvInit_(false),
      81            0 :       inlineReduceSwitchOn_(true),
      82            0 :       nicDeployment_(NICDeployment::NIC_DEPLOYMENT_DEVICE),
      83            0 :       devicePhyId_(INVALID_UINT),
      84            0 :       deviceLogicId_(-1),
      85            0 :       localRank_(INVALID_VALUE_RANKID),
      86            0 :       hostSocketHandle_(nullptr),
      87            0 :       isUsedRdmaLevel0_(false),
      88            0 :       nicInitialized_(0),
      89            0 :       hcomGroupNicInit_(false),
      90            0 :       profilingMode_(HcomProfilingMode::PROFILING_CLOSE),
      91            0 :       raResourceInit_(false),
      92            0 :       interServer_(false),
      93            0 :       isSingleMeshAggregation_(false),
      94            0 :       cclBufferManager_(CCLBufferManager()),
      95            0 :       isExecuteProfilingInit_(false),
      96            0 :       deviceType_(DevType::DEV_TYPE_COUNT),
      97            0 :       commHandle_(nullptr),
      98            0 :       commWorkMode_(WorkMode::HCCL_MODE_NORMAL),
      99            0 :       meshAggregationRankSize_(0),
     100            0 :       isHaveCpuRank_(false),
     101            0 :       ranktableCrc_(0),
     102            0 :       multiModuleDiffDeviceNumMode_(false),
     103            0 :       multiSuperPodDiffServerNumMode_(false),
     104            0 :       isStandardCard_(false),
     105            0 :       is310PDuoCard_(false),
     106            0 :       hccsPortNum_(-1),
     107            0 :       loopBackIp_(HcclIpAddress(COMM_LOOPBACK_IP)),
     108            0 :       profilingInitiated_(false),
     109            0 :       callbackThreadId_(INVALID_U64),
     110            0 :       role_(SERVER_ROLE_SOCKET),
     111            0 :       isHostUseDevNic_(false),
     112            0 :       isAllRankSamePlane_(false),
     113            0 :       serverNum_(0),
     114            0 :       moduleNum_(0)
     115              : {
     116            0 :     commConfig_ = commConfig;
     117            0 : }
     118              : 
     119            9 : HcclCommunicator::~HcclCommunicator() {}
     120              : 
     121            1 : HcclResult HcclCommunicator::Init(HcclCommParams& params, const RankTable_t& rankTable) { return HCCL_SUCCESS; }
     122              : 
     123              : HcclResult
     124            1 : HcclCommunicator::Init(HcclCommParams& params, const std::vector<RankInfo>& rankList, WorldGroupInfo& groupCommonData)
     125              : {
     126            1 :     return HCCL_SUCCESS;
     127              : }
     128              : 
     129            0 : HcclResult HcclCommunicator::InitOneSidedService(const RankTable_t& rankTable) { return HCCL_SUCCESS; }
     130              : 
     131            1 : HcclResult HcclCommunicator::InitOneSidedServiceNetDevCtx(u32 remoteRankId) { return HCCL_SUCCESS; }
     132              : 
     133            1 : HcclResult HcclCommunicator::DeInitOneSidedServiceNetDevCtx() { return HCCL_SUCCESS; }
     134              : 
     135            1 : HcclResult HcclCommunicator::GetOneSidedService(IHcclOneSidedService** service) { return HCCL_SUCCESS; }
     136              : 
     137            0 : HcclResult HcclCommunicator::OneSidedServiceStartListen(NicType nicType, HcclNetDevCtx netDevCtx)
     138              : {
     139            0 :     return HCCL_SUCCESS;
     140              : }
     141              : 
     142            0 : HcclResult HcclCommunicator::GetOneSidedServiceDevIpAndPort(NicType nicType, HcclIpAddress& ipAddress, u32& port)
     143              : {
     144            0 :     return HCCL_SUCCESS;
     145              : }
     146              : 
     147            1 : HcclResult HcclCommunicator::DeinitOneSidedService() { return HCCL_SUCCESS; }
     148              : 
     149            0 : bool HcclCommunicator::IsSupportSymmetricMemory(HcclCMDType opType, OpParam& opParam) { return false; }
     150              : 
     151            1 : bool HcclCommunicator::IsSupportZeroCopy(const OpParam& opParam) { return false; }
     152              : 
     153            1 : HcclResult HcclCommunicator::PrepareZeroCopy(const std::string& algName, const AlgDesc& algDesc, OpParam& opParam)
     154              : {
     155            1 :     return HCCL_SUCCESS;
     156              : }
     157              : 
     158            1 : HcclResult HcclCommunicator::UpdateZeroCopy(const OpParam& opParam, const AlgResourceResponse& algResource)
     159              : {
     160            1 :     return HCCL_SUCCESS;
     161              : }
     162              : 
     163            1 : HcclResult HcclCommunicator::BuildZeroCopyParam() { return HCCL_SUCCESS; }
     164              : 
     165            1 : HcclResult HcclCommunicator::InitCommParams(HcclCommParams& params) { return HCCL_SUCCESS; }
     166              : 
     167            1 : bool HcclCommunicator::Is310PDuoCard() { return false; }
     168              : 
     169              : // 910B A+X 在RDMA未启用情况下,两模块间的device数目需要一致且两模块中使用的卡都在同一平面上
     170            1 : HcclResult HcclCommunicator::CheckSingleServerComm(const std::vector<RankInfo_t>& rankList) const
     171              : {
     172            1 :     return HCCL_SUCCESS;
     173              : }
     174              : 
     175            1 : HcclResult HcclCommunicator::CheckDataType(const HcclDataType dataType, bool needReduce) { return HCCL_SUCCESS; }
     176              : 
     177            1 : HcclResult HcclCommunicator::InitZeroCopyMemoryAgent() { return HCCL_SUCCESS; }
     178              : 
     179            1 : HcclResult HcclCommunicator::DeinitZeroCopyMemoryAgent(bool inDestructor) { return HCCL_SUCCESS; }
     180              : 
     181            0 : u8 HcclCommunicator::GetConfigAclGraphZeroCopyEnable() { return 0; }
     182              : 
     183            1 : HcclResult HcclCommunicator::ClearResMap(const std::string& tag, bool& findTag, bool aclGraphDestroyCbk)
     184              : {
     185              :     (void)aclGraphDestroyCbk;
     186            1 :     return HCCL_SUCCESS;
     187              : }
     188              : 
     189            1 : HcclResult HcclCommunicator::ClearOpResource(const std::string& tag, bool aclGraphDestroyCbk)
     190              : {
     191              :     (void)aclGraphDestroyCbk;
     192            1 :     return HCCL_SUCCESS;
     193              : }
     194              : 
     195            1 : HcclResult HcclCommunicator::CreateOpBasedResources(
     196              :     const HcclCMDType& opType, const std::string& tag, const HcomCollOpInfo& opInfo)
     197              : {
     198            1 :     return HCCL_E_NOT_SUPPORT;
     199              : }
     200              : 
     201            1 : HcclResult HcclCommunicator::CreateRemoteOpBasedResources(u64 memSize, const std::string& tag)
     202              : {
     203            1 :     return HCCL_E_NOT_SUPPORT;
     204              : }
     205              : 
     206            1 : HcclResult HcclCommunicator::DestroyRemoteOpBasedMem(const std::string& tag) { return HCCL_E_NOT_SUPPORT; }
     207              : 
     208            1 : bool HcclCommunicator::IsAtomicInit() { return false; }
     209              : 
     210            1 : bool HcclCommunicator::IsNeedNicInit() { return false; }
     211              : 
     212            1 : HcclResult HcclCommunicator::GetBandWidthPerNPU(u32 level, float& bandWidth) { return HCCL_E_NOT_SUPPORT; }
     213              : 
     214            1 : HcclResult HcclCommunicator::GetDeviceNumPerAggregation(u32& deviceNumPerAggregation) { return HCCL_SUCCESS; }
     215              : 
     216            1 : HcclResult HcclCommunicator::InitHccpChannel() { return HCCL_SUCCESS; }
     217              : 
     218            0 : std::vector<RankInfo> HcclCommunicator::GetRankLists() { return {}; }
     219              : 
     220            1 : HcclResult HcclCommunicator::CheckReduceDataType(const HcclDataType dataType, const HcclReduceOp op)
     221              : {
     222            1 :     return HCCL_SUCCESS;
     223              : }
     224              : 
     225            1 : HcclResult HcclCommunicator::GetAlgType(AlgType& algType, HcclCMDType opType) { return HCCL_E_NOT_SUPPORT; }
     226              : 
     227            1 : HcclResult HcclCommunicator::GetCommParams(HcclCommParams& params) { return HCCL_E_NOT_SUPPORT; }
     228              : 
     229            1 : HcclResult HcclCommunicator::GetCommRankTable(RankTable_t& rankTable) { return HCCL_E_NOT_SUPPORT; }
     230              : 
     231            1 : HcclResult HcclCommunicator::InitPara() { return HCCL_SUCCESS; }
     232              : 
     233            1 : bool HcclCommunicator::IsStandardCard() { return false; }
     234              : 
     235            1 : HcclResult HcclCommunicator::InitOpRetry() { return HCCL_SUCCESS; }
     236              : 
     237            1 : bool HcclCommunicator::CompareWithServerId(const ServerInfo_t& left, const ServerInfo_t& right) { return false; }
     238              : 
     239            1 : bool HcclCommunicator::CompareWithNicName(const NetworkInfo_t& left, const NetworkInfo_t& right) { return false; }
     240              : 
     241            1 : bool HcclCommunicator::CompareWithUserRank(const RankInfo& left, const RankInfo& right) { return false; }
     242              : 
     243            1 : HcclResult HcclCommunicator::InitPreResource(const RankTable_t& rankTable) { return HCCL_SUCCESS; }
     244              : 
     245            1 : HcclResult HcclCommunicator::InitTcpMode(const RankTable_t& rankTable) const { return HCCL_SUCCESS; }
     246              : 
     247            1 : bool HcclCommunicator::IsEnableBackupLink() { return false; }
     248              : 
     249            1 : HcclResult HcclCommunicator::InitRaResource() { return HCCL_SUCCESS; }
     250              : 
     251            1 : HcclResult HcclCommunicator::DisablePreResource() { return HCCL_SUCCESS; }
     252              : 
     253            1 : HcclResult HcclCommunicator::GetWorkspaceSubStreamNum(
     254              :     u64 count, HcclDataType dataType, HcclReduceOp op, const std::string& algName, u64& streamNum, u64 dataSize,
     255              :     bool ifAiv, HcclCMDType opType)
     256              : {
     257            1 :     return HCCL_SUCCESS;
     258              : }
     259              : 
     260            1 : HcclResult HcclCommunicator::DestroyNetworkResources() { return HCCL_SUCCESS; }
     261              : 
     262            1 : HcclResult HcclCommunicator::SetWorkspaceResource(
     263              :     const std::string& tag, void* memPtr, u64& maxSize, std::vector<rtStream_t>& stream)
     264              : {
     265            1 :     return HCCL_E_NOT_SUPPORT;
     266              : }
     267              : 
     268            1 : void HcclCommunicator::DestroyWorkspaceResource(const std::string& tag) {}
     269              : 
     270            1 : HcclResult HcclCommunicator::AtomicInitSet() { return HCCL_SUCCESS; }
     271              : 
     272            1 : void HcclCommunicator::AtomicInitClear() {}
     273              : 
     274            1 : u32 HcclCommunicator::GetUserRank() { return 0; }
     275              : 
     276            1 : u32 HcclCommunicator::GetGroupRank() { return 0; }
     277              : 
     278            1 : u32 HcclCommunicator::GetRankSize() { return 0; }
     279              : 
     280            1 : bool HcclCommunicator::GetNicInitialized() { return false; }
     281              : 
     282              : /*
     283              :     1. 选择算法
     284              :     2. 计算resource,存到request内
     285              :     3. 创建和分配资源
     286              : */
     287            1 : HcclResult HcclCommunicator::HcclSelectAlg(
     288              :     HcclCMDType opType, u64 count, void* counts, HcclDataType dataType, HcclReduceOp op, int32_t aivCoreLimit,
     289              :     bool& ifAiv, std::string& algName)
     290              : {
     291            1 :     return HCCL_SUCCESS;
     292              : }
     293              : 
     294            1 : HcclResult HcclCommunicator::HcclCalcNumBlocks(
     295              :     HcclCMDType opType, u64 count, void* counts, HcclDataType dataType, int32_t aivCoreLimit, std::string& algName,
     296              :     u32& numBlocks)
     297              : {
     298            1 :     return HCCL_SUCCESS;
     299              : }
     300              : 
     301            1 : HcclResult HcclCommunicator::HcclGetAlgExecParam(
     302              :     const std::string& tag, HcclCMDType opType, u64 count, void* inputPtr, void* outputPtr, bool clearEnable,
     303              :     HcclDataType dataType, HcclReduceOp op, void*& commContext, u64& len, u32 aivCoreLimit)
     304              : {
     305            1 :     return HCCL_SUCCESS;
     306              : }
     307              : 
     308            0 : HcclResult HcclCommunicator::GetAivTag(s32 tagNum, bool isCapture, s32& aivTag) { return HCCL_SUCCESS; }
     309              : 
     310            1 : HcclResult HcclCommunicator::CheckDeviceType(const DevType deviceType) const { return HCCL_SUCCESS; }
     311              : 
     312            1 : HcclResult HcclCommunicator::CheckReductionOp(const HcclReduceOp op) const { return HCCL_SUCCESS; }
     313              : 
     314            1 : HcclResult HcclCommunicator::CheckUserRank(const u32 userRank) const { return HCCL_SUCCESS; }
     315              : 
     316            1 : HcclResult HcclCommunicator::CheckCount(const u64 count) const { return HCCL_SUCCESS; }
     317              : 
     318            1 : HcclResult HcclCommunicator::GetGroupRanksInfo(const std::vector<u32>& groupRanks, std::vector<RankInfo>& ranksInfo)
     319              : {
     320            1 :     return HCCL_SUCCESS;
     321              : }
     322              : 
     323            1 : HcclResult HcclCommunicator::GetGroupCommonData(WorldGroupInfo& groupCommonData) const { return HCCL_SUCCESS; }
     324              : 
     325            1 : HcclResult HcclCommunicator::GetWorkspaceMemSize(
     326              :     const std::string& opType, u64 count, HcclDataType dataType, u32& rankSize, u64& memSize, DevType& deviceType) const
     327              : {
     328            1 :     return HCCL_E_NOT_SUPPORT;
     329              : }
     330              : 
     331            1 : DeviceMem HcclCommunicator::GetWorkspaceScracthMem(const std::string& tag, u64 allocMemSize) { return DeviceMem(); }
     332              : 
     333            1 : std::vector<Stream> HcclCommunicator::GetWorkspaceSubStreams(const std::string& tag, u32 num) { return {}; }
     334              : 
     335            1 : HcclResult HcclCommunicator::InitProfiling() { return HCCL_SUCCESS; }
     336              : 
     337            1 : HcclResult HcclCommunicator::DeinitProfiling() { return HCCL_SUCCESS; }
     338              : 
     339            1 : HcclResult HcclCommunicator::RegistTaskExceptionHandler() const { return HCCL_SUCCESS; }
     340              : 
     341            1 : HcclResult HcclCommunicator::UnRegistTaskExceptionHandler() const { return HCCL_SUCCESS; }
     342              : 
     343            1 : HcclResult HcclCommunicator::GetInCCLbuffer(void*& buffer, u64& size) { return HCCL_E_NOT_SUPPORT; }
     344              : 
     345            1 : HcclResult HcclCommunicator::GetOutCCLbuffer(void*& buffer, u64& size) { return HCCL_E_NOT_SUPPORT; }
     346              : 
     347            1 : void HcclCommunicator::ReleaseCommCCLbuffer() {}
     348              : 
     349            1 : HcclResult HcclCommunicator::ReleaseCommInfos() { return HCCL_SUCCESS; }
     350              : 
     351            1 : HcclResult HcclCommunicator::InitProfiler() { return HCCL_SUCCESS; }
     352              : 
     353            1 : HcclResult HcclCommunicator::CreateCommCCLbuffer() { return HCCL_E_NOT_SUPPORT; }
     354              : 
     355            1 : HcclResult HcclCommunicator::InitCCLbuffer(u64 inCCLbufferSize, u64 outCCLbufferSize) { return HCCL_E_NOT_SUPPORT; }
     356              : 
     357            1 : u32 HcclCommunicator::GetLocalNicPort(NicType nicType) { return 0; }
     358              : 
     359            1 : HcclResult HcclCommunicator::InitNic(bool isMC2ReInit) { return HCCL_SUCCESS; }
     360              : 
     361            1 : HcclResult HcclCommunicator::DeinitNic() { return HCCL_SUCCESS; }
     362              : 
     363            1 : HcclResult HcclCommunicator::RegisterRanksToDca() { return HCCL_E_NOT_SUPPORT; }
     364              : 
     365            1 : HcclResult HcclCommunicator::RegisterToHeartBeat() { return HCCL_E_NOT_SUPPORT; }
     366              : 
     367            0 : HcclResult HcclCommunicator::AddOpInfoToHeartBeat(const OpInfoDesc& opInfo, const std::string& tag)
     368              : {
     369            0 :     return HCCL_E_NOT_SUPPORT;
     370              : }
     371              : 
     372            0 : void HcclCommunicator::DeleteOpInfoToHeartBeat() {}
     373              : 
     374            1 : HcclResult HcclCommunicator::RegisterToHeartBeat(u32 peerRankId, string& tag) { return HCCL_E_NOT_SUPPORT; }
     375              : 
     376            1 : void HcclCommunicator::UnRegisterToHeartBeat() {}
     377              : 
     378            0 : void HcclCommunicator::UnRegisterToCommConfiger() {}
     379              : 
     380            1 : HcclResult HcclCommunicator::SetGlobalWorkSpace(std::vector<void*>& globalWorkSpaceAddr) { return HCCL_SUCCESS; }
     381              : 
     382            1 : HcclResult HcclCommunicator::GetandClearOverFlowTasks(std::vector<HcclDumpInfo>& hcclDumpInfo) { return HCCL_SUCCESS; }
     383              : 
     384            1 : HcclResult HcclCommunicator::GetDeviceId(s32& deviceId) const { return HCCL_SUCCESS; }
     385              : 
     386            1 : HcclResult HcclCommunicator::GetCqeError(HcclResult& result) { return HCCL_SUCCESS; }
     387              : 
     388            0 : HcclResult HcclCommunicator::GetOpInconsistentError(HcclResult& result) { return HCCL_SUCCESS; }
     389              : 
     390            1 : HcclResult HcclCommunicator::SupportDeterministicOptim(bool& isDeterministicOptim) { return HCCL_SUCCESS; }
     391              : 
     392            1 : HcclResult HcclCommunicator::GetHccsLinkNum(u32& numHccsLink) { return HCCL_SUCCESS; }
     393              : 
     394            1 : HcclResult HcclCommunicator::AllGather(
     395              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 inputCount, HcclDataType dataType, HcclRtStream stream,
     396              :     HcomCollOpInfo* opInfo)
     397              : {
     398            1 :     return HCCL_SUCCESS;
     399              : }
     400              : 
     401            1 : HcclResult HcclCommunicator::AllGatherV(
     402              :     const std::string& tag, const void* sendBuf, u64 sendCount, const void* recvBuf, const void* recvCounts,
     403              :     const void* rdispls, HcclDataType dataType, HcclRtStream stream)
     404              : {
     405            1 :     return HCCL_SUCCESS;
     406              : }
     407              : 
     408            1 : HcclResult HcclCommunicator::AicpuUnfold(
     409              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     410              :     HcclRtStream stream, HcclCMDType cmdType)
     411              : {
     412            1 :     return HCCL_SUCCESS;
     413              : }
     414              : 
     415            1 : HcclResult HcclCommunicator::AllGatherOutPlace(
     416              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 inputCount, HcclDataType dataType, HcclRtStream stream)
     417              : {
     418            1 :     return HCCL_SUCCESS;
     419              : }
     420              : 
     421            1 : HcclResult HcclCommunicator::AllGatherVOutPlace(
     422              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 inputCount, const void* outputCounts,
     423              :     const void* outputDispls, HcclDataType dataType, HcclRtStream stream)
     424              : {
     425            1 :     return HCCL_SUCCESS;
     426              : }
     427              : 
     428            1 : void HcclCommunicator::GetAndSetSyncMode(SyncMode& preSyncMode, SyncMode newSyncMode) {}
     429              : 
     430            1 : void HcclCommunicator::RestorePreSyncMode(SyncMode preSyncMode, SyncMode newSyncMode) {}
     431              : 
     432            1 : HcclResult HcclCommunicator::AllReduce(
     433              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     434              :     HcclRtStream stream, SyncMode syncMode, const HcomCollOpInfo* opInfo)
     435              : {
     436            1 :     return HCCL_SUCCESS;
     437              : }
     438              : 
     439            1 : HcclResult HcclCommunicator::AllReduceAicpuUnfold(
     440              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     441              :     HcclRtStream stream)
     442              : {
     443            1 :     return HCCL_SUCCESS;
     444              : }
     445              : 
     446            1 : HcclResult HcclCommunicator::AllReduceOutPlace(
     447              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     448              :     HcclRtStream stream, SyncMode syncMode)
     449              : {
     450            1 :     return HCCL_SUCCESS;
     451              : }
     452              : 
     453            1 : HcclResult HcclCommunicator::AlltoAllV(
     454              :     const void* sendBuf, const void* sendCounts, const void* sdispls, HcclDataType sendType, const void* recvBuf,
     455              :     const void* recvCounts, const void* rdispls, HcclDataType recvType, rtStream_t stream, const std::string& tag)
     456              : {
     457            1 :     return HCCL_SUCCESS;
     458              : }
     459              : 
     460            1 : HcclResult HcclCommunicator::AlltoAllVOutPlace(
     461              :     const void* sendBuf, const void* sendCounts, const void* sdispls, HcclDataType sendType, const void* recvBuf,
     462              :     const void* recvCounts, const void* rdispls, HcclDataType recvType, rtStream_t stream, const std::string& tag)
     463              : {
     464            1 :     return HCCL_SUCCESS;
     465              : }
     466              : 
     467            1 : HcclResult HcclCommunicator::AlltoAllVC(
     468              :     const void* sendBuf, const void* sendCountMatrix, HcclDataType sendType, const void* recvBuf, HcclDataType recvType,
     469              :     rtStream_t stream, const std::string& tag)
     470              : {
     471            1 :     return HCCL_SUCCESS;
     472              : }
     473              : 
     474            1 : HcclResult HcclCommunicator::AlltoAllVCOutPlace(
     475              :     const void* sendBuf, const void* sendCountMatrix, HcclDataType sendType, const void* recvBuf, HcclDataType recvType,
     476              :     rtStream_t stream, const std::string& tag)
     477              : {
     478            1 :     return HCCL_SUCCESS;
     479              : }
     480              : 
     481            1 : HcclResult HcclCommunicator::AlltoAll(
     482              :     const void* sendBuf, u64 sendCount, HcclDataType sendType, const void* recvBuf, u64 recvCount,
     483              :     HcclDataType recvType, rtStream_t stream, const std::string& tag)
     484              : {
     485            1 :     return HCCL_SUCCESS;
     486              : }
     487              : 
     488            1 : HcclResult HcclCommunicator::Broadcast(
     489              :     const std::string& tag, void* ptr, u64 count, HcclDataType dataType, u32 root, HcclRtStream stream)
     490              : {
     491            1 :     return HCCL_SUCCESS;
     492              : }
     493              : 
     494            1 : HcclResult HcclCommunicator::BroadcastOutPlace(
     495              :     const std::string& tag, void* ptr, u64 count, HcclDataType dataType, u32 root, HcclRtStream stream)
     496              : {
     497            1 :     return HCCL_SUCCESS;
     498              : }
     499              : 
     500            1 : HcclResult HcclCommunicator::Scatter(
     501              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 recvCount, HcclDataType dataType, u32 root,
     502              :     HcclRtStream stream)
     503              : {
     504            1 :     return HCCL_SUCCESS;
     505              : }
     506              : 
     507            1 : HcclResult HcclCommunicator::ScatterOutPlace(
     508              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 recvCount, HcclDataType dataType, u32 root,
     509              :     HcclRtStream stream)
     510              : {
     511            1 :     return HCCL_SUCCESS;
     512              : }
     513              : 
     514            1 : HcclResult HcclCommunicator::Reduce(
     515              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     516              :     u32 root, HcclRtStream stream)
     517              : {
     518            1 :     return HCCL_SUCCESS;
     519              : }
     520              : 
     521            1 : HcclResult HcclCommunicator::ReduceOutPlace(
     522              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     523              :     u32 root, HcclRtStream stream)
     524              : {
     525            1 :     return HCCL_SUCCESS;
     526              : }
     527              : 
     528            1 : HcclResult HcclCommunicator::ReduceScatter(
     529              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     530              :     HcclRtStream stream, HcomCollOpInfo* opInfo)
     531              : {
     532            1 :     return HCCL_SUCCESS;
     533              : }
     534              : 
     535            1 : HcclResult HcclCommunicator::ReduceScatterOutPlace(
     536              :     const std::string& tag, void* inputPtr, void* outputPtr, u64 count, HcclDataType dataType, HcclReduceOp op,
     537              :     HcclRtStream stream)
     538              : {
     539            1 :     return HCCL_SUCCESS;
     540              : }
     541              : 
     542            1 : HcclResult HcclCommunicator::ReduceScatterV(
     543              :     const std::string& tag, void* inputPtr, const void* inputCounts, const void* inputDispls, void* outputPtr,
     544              :     u64 outputCount, HcclDataType dataType, HcclReduceOp op, HcclRtStream stream, HcomCollOpInfo* opInfo)
     545              : {
     546            1 :     return HCCL_SUCCESS;
     547              : }
     548              : 
     549            1 : HcclResult HcclCommunicator::ReduceScatterVOutPlace(
     550              :     const std::string& tag, void* inputPtr, void* outputPtr, const void* inputCounts, const void* inputDispls,
     551              :     u64 outputCount, HcclDataType dataType, HcclReduceOp op, HcclRtStream stream)
     552              : {
     553            1 :     return HCCL_SUCCESS;
     554              : }
     555              : 
     556            1 : HcclResult HcclCommunicator::BatchSendRecv(
     557              :     const std::string& tag, HcclSendRecvItem* sendRecvItemsPtr, u32 itemNum, rtStream_t stream)
     558              : {
     559            1 :     return HCCL_SUCCESS;
     560              : }
     561              : 
     562            1 : HcclResult HcclCommunicator::Send(
     563              :     const std::string& tag, void* inputPtr, u64 count, HcclDataType dataType, u32 destRank, rtStream_t stream,
     564              :     u32 srTag, u32 localGroupRank)
     565              : {
     566            1 :     return HCCL_SUCCESS;
     567              : }
     568              : 
     569            1 : HcclResult HcclCommunicator::SendOutPlace(
     570              :     const std::string& tag, void* inputPtr, u64 count, HcclDataType dataType, u32 destRank, rtStream_t stream)
     571              : {
     572            1 :     return HCCL_SUCCESS;
     573              : }
     574              : 
     575            1 : HcclResult HcclCommunicator::Receive(
     576              :     const std::string& tag, void* outputPtr, u64 count, HcclDataType dataType, u32 srcRank, rtStream_t stream,
     577              :     u32 srTag, u32 localGroupRank)
     578              : {
     579            1 :     return HCCL_SUCCESS;
     580              : }
     581              : 
     582            1 : HcclResult HcclCommunicator::ReceiveOutPlace(
     583              :     const std::string& tag, void* outputPtr, u64 count, HcclDataType dataType, u32 srcRank, rtStream_t stream)
     584              : {
     585            1 :     return HCCL_SUCCESS;
     586              : }
     587              : 
     588            1 : HcclResult HcclCommunicator::RegressCalPreOp(
     589              :     AlltoAllOperator*& alltoAllOperator, const OpParam& opParam, std::unique_ptr<PreProcessMetaInfo>& preMetaInfo)
     590              : {
     591            1 :     return HCCL_SUCCESS;
     592              : }
     593              : 
     594            1 : HcclResult HcclCommunicator::RegressCalPreOp(
     595              :     AlltoAllOperator*& alltoAllOperator, const OpParam& opParam, std::unique_ptr<PreProcessMetaInfo>& preMetaInfo,
     596              :     Stream& preProcessStream)
     597              : {
     598            1 :     return HCCL_SUCCESS;
     599              : }
     600              : 
     601            1 : HcclResult HcclCommunicator::ExecOp(HcclCMDType opType, OpParam& opParam, bool isCustom) { return HCCL_SUCCESS; }
     602              : 
     603              : HcclResult
     604            1 : HcclCommunicator::FreeScratchMemOnOpBaseMode(DeviceMem& scratchMem, const OpParam& opParam, const HcclCMDType& opType)
     605              : {
     606            1 :     return HCCL_SUCCESS;
     607              : }
     608              : 
     609            1 : HcclResult HcclCommunicator::ExecOpAlltoAll(HcclCMDType opType, OpParam& opParam, bool isCustom)
     610              : {
     611            1 :     return HCCL_SUCCESS;
     612              : }
     613              : 
     614            1 : HcclResult HcclCommunicator::HandleAclGraphFirstOpAivBuff(rtStream_t mainStream) { return HCCL_SUCCESS; }
     615              : 
     616            1 : bool HcclCommunicator::StreamIsCapture(rtStream_t mainStream)
     617              : {
     618            1 :     bool isCapture = false;
     619            1 :     return isCapture;
     620              : }
     621              : 
     622            1 : HcclResult HcclCommunicator::CaptureSlaveStreams(rtStream_t mainStream, vector<Stream>& slaveStreams)
     623              : {
     624            1 :     return HCCL_SUCCESS;
     625              : }
     626              : 
     627            1 : HcclResult HcclCommunicator::BuildOpLocalScratchMemResParam(
     628              :     const AlgResourceResponse& algResource, const std::string& newTag, LocalResInfoV2* localResHostPtr)
     629              : {
     630            1 :     return HCCL_SUCCESS;
     631              : }
     632              : 
     633            1 : HcclResult HcclCommunicator::CheckSetRetryStateToWaitResume() { return HCCL_SUCCESS; }
     634              : 
     635            0 : bool HcclCommunicator::HasRoceTransportLinks(OpCommTransport& opTransportReq)
     636              : {
     637              :     (void)opTransportReq;
     638            0 :     return false;
     639              : }
     640              : 
     641            0 : HcclResult HcclCommunicator::AicpuKfcClearOpResLaunch(const std::unordered_set<std::string>& tags)
     642              : {
     643              :     (void)tags;
     644            0 :     return HCCL_SUCCESS;
     645              : }
     646              : 
     647            0 : HcclResult HcclCommunicator::ClearAclgraphHostLinks(const std::unordered_set<std::string>& tags)
     648              : {
     649              :     (void)tags;
     650            0 :     return HCCL_SUCCESS;
     651              : }
     652              : 
     653            1 : HcclResult HcclCommunicator::BuildOpLocalResParam(const AlgResourceResponse& algResource, const std::string& newTag)
     654              : {
     655            1 :     return HCCL_SUCCESS;
     656              : }
     657              : 
     658            0 : HcclResult HcclCommunicator::InitAndCheckAicpuOrderNotify(u8& orderLaunchMode) { return HCCL_SUCCESS; }
     659              : 
     660            1 : HcclResult HcclCommunicator::AllocAndGetStreamContextBuff(u32 streamId, u64& addr, u64& size) { return HCCL_SUCCESS; }
     661              : 
     662            1 : u32 HcclCommunicator::UpdateOpIndex(const OpParam& opParam) { return 0; }
     663              : 
     664            1 : HcclResult HcclCommunicator::BuildAicpuCustomParam() { return HCCL_SUCCESS; }
     665              : 
     666              : HcclResult
     667            0 : HcclCommunicator::BuildAiRmaInfoParam(const std::string& newTag, const std::string& algName, const HcclCMDType opType)
     668              : {
     669            0 :     return HCCL_SUCCESS;
     670              : }
     671              : 
     672            0 : HcclResult HcclCommunicator::BuildAicpuOrderLaunchNotify() { return HCCL_SUCCESS; }
     673              : 
     674              : template <typename T>
     675              : HcclResult HcclCommunicator::CopyVectorToDeviceMem(const u64 len, DeviceMem& dstDeviceMem, const std::vector<T>& srcVec)
     676              : {
     677              :     return HCCL_SUCCESS;
     678              : }
     679              : 
     680            1 : HcclResult HcclCommunicator::BuildOpTopoResTlvParam(
     681              :     const std::string& algName, const std::vector<std::vector<std::vector<u32>>>& inputVectorInfo,
     682              :     DeviceMem& dstTlvDeviceMem, u64& tlvLen)
     683              : {
     684            1 :     return HCCL_SUCCESS;
     685              : }
     686              : 
     687            1 : HcclResult HcclCommunicator::BuildOpTopoResVectorTlvParam(
     688              :     const std::string& algName, const std::vector<std::vector<std::vector<std::vector<u32>>>>& inputVectorInfo,
     689              :     DeviceMem& dstTlvDeviceMem, u64& tlvLen)
     690              : {
     691            1 :     return HCCL_SUCCESS;
     692              : }
     693              : 
     694            1 : HcclResult HcclCommunicator::BuildPairLinkCounter(const std::string& algName) { return HCCL_SUCCESS; }
     695              : 
     696            1 : HcclResult HcclCommunicator::BuildIsUsedRdmaRank(const std::string& algName) { return HCCL_SUCCESS; }
     697              : 
     698            1 : HcclResult HcclCommunicator::BuildNicList(const std::string& algName) { return HCCL_SUCCESS; }
     699              : 
     700            1 : HcclResult HcclCommunicator::BuildBridgeRank(const std::string& algName) { return HCCL_SUCCESS; }
     701              : 
     702            1 : HcclResult HcclCommunicator::BuildCommPlanRank(const std::string& algName) { return HCCL_SUCCESS; }
     703              : 
     704            1 : HcclResult HcclCommunicator::BuildServerAndsuperPodRank(const std::string& algName) { return HCCL_SUCCESS; }
     705              : 
     706            1 : HcclResult HcclCommunicator::BuildOpRetryParam(const AlgResourceResponse& algResource, const std::string& newTag)
     707              : {
     708            1 :     return HCCL_SUCCESS;
     709              : }
     710              : 
     711            1 : HcclResult HcclCommunicator::BuildCommPlaneSubGroupRank(const std::string& algName) { return HCCL_SUCCESS; }
     712              : 
     713            0 : HcclResult HcclCommunicator::BuildHierarchicalAlgOption(u32* ahcConfInfo) { return HCCL_SUCCESS; }
     714              : 
     715            1 : HcclResult HcclCommunicator::BuildOpTopoResParam(const std::string& algName, const AlgResourceResponse& algResource)
     716              : {
     717            1 :     return HCCL_SUCCESS;
     718              : }
     719              : 
     720            1 : HcclResult HcclCommunicator::BuildOpRemoteLinkP2pResParam(
     721              :     const LINK& link, HccltagRemoteResV3& tagRemoteRes, TransportLinkType linkType)
     722              : {
     723            1 :     return HCCL_SUCCESS;
     724              : }
     725              : 
     726            1 : HcclResult HcclCommunicator::BuildOpRemoteLinkRoceResParam(
     727              :     const LINK& link, HccltagRemoteResV3& tagRemoteRes, bool isBackup, bool isRetry, bool isSecondBuild)
     728              : {
     729            1 :     return HCCL_SUCCESS;
     730              : }
     731              : 
     732              : template <typename T>
     733              : HcclResult HcclCommunicator::CreateListNode(T** resHostPtr, T** resDevicePtr)
     734              : {
     735              :     return HCCL_SUCCESS;
     736              : }
     737              : 
     738            1 : HcclResult HcclCommunicator::BuildRemoteResByTag(
     739              :     const std::string& newTag, const u32& usrRankId, HcclRankRelationResV2*& rankRelationResHostPtr,
     740              :     HcclRankRelationResV2*& rankRelationResDevicePtr, bool isBackup, bool isRetry)
     741              : {
     742            1 :     return HCCL_SUCCESS;
     743              : }
     744              : 
     745            1 : HcclResult HcclCommunicator::BuildRelationResByRemoteRankId(
     746              :     const TransportRequest& transportRequest, const LINK& link, HcclRankRelationResV2*& rankRelationResHostPtr,
     747              :     HcclRankRelationResV2*& rankRelationResDevicePtr)
     748              : {
     749            1 :     return HCCL_SUCCESS;
     750              : }
     751              : 
     752            1 : HcclResult HcclCommunicator::ParseRemoteDataToMem(
     753              :     const OpCommTransport& opTransportResponse, const std::string& newTag, const HcclCMDType opType, bool isBackup,
     754              :     bool isRetry)
     755              : {
     756            1 :     return HCCL_SUCCESS;
     757              : }
     758              : 
     759            1 : HcclResult HcclCommunicator::BuildOpRemoteResParam(
     760              :     const AlgResourceResponse& algResource, const std::string& newTag, const HcclCMDType opType, bool isRetry)
     761              : {
     762            1 :     return HCCL_SUCCESS;
     763              : }
     764              : 
     765            1 : HcclResult HcclCommunicator::CopyHostListResToDeviceParam(
     766              :     const std::string& newTag, const ListCommon* headHostList, const u64 size)
     767              : {
     768            1 :     return HCCL_SUCCESS;
     769              : }
     770              : 
     771            0 : HcclResult HcclCommunicator::CopyHostAirmaInfoToDeviceParam(
     772              :     const std::string& newTag, const HcclCMDType opType, const rtStream_t aiCpuStream)
     773              : {
     774            0 :     return HCCL_SUCCESS;
     775              : }
     776              : 
     777            1 : HcclResult HcclCommunicator::CopyHostOpResToDeviceParam(const std::string& newTag) { return HCCL_SUCCESS; }
     778              : 
     779            1 : HcclResult HcclCommunicator::BuildOpResParam(
     780              :     const std::string& algName, const AlgResourceResponse& algResource, const std::string& newTag,
     781              :     const HcclCMDType opType, const rtStream_t aicpuStream)
     782              : {
     783            1 :     return HCCL_SUCCESS;
     784              : }
     785              : 
     786            1 : HcclResult HcclCommunicator::BuildCustomOpResParam() { return HCCL_SUCCESS; }
     787              : 
     788            1 : HcclResult HcclCommunicator::RegisterDfxInfo(
     789              :     const OpParam& param, AlgType algType, const std::vector<Stream>& slaveStreams, bool isAiv,
     790              :     const std::string& newTag)
     791              : {
     792            1 :     return HCCL_SUCCESS;
     793              : }
     794              : 
     795            1 : HcclResult HcclCommunicator::GetReportHcclMC2Info(const Stream& kfcStream, const std::vector<Stream>& aicpuStreams)
     796              : {
     797            1 :     return HCCL_SUCCESS;
     798              : }
     799              : 
     800            1 : HcclResult HcclCommunicator::OrchestrateAicpu(
     801              :     const HcclCMDType& opType, const std::string& algName, const OpParam& param, const AlgResourceResponse& algResource,
     802              :     const std::string& newTag, AlgType algType, bool isCustom, bool needIncreLink, bool needRecreateAlltoallComm)
     803              : {
     804            1 :     return HCCL_SUCCESS;
     805              : }
     806              : 
     807            1 : HcclResult HcclCommunicator::CalcTinySendRecvMem(
     808              :     const OpParam& opParam, AlgResourceResponse& algResResponse, DeviceMem& tinySendRecvMem)
     809              : {
     810            1 :     return HCCL_SUCCESS;
     811              : }
     812              : 
     813            1 : HcclResult HcclCommunicator::AllocAlgNotifys(
     814              :     const std::string& tag, const NotifyLoadType notifyLoadType, const u32 notifyNum,
     815              :     std::vector<std::shared_ptr<LocalNotify>>& notifiesMain, std::vector<std::shared_ptr<LocalNotify>>& notifiesAux)
     816              : {
     817            1 :     return HCCL_SUCCESS;
     818              : }
     819              : 
     820            1 : HcclResult HcclCommunicator::AllocAlgResource(
     821              :     const std::string& newTag, HcclCMDType opType, const OpParam& opParam, AlgResourceRequest& resRequest,
     822              :     AlgResourceResponse& algResResponse, bool selectAivAlg)
     823              : {
     824            1 :     SaveLinkRes(algResResponse.opTransportResponse);
     825            1 :     SaveLinkRes(algResResponse.opTransportResponseBackUp);
     826              : 
     827            1 :     return HCCL_SUCCESS;
     828              : }
     829              : 
     830            1 : HcclResult HcclCommunicator::IncreAllocLink(
     831              :     const std::string& newTag, const OpParam& opParam, AlgResourceRequest& resRequest,
     832              :     AlgResourceResponse& algResResponse)
     833              : {
     834            1 :     SaveLinkRes(algResResponse.opTransportResponse);
     835            1 :     SaveLinkRes(algResResponse.opTransportResponseBackUp);
     836            1 :     return HCCL_SUCCESS;
     837              : }
     838              : 
     839            1 : HcclResult HcclCommunicator::SetDevicePid(s32 devicePid) { return HCCL_SUCCESS; }
     840              : 
     841            1 : void HcclCommunicator::ReleaseWorkSpacebuffer() {}
     842              : 
     843            1 : HcclResult HcclCommunicator::AllocAndClearDeviceMem(u64 size, std::shared_ptr<DeviceMem>& bufferPtr) const
     844              : {
     845            1 :     return HCCL_SUCCESS;
     846              : }
     847              : 
     848            1 : HcclResult HcclCommunicator::AllocAndClearHostMem(u64 size, std::shared_ptr<HostMem>& bufferPtr) const
     849              : {
     850            1 :     return HCCL_SUCCESS;
     851              : }
     852              : 
     853            1 : HcclResult HcclCommunicator::CreateWorkSpace(u64 size, DeviceMem& buffer) const { return HCCL_SUCCESS; }
     854              : 
     855            1 : HcclResult HcclCommunicator::GetWorkSpace(u64* workSpaceSize, u64* workSpace) const { return HCCL_SUCCESS; }
     856              : 
     857            1 : HcclResult HcclCommunicator::InitWorkSpace() { return HCCL_SUCCESS; }
     858              : 
     859            1 : HcclResult HcclCommunicator::FillOpParam(
     860              :     const HcclCMDType commType, OpParam& opParam, const uint64_t count, void* pCount, void* pDispls)
     861              : {
     862            1 :     return HCCL_SUCCESS;
     863              : }
     864              : 
     865            1 : HcclResult HcclCommunicator::AllocComResource(
     866              :     const string& newTag, const string& algName, const HcclCMDType commType, const OpParam& opParam, rtStream_t stream,
     867              :     bool isNeedHostSlaveStream)
     868              : {
     869            1 :     return HCCL_SUCCESS;
     870              : }
     871              : 
     872            1 : HcclResult HcclCommunicator::AllocComResourceByTiling(const std::string& algConfig, void* param)
     873              : {
     874            1 :     return HCCL_SUCCESS;
     875              : }
     876              : 
     877            1 : HcclResult HcclCommunicator::CreateCommResource(
     878              :     const std::string& tag, rtStream_t aiCpuStream, bool isOpbaseMode, void** commContext, const std::string& algConfig)
     879              : {
     880            1 :     return HCCL_SUCCESS;
     881              : }
     882              : 
     883            1 : HcclResult HcclCommunicator::Mc2CreateAndLaunchContext(
     884              :     rtStream_t aiCpuStream, bool isOpbaseMode, void** commContext, const string& tag)
     885              : {
     886            1 :     return HCCL_SUCCESS;
     887              : }
     888              : 
     889              : HcclResult
     890            1 : HcclCommunicator::GetAiCpuNotifyData(const std::shared_ptr<LocalNotify>& localNotify, HcclSignalInfo& notifyInfo)
     891              : {
     892            1 :     return HCCL_SUCCESS;
     893              : }
     894              : 
     895              : HcclResult
     896            1 : HcclCommunicator::CreateAndGetAiCpuNotify(std::shared_ptr<LocalNotify>& localNotify, HcclSignalInfo& notifyInfo)
     897              : {
     898            1 :     return HCCL_SUCCESS;
     899              : }
     900              : 
     901            1 : HcclResult HcclCommunicator::Mc2AiCpuStreamAllocAndGet(u32 streamMode, rtStream_t& aiCpuStream) { return HCCL_SUCCESS; }
     902              : 
     903            1 : HcclResult HcclCommunicator::Mc2AiCpuInitStreamAllocAndGet(u32 streamMode, rtStream_t& aiCpuStream)
     904              : {
     905            1 :     return HCCL_SUCCESS;
     906              : }
     907              : 
     908            0 : HcclResult HcclCommunicator::AicpuResourceInit(
     909              :     const std::string& algName, const AlgResourceResponse& algResource, const std::string& newTag,
     910              :     const rtStream_t& aicpuStream, const HcclCMDType opType, bool isCustom)
     911              : {
     912            0 :     return HCCL_SUCCESS;
     913              : }
     914              : 
     915            1 : HcclResult HcclCommunicator::AiCpuKernelLaunch(const rtStream_t stm, u64 addr, const std::string& kernelName)
     916              : {
     917            1 :     return HCCL_SUCCESS;
     918              : }
     919              : 
     920            0 : HcclResult HcclCommunicator::LoadAICPUKernel(void) { return HCCL_SUCCESS; }
     921              : 
     922            0 : void HcclCommunicator::UnloadAICPUKernel(void) { return; }
     923              : 
     924            0 : HcclResult HcclCommunicator::LoadCustomKernel(void) { return HCCL_SUCCESS; }
     925              : 
     926            0 : void HcclCommunicator::UnloadCustomKernel(void) { return; }
     927              : 
     928            1 : HcclResult HcclCommunicator::AicpuKfcTilingDataLaunch(
     929              :     const OpParam& opParam, const HcclCMDType& opType, const DeviceMem& deviceContext, const std::string& kernelName,
     930              :     const AicpuOpTiling opTilingInfo)
     931              : {
     932            1 :     return HCCL_SUCCESS;
     933              : }
     934              : 
     935              : HcclResult
     936            0 : AicpuInitOpTilingDataAicpuCache(const OpParam& opParam, const HcclCMDType& opType, struct OpTilingData* opTilingData)
     937              : {
     938            0 :     return HCCL_SUCCESS;
     939              : }
     940              : 
     941            1 : HcclResult HcclCommunicator::AicpuInitOpTilingDataBuf(
     942              :     const OpParam& opParam, const HcclCMDType& opType, const std::string& kernelName, const AicpuOpTiling opTilingInfo,
     943              :     u64 dynamicDataSize)
     944              : {
     945            1 :     return HCCL_SUCCESS;
     946              : }
     947              : 
     948            1 : HcclResult HcclCommunicator::AicpuKfcTilingDataLaunchIn(
     949              :     const OpParam& opParam, const DeviceMem& deviceContext, const std::string& kernelName,
     950              :     const AicpuOpTiling opTilingInfo, u64 opTilingDataSize, bool isCustom)
     951              : {
     952            1 :     return HCCL_SUCCESS;
     953              : }
     954              : 
     955            1 : HcclResult HcclCommunicator::AicpuKfcTilingDataLaunchExt(
     956              :     const OpParam& opParam, const HcclCMDType& opType, const DeviceMem& deviceContext, const std::string& kernelName,
     957              :     const AicpuOpTiling opTilingInfo, bool isCustom)
     958              : {
     959            1 :     return HCCL_SUCCESS;
     960              : }
     961              : 
     962            1 : HcclResult HcclCommunicator::AicpuUnfoldKernelLaunch(
     963              :     void* inputPtr, void* outputPtr, const rtStream_t stm, u64 addr, void* tilingDataPtr, u32 tilingDataSize,
     964              :     const std::string& kernelName, HcclWorkflowMode mode, const std::string& tag)
     965              : {
     966            1 :     return HCCL_SUCCESS;
     967              : }
     968              : 
     969            2 : HcclResult HcclCommunicator::AicpuUnfoldKernelLaunchV2(
     970              :     void* inputPtr, void* outputPtr, const rtStream_t stm, u64 addr, void* tilingDataPtr, u32 tilingDataSize,
     971              :     const std::string& kernelName, HcclWorkflowMode mode, const std::string& tag, bool isCustom)
     972              : {
     973            2 :     return HCCL_SUCCESS;
     974              : }
     975              : 
     976            1 : HcclResult HcclCommunicator::InitCombinOpara() { return HCCL_SUCCESS; }
     977              : 
     978            1 : bool HcclCommunicator::GetCommResource(const std::string& tag, void** commContext) { return false; }
     979              : 
     980            1 : bool HcclCommunicator::GetCommResource(void*& commContext) { return false; }
     981              : 
     982            1 : HcclResult HcclCommunicator::GetAicpuOpStreamNotify(HcclRtStream* opStream, u8 aicpuNotifyNum, void** aicpuNotify)
     983              : {
     984            1 :     return HCCL_SUCCESS;
     985              : }
     986              : 
     987            1 : HcclResult HcclCommunicator::GetAicpuOpStreamAndNotify(HcclRtStream* opStream, u8 aicpuNotifyNum, void** aicpuNotify)
     988              : {
     989            1 :     return HCCL_SUCCESS;
     990              : }
     991              : 
     992            1 : HcclResult HcclCommunicator::SetAicpuNotifyInvalid() { return HCCL_SUCCESS; }
     993              : 
     994            1 : HcclResult HcclCommunicator::ReplaceCommInfoByTag(const std::string& tag, std::unique_ptr<CommInfo>& commInfo)
     995              : {
     996            1 :     return HCCL_SUCCESS;
     997              : }
     998              : 
     999            1 : HcclResult HcclCommunicator::CreateMutiStreamResFor310P(const std::string& tag, level1StreamInfo_t& streamInfo)
    1000              : {
    1001            1 :     return HCCL_SUCCESS;
    1002              : }
    1003              : 
    1004            1 : HcclResult HcclCommunicator::CreateCommAndStreamRes(const std::string& tag, Stream& stream) { return HCCL_SUCCESS; }
    1005              : 
    1006            1 : HcclResult HcclCommunicator::GetComm(const std::string& tag, CommBase** comm) { return HCCL_SUCCESS; }
    1007              : 
    1008            1 : HcclResult HcclCommunicator::SetCommResource(
    1009              :     u64 commBufferSize, void* commInPtr, void* commOutPtr, void* commExpPtr, CommBase* comm,
    1010              :     level1StreamInfo_t& streamInfo, Stream& stream)
    1011              : {
    1012            1 :     return HCCL_SUCCESS;
    1013              : }
    1014              : 
    1015            1 : void HcclCommunicator::ReleaseCommContextbuffer() {}
    1016              : 
    1017            1 : HcclResult HcclCommunicator::CreateDeviceCommContext(u64 size, DeviceMem& buffer) const { return HCCL_SUCCESS; }
    1018              : 
    1019            1 : void HcclCommunicator::Break() { return; }
    1020              : 
    1021            1 : HcclResult HcclCommunicator::GetAlltoAllStagedWorkSpaceMemSize(
    1022              :     u64* sendCounts, u64* sdispls, HcclDataType sendType, u64* recvCounts, u64* rdispls, HcclDataType recvType,
    1023              :     u64& memSize)
    1024              : {
    1025            1 :     return HCCL_E_NOT_SUPPORT;
    1026              : }
    1027              : 
    1028            1 : HcclResult HcclCommunicator::GetAlltoAllStagedWorkSpaceMemSize(
    1029              :     std::vector<SendRecvInfo>& allMeshAggregationSendRecvInfo, u64& memSize)
    1030              : {
    1031            1 :     return HCCL_E_NOT_SUPPORT;
    1032              : }
    1033              : 
    1034              : HcclResult
    1035            1 : HcclCommunicator::GetAllReduceScratchSize(const u64 count, const HcclDataType dataType, u64& scratchSize) const
    1036              : {
    1037            1 :     return HCCL_E_NOT_SUPPORT;
    1038              : }
    1039              : 
    1040            1 : HcclResult HcclCommunicator::SetWorldGroupInfo(
    1041              :     std::unordered_map<std::string, std::map<u32, HcclIpAddress>> phyIdNicInfoMap, vector<RankInfo> worldRankInfoList,
    1042              :     vector<u32>& nicRanksPort, vector<u32>& vnicRanksPort)
    1043              : {
    1044            1 :     return HCCL_SUCCESS;
    1045              : }
    1046              : 
    1047            1 : HcclResult HcclCommunicator::GetTopoDesc(HcclTopoDescs* topoDescs, uint32_t topoSize) { return HCCL_SUCCESS; }
    1048              : 
    1049            1 : HcclResult HcclCommunicator::SetAivModeConfig(const bool aivMode) { return HCCL_SUCCESS; }
    1050              : 
    1051            1 : HcclResult HcclCommunicator::SetOnlyAivModeConfig(const bool isOnlyAiv)
    1052              : {
    1053              :     (void)isOnlyAiv;
    1054            1 :     return HCCL_SUCCESS;
    1055              : }
    1056              : 
    1057            1 : HcclResult HcclCommunicator::SetAicpuUnfoldConfig(const bool aicpuUnfold) { return HCCL_SUCCESS; }
    1058              : 
    1059            0 : HcclResult HcclCommunicator::SetExecTimeOutConfig(const s32 execTimeOut) { return HCCL_SUCCESS; }
    1060              : 
    1061            0 : HcclResult HcclCommunicator::SetAlgoConfig(const std::map<HcclCMDType, std::vector<HcclAlgoType>>& algoMap)
    1062              : {
    1063            0 :     return HCCL_SUCCESS;
    1064              : }
    1065              : 
    1066            0 : bool HcclCommunicator::GetAivModeConfig() { return false; }
    1067              : 
    1068            0 : bool HcclCommunicator::GetConfigIsOnlyAivMode() { return false; }
    1069              : 
    1070            0 : bool HcclCommunicator::GetAicpuUnfoldConfig() { return false; }
    1071              : 
    1072            0 : void HcclCommunicator::SetQpQosAttr(u32 trafficClass, u32 serviceLevel)
    1073              : {
    1074            0 :     transportManager_->SetQpQosAttr(trafficClass, serviceLevel);
    1075            0 :     indptOpTransportManager_->SetQpQosAttr(trafficClass, serviceLevel);
    1076            0 : }
    1077              : 
    1078            1 : HcclResult HcclCommunicator::CheckExitWaitResumeState(bool& isChangedLink) { return HCCL_SUCCESS; }
    1079              : 
    1080            1 : HcclResult HcclCommunicator::SetMemoryRange(void* baseVirPtr, size_t size, size_t alignment, uint64_t flags)
    1081              : {
    1082            1 :     return HCCL_SUCCESS;
    1083              : }
    1084              : 
    1085            1 : HcclResult HcclCommunicator::UnsetMemoryRange(void* baseVirPtr) { return HCCL_SUCCESS; }
    1086              : 
    1087            1 : HcclResult HcclCommunicator::ActivateCommMemory(void* virPtr, size_t size, size_t offset, void* handle, uint64_t flags)
    1088              : {
    1089            1 :     return HCCL_SUCCESS;
    1090              : }
    1091              : 
    1092            1 : HcclResult HcclCommunicator::DeactivateCommMemory(void* virPtr) { return HCCL_SUCCESS; }
    1093              : 
    1094            1 : HcclResult HcclCommunicator::SetSingleLinkInfo(
    1095              :     std::unordered_map<u32, bool>& switchRanks, u32 remoteRankId, ChangeLinkInfo& changeLinkInfo)
    1096              : {
    1097            1 :     return HCCL_SUCCESS;
    1098              : }
    1099              : 
    1100            0 : HcclResult HcclCommunicator::SetAttachedStream(u32 graphId, const std::vector<rtStream_t>& streams)
    1101              : {
    1102            0 :     return HCCL_SUCCESS;
    1103              : }
    1104              : 
    1105            0 : u8 HcclCommunicator::GetOrderLaunchMode(bool isCapture) { return 0; }
    1106              : 
    1107              : HcclResult
    1108            1 : HcclCommunicator::SetRemoteRankLinkInfo(std::unordered_map<u32, bool>& switchRanks, ChangeLinkInfo& changeLinkInfo)
    1109              : {
    1110            1 :     return HCCL_SUCCESS;
    1111              : }
    1112              : 
    1113            1 : HcclResult HcclCommunicator::ActiveStoppedLink(
    1114              :     std::map<u32, bool>& remoteRankPortMap, OpCommTransport& opTransportResponse, bool isBackup)
    1115              : {
    1116            1 :     return HCCL_SUCCESS;
    1117              : }
    1118              : 
    1119              : HcclResult
    1120            1 : HcclCommunicator::PrepareLinkForSwitchNic(std::unordered_map<u32, bool>& switchRanks, ChangeLinkInfo& changeLinkInfo)
    1121              : {
    1122            1 :     return HCCL_SUCCESS;
    1123              : }
    1124              : 
    1125            1 : HcclResult HcclCommunicator::ParseSwitchRanks(
    1126              :     uint32_t nRanks, uint32_t* ranks, bool* useBackup, std::unordered_map<u32, bool>& switchRanks)
    1127              : {
    1128            1 :     return HCCL_SUCCESS;
    1129              : }
    1130              : 
    1131            1 : HcclResult HcclCommunicator::SwitchNic(
    1132              :     uint32_t nRanks, uint32_t* ranks, bool* useBackup, std::shared_ptr<HDCommunicate>& controlH2D,
    1133              :     std::shared_ptr<HDCommunicate>& statusD2H)
    1134              : {
    1135            1 :     HcclResult ret = HCCL_SUCCESS;
    1136            1 :     return ret;
    1137              : }
    1138              : 
    1139            1 : HcclResult HcclCommunicator::GetSwitchRanks(
    1140              :     u32* distSwitchRankList, bool* distSwitchUseBackup, u32& distSwitchRankNum, u8* distRemoteRankNicStatus,
    1141              :     u32& distNicStatusNum, bool& needCheckDefaultNic, bool& needCheckBackupNic)
    1142              : {
    1143            1 :     return HCCL_SUCCESS;
    1144              : }
    1145              : 
    1146            1 : HcclResult HcclCommunicator::LoadCustomFile(
    1147              :     const char* binPath, aclrtBinaryLoadOptionType optionType, uint32_t cpuKernelMode, aclrtBinHandle& binHandle)
    1148              : {
    1149            1 :     return HCCL_SUCCESS;
    1150              : }
    1151              : 
    1152            1 : void HcclCommunicator::UnloadBinary(aclrtBinHandle& binHandle) { return; }
    1153              : 
    1154            0 : HcclResult HcclCommunicator::GetCacheMap(
    1155              :     std::unique_ptr<CollAlgOperator>& algOperator, OpParam& opParam, AlgType& algType, bool selectAivAlg,
    1156              :     std::string& newTag)
    1157              : {
    1158            0 :     return HCCL_SUCCESS;
    1159              : }
    1160              : 
    1161            1 : HcclResult HcclCommunicator::ExecOpCache(HcclCMDType opType, OpParam& opParam, HcclCacheInfo& cacheInfo)
    1162              : {
    1163            1 :     return HCCL_SUCCESS;
    1164              : }
    1165              : 
    1166            0 : HcclResult HcclCommunicator::GetLocalCCLBuf(void** addr, uint64_t* size) { return HCCL_SUCCESS; }
    1167              : 
    1168            0 : HcclResult HcclCommunicator::GetRemoteCCLBuf(uint32_t remoteRank, void** addr, uint64_t* size) { return HCCL_SUCCESS; }
    1169            0 : HcclResult HcclCommunicator::GetKFCWorkSpace(void** addr, uint64_t* size) { return HCCL_SUCCESS; }
    1170            0 : HcclResult IndOpTransportAlloc(
    1171              :     const std::string& tag, OpCommTransport& opCommTransport, TransportIOMem& transMem, bool isAicpuModeEn)
    1172              : {
    1173            0 :     return HCCL_SUCCESS;
    1174              : }
    1175            0 : HcclTopoAttr HcclCommunicator::GetTopoAttr() { return {}; }
    1176            0 : aclrtBinHandle HcclCommunicator::GetBinHandle() { return nullptr; }
    1177            0 : HcclResult HcclCommunicator::GetHDCommunicate(
    1178              :     HDCommunicateParams& kfcControlTransferH2DParams, HDCommunicateParams& kfcStatusTransferD2HParams)
    1179              : {
    1180            0 :     return HCCL_SUCCESS;
    1181              : }
    1182            0 : HcclResult HcclCommunicator::SetGetAicpuCommState(std::function<bool()> getAicpuCommState) { return HCCL_SUCCESS; }
    1183              : 
    1184            0 : HcclResult HcclCommunicator::CommGetNetLayers(uint32_t** netLayers, uint32_t* netLayerNum) { return HCCL_SUCCESS; }
    1185              : 
    1186            0 : HcclResult HcclCommunicator::CommGetInstSizeByNetLayer(uint32_t netLayer, uint32_t* rankNum) { return HCCL_SUCCESS; }
    1187            0 : HcclResult HcclCommunicator::CommGetInstTopoTypeByNetLayer(uint32_t netLayer, u32* topoType) { return HCCL_SUCCESS; }
    1188              : 
    1189            0 : HcclResult HcclCommunicator::GetNetLayers(uint32_t** netLayers, uint32_t* netLayerNum) { return HCCL_SUCCESS; }
    1190              : 
    1191            0 : HcclResult HcclCommunicator::GetInstSizeByNetLayer(uint32_t netLayer, uint32_t* rankNum) { return HCCL_SUCCESS; }
    1192              : 
    1193            0 : HcclResult HcclCommunicator::GetInstTopoTypeByNetLayer(uint32_t netLayer, CommTopo* topoType) { return HCCL_SUCCESS; }
    1194              : 
    1195            0 : HcclResult HcclCommunicator::GetInstRanksByNetLayer(uint32_t netLayer, uint32_t** rankList, uint32_t* rankNum)
    1196              : {
    1197            0 :     return HCCL_SUCCESS;
    1198              : }
    1199              : 
    1200            0 : HcclResult HcclCommunicator::GetInstSizeListByNetLayer(uint32_t netLayer, uint32_t** instSizeList, uint32_t* listSize)
    1201              : {
    1202            0 :     return HCCL_SUCCESS;
    1203              : }
    1204              : 
    1205            0 : HcclResult HcclCommunicator::GetRankGraph(GraphType type, void** graph, uint32_t* len) { return HCCL_SUCCESS; }
    1206              : 
    1207            0 : HcclResult HcclCommunicator::GetLinks(
    1208              :     uint32_t netLayer, uint32_t srcRank, uint32_t dstRank, CommLink** linkList, uint32_t* listSize)
    1209              : {
    1210            0 :     return HCCL_SUCCESS;
    1211              : }
    1212              : 
    1213            0 : HcclResult HcclCommunicator::GetTopoInstsByLayer(uint32_t netLayer, uint32_t** topoInsts, uint32_t* topoInstNum)
    1214              : {
    1215            0 :     return HCCL_SUCCESS;
    1216              : }
    1217            0 : HcclResult HcclCommunicator::GetTopoType(uint32_t netLayer, uint32_t topoInstId, CommTopo* topoType)
    1218              : {
    1219            0 :     return HCCL_SUCCESS;
    1220              : }
    1221              : HcclResult
    1222            0 : HcclCommunicator::GetRanksByTopoInst(uint32_t netLayer, uint32_t topoInstId, uint32_t** ranks, uint32_t* rankNum)
    1223              : {
    1224            0 :     return HCCL_SUCCESS;
    1225              : }
    1226            0 : HcclResult HcclCommunicator::GetEndpointNum(uint32_t netLayer, uint32_t topoInstId, uint32_t* num)
    1227              : {
    1228            0 :     return HCCL_SUCCESS;
    1229              : }
    1230              : HcclResult
    1231            0 : HcclCommunicator::GetEndpointDesc(uint32_t netLayer, uint32_t topoInstId, uint32_t* descNum, EndpointDesc* endpointDesc)
    1232              : {
    1233            0 :     return HCCL_SUCCESS;
    1234              : }
    1235              : 
    1236            0 : HcclResult HcclCommunicator::GetHeterogMode(HcclHeterogMode* mode) { return HCCL_SUCCESS; }
    1237              : 
    1238            0 : HcclResult HcclCommunicator::SnapshotCheckPreProcess() { return HCCL_SUCCESS; }
    1239              : 
    1240            0 : HcclResult HcclCommunicator::SnapshotCheckPostProcess() { return HCCL_SUCCESS; }
    1241              : 
    1242            0 : void HcclCommunicator::SetReleaseChannel(std::function<HcclResult()> releaseChannel) { return; }
    1243              : 
    1244            0 : CCLBufferManager& HcclCommunicator::GetCCLbufferManager() { return cclBufferManager_; }
    1245              : 
    1246            0 : void HcclCommunicator::SetHcclQos(u32 hcclQos)
    1247              : {
    1248            0 :     HCCL_INFO("[HcclCommunicator][device][SetHcclQos] hcclQos[%u]", hcclQos);
    1249            0 :     hcclQos_ = hcclQos;
    1250            0 : }
    1251              : 
    1252            0 : u32 HcclCommunicator::GetHcclQos()
    1253              : {
    1254            0 :     HCCL_INFO("[HcclCommunicator][device][GetHcclQos] hcclQos[%u]", hcclQos_);
    1255            0 :     return hcclQos_;
    1256              : }
    1257              : 
    1258            0 : HcclResult HcclCommunicator::InitSymmetricMemory() { return HCCL_SUCCESS; }
    1259              : 
    1260            0 : HcclResult HcclCommunicator::RegisterWindow(void* ptr, size_t size, HcclCommSymWindow* winHandle)
    1261              : {
    1262            0 :     return HCCL_SUCCESS;
    1263              : }
    1264              : 
    1265            0 : HcclResult HcclCommunicator::DeregisterWindow(HcclCommSymWindow winHandle) { return HCCL_SUCCESS; }
    1266              : 
    1267            0 : HcclResult HcclCommunicator::GetCommSymWin(void* ptr, size_t size, HcclCommSymWindow* winHandle, size_t* offset)
    1268              : {
    1269            0 :     return HCCL_SUCCESS;
    1270              : }
    1271              : 
    1272            0 : bool HcclCommunicator::EnableAicpuUnfold(bool isCapture)
    1273              : {
    1274              :     (void)isCapture;
    1275            0 :     return false;
    1276              : }
    1277              : 
    1278            0 : HcclResult ReAllocScratchMemForAlltoall(
    1279              :     HcclCMDType opType, const OpParam& opParam, AlgResourceRequest& resRequest, AlgResourceResponse& algResResponse)
    1280              : {
    1281            0 :     return HCCL_SUCCESS;
    1282              : }
    1283              : 
    1284            0 : HcclResult HcclCommunicator::HandleExistAlgResource(
    1285              :     const std::string& newTag, const std::string& algName, HcclCMDType opType, const OpParam& opParam,
    1286              :     std::unique_ptr<CollAlgOperator>& algOperator, bool selectAivAlg, bool aicpuUnfoldModeFor910B,
    1287              :     bool needRecreateAlltoallComm)
    1288              : {
    1289            0 :     return HCCL_SUCCESS;
    1290              : }
    1291              : 
    1292            0 : HcclResult HcclCommunicator::InitMyRankConnectMode(HcclCommParams& params, const RankTable_t& rankTable)
    1293              : {
    1294            0 :     return HCCL_SUCCESS;
    1295              : }
    1296            0 : uint32_t HcclCommunicator::GetConnectMode() { return HCCL_SUCCESS; }
    1297              : } // namespace hccl
        

Generated by: LCOV version 2.0-1