Function: kernel_args_get_place_holder_buffer

Applicability

Product

Supported (√/x)

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

Function Usage

Obtains the memory address to which the param_handle placeholder points based on the memory size specified by the user.

Prototype

  • C Prototype
    1
    aclError aclrtKernelArgsGetPlaceHolderBuffer(aclrtArgsHandle argsHandle, aclrtParamHandle paramHandle, size_t dataSize, void **bufferAddr)
    
  • Python Function
    1
    buffer_addr, ret = acl.rt.kernel_args_get_place_holder_buffer(args_handle, param_handle, data_size)
    

Parameter Description

Parameter

Description

args_handle

Int, handle of the parameter list.

param_handle

Int, parameter handle.

The value of param_handle must be the same as that of param_handle in the acl.rt.kernel_args_append_place_holder API.

data_size

Int, memory size.

Return Value Description

Return Value

Description

buffer_addr

Int, memory address to which the param_handle placeholder points.

You need to manage the data in the memory, but not the memory lifetime.

ret

Int, 0 on success; else, failure.