Function: kernel_args_init

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

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 acl.rt.kernel_args_init_by_user_mem is that this API indicates that the system manages the memory.

Prototype

  • C Prototype

    aclError aclrtKernelArgsInit(aclrtFuncHandle funcHandle, aclrtArgsHandle *argsHandle)
    
  • Python Function

    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 then pass the handle to this API as an argument.

Return Values

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