Function: kernel_args_append

Applicability

Product

Supported

Atlas 350 Accelerator Card

Atlas A3 training product/Atlas A3 inference product

Atlas A2 training product/Atlas A2 inference product

Atlas training product

Atlas inference product

Atlas 200I/500 A2 inference product

Description

This API is called to append the parameter values set by the user to the parameter data area pointed to by argsHandle. If there are multiple arguments in the argument list, append the arguments in sequence.

To update the parameter value, call the acl.rt.kernel_args_para_update API.

Prototype

  • C Prototype
    1
    aclError aclrtKernelArgsAppend(aclrtArgsHandle argsHandle, void *param, size_t paramSize, aclrtParamHandle *paramHandle)
    
  • Python Function
    1
    param_handle, ret = acl.rt.kernel_args_append(args_handle, param, param_size)
    

Parameters

Parameter

Description

args_handle

Int, handle of the parameter list.

param

Int, memory address of the parameter value to be appended. This is the host memory address.

param_size

Int, memory size, in bytes.

Return Value

Return Value

Description

param_handle

Int, parameter handle.

ret

Int, 0 on success; else, failure.