List of Common APIs

This section describes the common meta APIs required for calling the APIs of the NN, fusion, and DVPP operators for creating aclTensor, aclScalar, and aclIntArray objects. For details about the dependent header files and library files, see Table 1.

API

Function

aclCreateBoolArray

Creates an aclBoolArray.

aclCreateFloatArray

Creates an aclFloatArray.

aclCreateIntArray

Creates an aclIntArray.

aclCreateScalar

Creates an aclScalar.

aclCreateScalarList

Creates an aclScalarList.

aclCreateTensor

Creates an aclTensor.

aclCreateTensorList

Creates an aclTensorList.

aclDestroyAclOpExecutor

Destroys a reusable aclOpExecutor.

aclDestroyBoolArray

Destroys the created aclBoolArray.

aclDestroyFloatArray

Destroys the created aclFloatArray.

aclDestroyIntArray

Destroys the created aclIntArray.

aclDestroyScalar

Destroys the created aclScalar.

aclDestroyScalarList

Destroys the created aclScalarList. The scalars in the aclScalarList do not need to be destroyed again.

aclDestroyTensor

Destroys the created aclTensor.

aclDestroyTensorList

Destroys the created aclTensorList. The tensors in the aclTensorList do not need to be destroyed again.

aclGetBoolArraySize

Obtains the size of the aclBoolArray.

aclGetDataType

Obtains the data type of the aclTensor.

aclGetFloatArraySize

Obtains the size of the aclFloatArray.

aclGetFormat

Obtains the format of the aclTensor.

aclGetIntArraySize

Obtains the size of the aclIntArray.

aclGetRawTensorAddr

Obtains the device memory address originally recorded in the aclTensor.

aclGetScalarListSize

Obtains the size of the aclScalarList.

aclGetStorageShape

Obtains the StorageShape of the aclTensor.

aclGetTensorListSize

Obtains the size of the aclTensorList.

aclGetViewOffset

Obtains the ViewOffset of the aclTensor, that is, the offset corresponding to ViewShape.

aclGetViewShape

Obtains the ViewShape of the aclTensor.

aclGetViewStrides

Obtains ViewStrides of the aclTensor, that is, the stride corresponding to ViewShape.

aclInitTensor

Initializes the parameters of a given tensor.

aclSetAclOpExecutorRepeatable

Enables aclOpExecutor to be reusable.

aclSetDynamicInputTensorAddr

After aclOpExecutor reuse is enabled, if the input device memory address changes, the device memory address recorded in the input aclTensorList needs to be updated.

aclSetDynamicOutputTensorAddr

After aclOpExecutor reuse is enabled, if the output device memory address changes, the device memory address recorded in the output aclTensorList needs to be updated.

aclSetDynamicTensorAddr

After aclOpExecutor reuse is enabled, if the input or output device memory address changes, the device memory address recorded in the corresponding aclTensorList needs to be updated.

aclSetInputTensorAddr

After aclOpExecutor reuse is enabled, if the input device memory address changes, the device memory address recorded in the input aclTensor needs to be updated.

aclSetOutputTensorAddr

After aclOpExecutor reuse is enabled, if the output device memory address changes, the device memory address recorded in the output aclTensor needs to be updated.

aclSetRawTensorAddr

Updates the device memory address originally recorded in the aclTensor.

aclSetTensorAddr

After aclOpExecutor reuse is enabled, if the input or output device memory address changes, the device memory address recorded in the corresponding aclTensor needs to be updated.

AclSetInputTensorAddr

Reserved APIs. You can ignore them.

AclSetOutputTensorAddr

AclSetDynamicInputTensorAddr

AclSetDynamicOutputTensorAddr

AclSetTensorAddr

AclSetDynamicTensorAddr