Function: kernel_args_init

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

Atlas A3 training products/Atlas A3 inference products

√

Atlas A2 training products/Atlas A2 inference products

√

Atlas training products

√

Atlas inference products

√

Atlas 200I/500 A2 inference products

√

Description

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

Different from the acl.rt.kernel_args_init_by_user_mem API, this API indicates that the memory is managed by the system.

Prototype

  • C Prototype
    1
    aclError aclrtKernelArgsInit(aclrtFuncHandle funcHandle, aclrtArgsHandle *argsHandle)
    
  • Python Function
    1
    args_handle, ret = acl.rt.kernel_args_init(func_handle)
    

Parameters

Parameter

Description

func_handle

Int, kernel function handle.

Call acl.rt.binary_get_function to obtain the kernel function handle and transfer it to this API as an input parameter.

Return Values

Return Value

Description

args_handle

Int, handle of the parameter list.

ret

Int, 0 on success; else, failure.