Function: binary_get_function

Applicability

Product

Supported (√/x)

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

Function Usage

Searches for the kernel object based on kernel_name and uses func_handle to express the kernel object. Only Ascend C custom operators are supported.

Prototype

  • C Prototype
    1
    aclError aclrtBinaryGetFunction(const aclrtBinHandle binHandle, const char *kernelName, aclrtFuncHandle *funcHandle)
    
  • Python Function
    1
    func_handle, ret= acl.rt.binary_get_function(bin_handle, kernel_name)
    

Parameter Description

Parameter

Description

bin_handle

Int, handle pointing to the operator binary. Call acl.rt.binary_load to obtain binHandle.

kernel_name

Str, kernel name.

Return Value Description

Return Value

Description

func_handle

Int, pointer address of the func_handle expression of the specified kernel.

ret

Int, error code: 0 on success; else, failure.