Function: kernel_args_append

Applicable Products

  • Ascend 950PR&950DT products: Supported
  • Atlas A3 products: Supported
  • Atlas A2 products: Supported
  • Atlas 200I/500 A2 inference products: Supported
  • Atlas inference products: Supported
  • Atlas training products: Supported

Function

Appends and copies a user-defined parameter value to the parameter data area to which argsHandle points. If there are multiple parameters in the parameter list, append the parameters in sequence.

To update the parameter values, call acl.rt.kernel_args_para_update.

Prototype

  • C Prototype

    aclError aclrtKernelArgsAppend(aclrtArgsHandle argsHandle, void *param, size_t paramSize, aclrtParamHandle *paramHandle)
    
  • Python Function

    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 a host memory address.
param_size Int, memory size, in bytes.

Return Values

Return Value Description
param_handle Int, parameter handle.
ret Int. If 0 is returned, the operation is successful. If other values are returned, the operation fails.