Function: register_cpu_func

Applicable Products

Product

Supported (√/x)

Ascend 950PR/Ascend 950DT

√

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

√

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

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 Values

Return Value

Description

func_handle

Int, kernel function handle.

ret

Int, 0 on success; else, failure.