Function: register_cpu_func
Applicability
Product |
Supported |
|---|---|
Atlas 350 Accelerator Card |
√ |
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Description
Registers an AI CPU operator to obtain func_handle when calling acl.rt.binary_load_from_data to load the operator binary data of the AI CPU. This API is used only for AI CPU operators. For other operators, ACL_ERROR_RT_PARAM_INVALID is returned.
Prototype
- C Prototype
1aclError aclrtRegisterCpuFunc(const aclrtBinHandle handle, const char *funcName, const char *kernelName, aclrtFuncHandle *funcHandle)
- Python Function
1func_handle, ret = acl.rt.register_cpu_func(bin_handle, func_name, kernel_name)
Parameters
Parameter |
Description |
|---|---|
bin_handle |
Int, handle of the operator binary. Call the acl.rt.binary_load_from_data API to obtain the operator binary handle and pass it to this API as an input parameter. |
func_name |
str: entry point function for executing the AI CPU operator. The value cannot be null. |
kernel_name |
Str, opType of the AI CPU operator. The value cannot be null. |
Return Value
Return Value |
Description |
|---|---|
func_handle |
Int, kernel function handle. |
ret |
Int, 0 on success; else, failure. |