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 objects such as aclTensor, aclScalar, and aclIntArray. For details about the dependent header files and library files, see Table 1.

API

Description

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 aclTensor list. The tensors in the aclTensor list do not need to be destroyed again.

aclDumpOpTensors

Dumps the input and output tensor data of the operator.

aclGetBoolArraySize

Obtains the size of an aclBoolArray.

aclGetDataType

Obtains the data type of an aclTensor.

aclGetFloatArraySize

Obtains the size of an aclFloatArray.

aclGetFormat

Obtains the format of an aclTensor.

aclGetIntArraySize

Obtains the size of an aclIntArray.

aclGetRawTensorAddr

Obtains the device memory address originally recorded in an aclTensor.

aclGetScalarListSize

Obtains the size of an aclScalarList.

aclGetStorageShape

Obtains the StorageShape of an aclTensor.

aclGetTensorListSize

Obtains the size of the aclTensorList.

aclGetViewOffset

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

aclGetViewShape

Obtains the ViewShape of an aclTensor.

aclGetViewStrides

Obtains the ViewStrides of an 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. No setup required.

AclSetOutputTensorAddr

Reserved. No setup required.

AclSetDynamicInputTensorAddr

Reserved. No setup required.

AclSetDynamicOutputTensorAddr

Reserved. No setup required.

AclSetTensorAddr

Reserved. No setup required.

AclSetDynamicTensorAddr

Reserved. No setup required.