aclrtLaunchKernelWithConfig

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Specifies the configuration delivered by a task and starts the compute task of the corresponding operator. This API is asynchronous.

When calling this API to deliver the compute task of an AI Core operator, call aclrtBinaryLoadFromFile to load and parse the operator binary file.

Prototype

aclError aclrtLaunchKernelWithConfig(aclrtFuncHandle funcHandle, uint32_t blockDim, aclrtStream stream, aclrtLaunchKernelCfg *cfg, aclrtArgsHandle argsHandle, void *reserve)

Parameters

Parameter

Input/Output

Description

funcHandle

Input

Kernel function handle.

blockDim

Input

Number of cores on which a kernel function will be executed.

stream

Input

Stream for executing a task.

cfg

Input

Configuration delivered by the task.

If no configuration is specified, NULL can be passed.

argsHandle

Input

Handle to the parameter list.

reserve

Input

Reserved parameter. Currently, the value is fixed to NULL.

Returns

0 on success; else, failure. For details, see aclError.

See Also

All the APIs listed in the following table enable the compute tasks of the corresponding operators. However, their functions and usage modes are different.

API

How Kernel Function Parameter Values Are Passed

Where Kernel Function Parameter Values Are Stored

Configuration Customizable to Deliver

aclrtLaunchKernel

Specify the device memory address pointer for storing all input parameter data of the kernel function.

Device memory

No

aclrtLaunchKernelV2

Specify the device memory address pointer for storing all input parameter data of the kernel function.

Device memory

Yes

aclrtLaunchKernelWithConfig

Specify the parameter list handle aclrtArgsHandle.

Host memory

Yes

aclrtLaunchKernelWithHostArgs

Specify the host memory address pointer for storing all input parameter data of the kernel function.

Host memory

Yes