aclrtBinaryGetFunction

Applicable Products

Product

Supported

Ascend 950PR / Ascend 950DT

√

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

√

Function

Queries a kernel function based on the kernel function name and uses funcHandle to express the kernel function.

For the same binHandle, when the aclrtBinaryGetFunction API is called for the first time, the operator binary data associated with binHandle is copied to the device corresponding to the current context by default.

Prototype

1
aclError aclrtBinaryGetFunction(const aclrtBinHandle binHandle, const char *kernelName, aclrtFuncHandle *funcHandle)

Parameters

Parameter

Input/Output

Description

binHandle

Input

Operator binary handle. For details about the type definition, see aclrtBinHandle.

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

kernelName

Input

Kernel function name.

funcHandle

Output

Kernel function handle. For details about the type definition, see aclrtFuncHandle.

Returns

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

API Call Example

For the API call example, see AI Core Custom Operator Loading.