aclrtRegisterCpuFunc

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Registers an AI CPU operator to obtain funcHandle when calling aclrtBinaryLoadFromData to load the operator binary data of the AI CPU.

This API is only used for AI CPU operators. It will return ACL_ERROR_RT_PARAM_INVALID for other operators.

Prototype

aclError aclrtRegisterCpuFunc(const aclrtBinHandle handle, const char *funcName, const char *kernelName, aclrtFuncHandle *funcHandle)

Parameters

Parameter

Input/Output

Description

handle

Input

Handle of operator binary data.

Call aclrtBinaryLoadFromData to obtain the operator binary handle, and pass it as an input parameter.

funcName

Input

Entry function for executing the AI CPU operator. The value cannot be null.

kernelName

Input

opType of the AI CPU operator. The value cannot be null.

funcHandle

Output

Function handle.

Returns

0 on success; else, failure. For details, see aclError.