GetKernelName

Applicable Products

All processors

Header File/Library File

  • Header file: #include <graph/kernel_launch_info.h>
  • Library file: libregister.so

Function Usage

Obtains the name of the kernel entrypoint function of an AI CPU task.

Prototype

1
const char *GetKernelName() const

Parameters

None

Returns

Operator's kernel entrypoint function name on success.

nullptr on failure.

Restrictions

The kernel entrypoint function name can only be obtained for AI CPU tasks.

Example

1
2
3
4
5
6
7
8
9
graphStatus Mc2GenTaskCallback(const gert::ExeResGenerationContext *context,
    std::vector<std::vector<uint8_t>> &tasks) {
  ...
  auto aicpu_task = KernelLaunchInfo::CreateAicpuKfcTask(context,
      "libccl_kernel.so", "RunAicpuKfcSrvLaunch");
  // Obtain RunAicpuKfcSrvLaunch.
  auto so_name = aicpu_task.GetKernelName();
  ...
}