---
title: GetKernelName
description: "| 产品 | 是否支持 |"
url: https://www.hiascend.com/document/detail/zh/canncommercial/latest/API/ascendgraphapi/atlasgeapi_07_0371.html
sourcePath: /source/zh/canncommercial/900/API/ascendgraphapi/atlasgeapi_07_0371.html
indexId: 77f465e0395acfb1241cdfa7c8b5ed6350e040a65fc3048eb0f8f1ce5d0fb2d272
---
# GetKernelName

#### 产品支持情况

| 产品 | 是否支持 |
| --- | --- |
| Atlas 350 加速卡 | √ |
| Atlas A3 训练系列产品 / Atlas A3 推理系列产品 | √ |
| Atlas A2 训练系列产品 / Atlas A2 推理系列产品 | √ |
| Atlas 200I/500 A2 推理产品 | √ |
| Atlas 推理系列产品 | √ |
| Atlas 训练系列产品 | √ |


#### 头文件/库文件

- 头文件：#include <graph/kernel_launch_info.h>
- 库文件：libregister.so


#### 功能说明

获取AI CPU任务的Kernel入口函数名字。


#### 函数原型

```
const char *GetKernelName() const
```


#### 参数说明

无


#### 返回值说明

获取成功时返回算子的Kernel入口函数名字。

获取失败时，返回nullptr。


#### 约束说明

只有AI Cpu任务可以获取到Kernel入口函数名字。


#### 调用示例

```
graphStatus Mc2GenTaskCallback(const gert::ExeResGenerationContext *context,
    std::vector<std::vector<uint8_t>> &tasks) {
  auto aicpu_task = KernelLaunchInfo::CreateAicpuKfcTask(context,
      "libccl_kernel.so", "RunAicpuKfcSrvLaunch");
  // 获取到RunAicpuKfcSrvLaunch
  auto so_name = aicpu_task.GetKernelName();
}
```
