LCOV - code coverage report
Current view: top level - base_comm/resources/comm_engine_res/threads/device - aicpu_thread_kernel.cc (source / functions) Coverage Total Hit
Test: coverage.info Lines: 94.4 % 36 34
Test Date: 2026-08-04 10:52:23 Functions: 100.0 % 5 5

            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 "framework/aicpu_hccl_process.h"
      12              : #include "aicpu_indop_process.h"
      13              : #include "aicpu_thread_process.h"
      14              : 
      15              : extern "C" {
      16            1 : __attribute__((visibility("default"))) uint32_t RunAicpuIndOpThreadInit(void *args)
      17              : {
      18            1 :     CHK_PTR_NULL(args);
      19            1 :     uint64_t devAddr = *reinterpret_cast<uint64_t*>(args);
      20            1 :     ThreadMgrAicpuParam* param = reinterpret_cast<ThreadMgrAicpuParam*>(devAddr);
      21              :     DevType devType;
      22            1 :     CHK_RET(hrtGetDeviceType(devType));
      23            1 :     if (devType == DevType::DEV_TYPE_950 || devType == DevType::DEV_TYPE_960) {
      24            1 :         HCCL_INFO("[RunAicpuIndOpThreadInit] group[%s], threadNum[%u], deviceType[%u]",
      25              :                 param->hcomId, param->threadNum, devType);
      26            1 :         return AicpuIndopProcess::AicpuIndOpThreadInit(param);
      27              :     }
      28            0 :     return AicpuHcclProcess::AicpuIndOpThreadInit(param);
      29              : }
      30              : 
      31            1 : __attribute__((visibility("default"))) uint32_t RunAicpuIndOpNotify(void *args)
      32              : {
      33            1 :     CHK_PTR_NULL(args);
      34            1 :     uint64_t devAddr = *reinterpret_cast<uint64_t*>(args);
      35            1 :     NotifyMgrAicpuParam* param = reinterpret_cast<NotifyMgrAicpuParam*>(devAddr);
      36              :     DevType devType;
      37            1 :     CHK_RET(hrtGetDeviceType(devType));
      38            1 :     if (devType == DevType::DEV_TYPE_950 || devType == DevType::DEV_TYPE_960) {
      39            1 :         HCCL_INFO("[RunAicpuIndOpNotify] group[%s], notifyNum[%u], deviceType[%u]",
      40              :         param->hcomId, param->notifyNum, devType);
      41            1 :         return AicpuIndopProcess::AicpuIndOpNotifyInit(param);
      42              :     }
      43            0 :     return AicpuHcclProcess::AicpuIndOpNotifyInit(param);
      44              : }
      45              : 
      46            1 : __attribute__((visibility("default"))) uint32_t RunAicpuThreadInit(void* args)
      47              : {
      48            1 :     CHK_PTR_NULL(args);
      49            1 :     uint64_t devAddr = *reinterpret_cast<uint64_t*>(args);
      50            1 :     ThreadMgrAicpuParam* param = reinterpret_cast<ThreadMgrAicpuParam*>(devAddr);
      51            1 :     HCCL_INFO("[RunAicpuThreadInit] threadNum[%u], deviceLogicId[%d], deviceType[%u]", 
      52              :         param->threadNum, param->deviceLogicId, param->deviceType);
      53            1 :     return AicpuThreadProcess::AicpuThreadInit(param);
      54              : }
      55              : 
      56            1 : __attribute__((visibility("default"))) uint32_t RunAicpuThreadDestroy(void* args) 
      57              : {
      58            1 :     CHK_PTR_NULL(args);
      59            1 :     uint64_t devAddr = *reinterpret_cast<uint64_t*>(args);
      60            1 :     ThreadMgrAicpuParam* param = reinterpret_cast<ThreadMgrAicpuParam*>(devAddr);
      61            1 :     HCCL_INFO("[RunAicpuThreadDestroy] threadNum[%u]", param->threadNum);
      62            1 :     return AicpuThreadProcess::AicpuThreadDestroy(param);
      63              : }
      64              : 
      65            1 : __attribute__((visibility("default"))) uint32_t RunAicpuThreadSupplementNotify(void* args)
      66              : {
      67            1 :     CHK_PTR_NULL(args);
      68            1 :     uint64_t devAddr = *reinterpret_cast<uint64_t*>(args);
      69            1 :     ThreadMgrAicpuParam* param = reinterpret_cast<ThreadMgrAicpuParam*>(devAddr);
      70            1 :     HCCL_INFO("[RunAicpuThreadSupplementNotify] threadNum[%u], deviceLogicId[%d], deviceType[%u]", 
      71              :         param->threadNum, param->deviceLogicId, param->deviceType);
      72            1 :     return AicpuThreadProcess::AicpuThreadSupplementNotify(param);
      73              : }
      74              : }
        

Generated by: LCOV version 2.0-1