Function: kernel_args_init_by_user_mem
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
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 API, this API indicates that the memory is managed by the user.
Prototype
- C Prototype
1aclError aclrtKernelArgsInitByUserMem(aclrtFuncHandle funcHandle, aclrtArgsHandle argsHandle, void *userHostMem, size_t actualArgsSize)
- Python Function
1ret = acl.rt.kernel_args_init_by_user_mem(func_handle, args_handle, user_host_mem, actual_args_size)
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. |
args_handle |
Int, handle of the parameter list. You need to call the acl.rt.kernel_args_get_handle_mem_size API in advance to obtain the memory size, apply for the host memory, and then pass the host memory address as the input parameter. |
user_host_mem |
Int, host memory address. You need to call the acl.rt.kernel_args_get_mem_size API in advance to obtain the memory size, apply for the host memory, and then pass the host memory address as the input parameter. |
actual_args_size |
Int, memory size. Call acl.rt.kernel_args_get_mem_size to obtain the memory size and pass the memory size to this API as an input parameter. |
Return Value
Return Value |
Description |
|---|---|
ret |
Int, 0 on success; else, failure. |