aclrtKernelArgsInit

Applicable Products

Product

Supported

Ascend 950PR/Ascend 950DT

√

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

√

Function

Initializes the parameter list based on the kernel function handle and obtains the handle that identifies the parameter list.

The difference between this API and aclrtKernelArgsInitByUserMem is that the system manages the memory when this API is called.

Prototype

1
aclError aclrtKernelArgsInit(aclrtFuncHandle funcHandle, aclrtArgsHandle *argsHandle)

Parameters

Parameter

Input/Output

Description

funcHandle

Input

Kernel function handle. For details about the type definition, see aclrtFuncHandle.

Call aclrtBinaryGetFunctionByEntry or aclrtBinaryGetFunction to obtain the kernel function handle, and pass it as an input parameter.

argsHandle

Output

Handle to the parameter list. For details about the type definition, see aclrtArgsHandle.

Returns

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