Basic APIs

API

Function Usage

aclnninit

Initializes aclnn before any aclnn API is called. It is the initialization API of the single-operator API execution framework.

aclnnFinalize

Deinitializes the single-operator API execution framework.

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.

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.

aclGetScalarListSize

Obtains the size of the aclScalarList.

aclGetStorageShape

Obtains the StorageShape of an 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 an aclTensor.

aclGetViewStrides

Obtains 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.

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

This API is reserved and developers can ignore it.

AclSetOutputTensorAddr

AclSetDynamicInputTensorAddr

AclSetDynamicOutputTensorAddr

AclSetTensorAddr

AclSetDynamicTensorAddr