V1.1.0 or Later

This section describes the AscendCL APIs supported by Ascend AI Processors. The meanings of the identifiers are as follows:

Level-1 Node

Level-2 Node

Level-3 Node

Ascend 310 AI Processor

Ascend 910 AI Processor

Ascend 310P AI Processor

System Configuration

aclInit

  

√

√

√

aclFinalize

  

√

√

√

aclrtGetVersion

  

√

√

√

aclSetCompileopt

  

x

√

√

aclrtGetSocName

  

√

√

√

aclGetRecentErrMsg

  

√

√

√

Device Management

aclrtSetDevice

  

√

√

√

aclrtResetDevice

  

√

√

√

aclrtGetDevice

  

√

√

√

aclrtGetRunMode

  

√

√

√

aclrtSetTsDevice

  

√

√

√

aclrtGetDeviceCount

  

√

√

√

Context Management

aclrtCreateContext

  

√

√

√

aclrtDestroyContext

  

√

√

√

aclrtSetCurrentContext

  

√

√

√

aclrtGetCurrentContext

  

√

√

√

Group Management

aclrtSetGroup

  

x

x

x

aclrtGetGroupCount

  

x

x

x

aclrtCreateGroupInfo

  

x

x

x

aclrtDestroyGroupInfo

  

x

x

x

aclrtGetAllGroupInfo

  

x

x

x

aclrtGetGroupInfoDetail

  

x

x

x

Stream Management

aclrtCreateStream

  

√

√

√

aclrtDestroyStream

  

√

√

√

Synchronization

aclrtCreateEvent

  

√

√

√

aclrtCreateEventWithFlag

  

√

√

√

aclrtDestroyEvent

  

√

√

√

aclrtRecordEvent

  

√

√

√

aclrtResetEvent

  

√

√

√

aclrtQueryEvent

  

Deprecated

Deprecated

Deprecated

aclrtQueryEventStatus

  

√

√

√

aclrtQueryEventWaitStatus

  

√

√

√

aclrtSynchronizeEvent

  

√

√

√

aclrtEventElapsedTime

  

√

√

√

aclrtStreamWaitEvent

  

√

√

√

aclrtSynchronizeDevice

  

√

√

√

aclrtSynchronizeStream

  

√

√

√

aclrtSubscribeReport

  

√

√

√

aclrtLaunchCallback

  

√

√

√

aclrtProcessReport

  

√

√

√

aclrtUnSubscribeReport

  

√

√

√

aclrtSetExceptionInfoCallback

  

√

√

√

aclrtGetTaskIdFromExceptionInfo

  

√

√

√

aclrtGetStreamIdFromExceptionInfo

  

√

√

√

aclrtGetThreadIdFromExceptionInfo

  

√

√

√

aclrtGetDeviceIdFromExceptionInfo

  

√

√

√

aclrtSetOpWaitTimeout

  

√

√

√

Memory Management

aclrtMalloc

  

√

√

√

aclrtMallocCached

  

√

√

√

aclrtMemFlush

  

√

√

√

aclrtMemInvalidate

  

√

√

√

aclrtFree

  

√

√

√

aclrtMallocHost

  

√

√

√

aclrtFreeHost

  

√

√

√

aclrtMemset

  

√

√

√

aclrtMemsetAsync

  

√

√

√

aclrtMemcpy

  

√

√

√

aclrtMemcpyAsync

  

√

√

√

aclrtGetMemInfo

  

√

√

√

aclrtDeviceCanAccessPeer

  

x

√

√

aclrtDeviceEnablePeerAccess

  

x

√

√

aclrtDeviceDisablePeerAccess

  

x

√

√

aclrtMemcpy2d

  

√

√

Supported by Ascend 310P3 AI Processors only.

aclrtMemcpy2dAsync

  

√

√

Supported by Ascend 310P3 AI Processors only.

Model Loading and Execution

aclmdlLoadFromFile

  

√

√

√

aclmdlLoadFromMem

  

√

√

√

aclmdlLoadFromFileWithMem

  

√

√

√

aclmdlLoadFromMemWithMem

  

√

√

√

aclmdlLoadFromFileWithQ

  

x

x

x

aclmdlLoadFromMemWithQ

  

x

x

x

aclmdlExecute

  

√

√

√

aclmdlExecuteAsync

  

√

√

√

aclmdlUnload

  

√

√

√

aclmdlQuerySize

  

√

√

√

aclmdlQuerySizeFromMem

  

√

√

√

aclmdlSetDynamicBatchSize

  

√

√

√

aclmdlSetDynamicHWSize

  

√

√

√

aclmdlSetInputAIPP

  

√

x

√

aclmdlGetFirstAippInfo

  

√

x

√

aclmdlGetAippType

  

√

x

√

aclmdlSetAIPPByInputIndex

  

√

x

√

aclmdlSetInputDynamicDims

  

√

√

√

aclmdlCreateAndGetOpDesc

  

√

√

√

aclmdlInitDump

  

√

√

√

aclmdlSetDump

  

√

√

√

aclmdlFinalizeDump

  

√

√

√

aclmdlSetConfigOpt

  

√

√

√

aclmdlLoadWithConfig

  

√

√

√

Operator Compilation

aclopRegisterCompileFunc

  

√

√

√

aclopUnregisterCompileFunc

  

√

√

√

aclopCreateKernel

  

√

√

√

aclopSetKernelArgs

  

√

√

√

aclopSetKernelWorkspaceSizes

  

√

√

√

aclopUpdateParams

  

√

√

√

aclopCompile

  

x

√

√

aclopSetCompileFlag

  

x

√

√

aclGenGraphAndDumpForOp

  

√

√

√

Operator Loading and Execution

aclopSetModelDir

  

√

√

√

aclopLoad

  

√

√

√

aclopExecute

  

Deprecated

Deprecated

Deprecated

aclopExecuteV2

  

√

√

√

aclopCompileAndExecute

  

√

√

√

aclopExecWithHandle

  

√

√

√

aclopInferShape

  

√

√

√

CBLAS

aclblasGemvEx

  

√

√

√

aclblasCreateHandleForGemvEx

  

√

√

√

aclblasHgemv

  

√

√

√

aclblasCreateHandleForHgemv

  

√

√

√

aclblasS8gemv

  

√

√

√

aclblasCreateHandleForS8gemv

  

√

√

√

aclblasGemmEx

  

√

√

√

aclblasCreateHandleForGemmEx

  

√

√

√

aclblasHgemm

  

√

√

√

aclblasCreateHandleForHgemm

  

√

√

√

aclblasS8gemm

  

√

√

√

aclblasCreateHandleForS8gemm

  

√

√

√

aclopCast

  

√

√

√

aclopCreateHandleForCast

  

√

√

√

Media Data Processing V1

Memory Allocation and Deallocation

acldvppMalloc

√

√

√

acldvppFree

√

√

√

Channel Creation and Destruction

acldvppCreateChannel

√

√

√

acldvppDestroyChannel

√

√

√

aclvdecCreateChannel

√

√

√

aclvdecDestroyChannel

√

√

√

aclvencCreateChannel

√

√

√

aclvencDestroyChannel

√

√

√

VPC

acldvppVpcResizeAsync

√

√

√

acldvppVpcCropAsync

√

√

√

acldvppVpcCropResizeAsync

√

√

√

acldvppVpcBatchCropAsync

√

√

√

acldvppVpcBatchCropResizeAsync

√

√

√

acldvppVpcCropAndPasteAsync

√

√

√

acldvppVpcCropResizePasteAsync

√

√

√

acldvppVpcBatchCropAndPasteAsync

√

√

√

acldvppVpcBatchCropResizePasteAsync

√

√

√

acldvppVpcBatchCropResizeMakeBorderAsync

x

x

√

acldvppVpcConvertColorAsync

x

x

√

acldvppVpcPyrDownAsync

x

x

√

acldvppVpcEqualizeHistAsync

x

x

√

acldvppVpcMakeBorderAsync

x

x

√

acldvppVpcCalcHistAsync

x

x

√

JPEGD

acldvppJpegDecodeAsync

√

√

√

acldvppJpegGetImageInfo

√

√

√

acldvppJpegGetImageInfoV2

√

√

√

acldvppJpegPredictDecSize

√

√

√

JPEGE

acldvppJpegEncodeAsync

√

√

√

acldvppJpegPredictEncSize

√

√

√

PNGD

acldvppPngDecodeAsync

√

√

x

acldvppPngGetImageInfo

√

√

x

acldvppPngPredictDecSize

√

√

x

VDEC

aclvdecSendFrame

√

√

√

aclvdecSendSkippedFrame

√

√

√

aclvdecCallback

√

√

√

VENC

aclvencSendFrame

√

x

√

aclvencCallback

√

x

√

Media Data Processing V2

Common APIs

hi_mpi_sys_init

x

x

√

hi_mpi_sys_exit

x

x

√

hi_mpi_dvpp_malloc

x

x

√

hi_mpi_dvpp_free

x

x

√

hi_mpi_dvpp_get_image_info

x

x

√

hi_mpi_dvpp_get_version

x

x

√

hi_mpi_sys_create_epoll

x

x

√

hi_mpi_sys_ctl_epoll

x

x

√

hi_mpi_sys_wait_epoll

x

x

√

hi_mpi_sys_close_epoll

x

x

√

hi_mpi_sys_set_chn_csc_matrix

x

x

√

hi_mpi_sys_get_chn_csc_matrix

x

x

√

VPC

hi_mpi_vpc_create_chn

x

x

√

hi_mpi_vpc_destroy_chn

x

x

√

hi_mpi_vpc_resize

x

x

√

hi_mpi_vpc_crop

x

x

√

hi_mpi_vpc_crop_resize

x

x

√

hi_mpi_vpc_crop_resize_paste

x

x

√

hi_mpi_vpc_convert_color

x

x

√

hi_mpi_vpc_convert_color_to_yuv420

x

x

√

hi_mpi_vpc_copy_make_border

x

x

√

hi_mpi_vpc_pyrdown

x

x

√

hi_mpi_vpc_calc_hist

x

x

√

hi_mpi_vpc_equalize_hist

x

x

√

hi_mpi_vpc_crop_resize_make_border

x

x

√

hi_mpi_vpc_batch_crop_resize_paste

x

x

√

hi_mpi_vpc_batch_crop_resize_make_border

x

x

√

hi_mpi_vpc_get_process_result

x

x

√

hi_mpi_vpc_sys_create_chn

x

x

√

VDEC/JPEGD

hi_mpi_vdec_create_chn

x

x

√

hi_mpi_vdec_destroy_chn

x

x

√

hi_mpi_vdec_get_chn_attr

x

x

√

hi_mpi_vdec_set_chn_attr

x

x

x

hi_mpi_vdec_start_recv_stream

x

x

√

hi_mpi_vdec_stop_recv_stream

x

x

√

hi_mpi_vdec_query_status

x

x

√

hi_mpi_vdec_reset_chn

x

x

√

hi_mpi_vdec_set_chn_param

x

x

√

hi_mpi_vdec_get_chn_param

x

x

√

hi_mpi_vdec_set_protocol_param

x

x

x

hi_mpi_vdec_get_protocol_param

x

x

√

hi_mpi_vdec_send_stream

x

x

√

hi_mpi_vdec_get_frame

x

x

√

hi_mpi_vdec_release_frame

x

x

√

hi_mpi_vdec_get_fd

x

x

√

hi_mpi_vdec_close_fd

x

x

√

hi_vdec_get_pic_buf_size

x

x

√

hi_vdec_get_tmv_buf_size

x

x

√

VENC/JPEGE

hi_mpi_venc_create_chn

x

x

√

hi_mpi_venc_destroy_chn

x

x

√

hi_mpi_venc_start_chn

x

x

√

hi_mpi_venc_stop_chn

x

x

√

hi_mpi_venc_query_status

x

x

√

hi_mpi_venc_get_stream

x

x

√

hi_mpi_venc_release_stream

x

x

√

hi_mpi_venc_send_frame

x

x

√

hi_mpi_venc_set_mod_param

x

x

√

hi_mpi_venc_get_mod_param

x

x

√

hi_mpi_venc_request_idr

x

x

√

hi_mpi_venc_get_fd

x

x

√

hi_mpi_venc_close_fd

x

x

x

hi_mpi_venc_set_jpeg_param

x

x

√

hi_mpi_venc_get_jpeg_param

x

x

√

hi_mpi_venc_set_chn_param

x

x

√

hi_mpi_venc_set_scene_mode

x

x

√

hi_mpi_venc_set_rc_param

x

x

√

hi_mpi_venc_get_rc_param

x

x

√

hi_mpi_venc_set_jpeg_huffman_param

x

x

√

hi_mpi_venc_get_jpeg_huffman_param

x

x

√

hi_mpi_venc_compact_jpeg_tables

x

x

√

PNGD

hi_mpi_pngd_create_chn

x

x

√

hi_mpi_pngd_destroy_chn

x

x

√

hi_mpi_pngd_send_stream

x

x

√

hi_mpi_pngd_get_image_data

x

x

√

hi_mpi_png_get_image_info

x

x

√

Log Management

aclAppLog

  

√

√

√

Feature Vector Search

aclfvInit

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvRelease

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvRepoAdd

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvRepoDel

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvDel

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvModify

  

x

x

Supported by Ascend 310P3 AI Processors only.

aclfvSearch

  

x

x

Supported by Ascend 310P3 AI Processors only.

Profiling Configuration

aclprofInit

  

√

√

√

aclprofStart

  

√

√

√

aclprofStop

  

√

√

√

aclprofFinalize

  

√

√

√

aclprofCreateStamp

  

√

√

√

aclprofSetStampTraceMessage

  

√

√

√

aclprofMark

  

√

√

√

aclprofPush

  

√

√

√

aclprofPop

  

√

√

√

aclprofRangeStart

  

√

√

√

aclprofRangeStop

  

√

√

√

aclprofDestroyStamp

  

√

√

√

aclprofModelSubscribe

  

√

√

√

aclprofModelUnSubscribe

  

√

√

√

aclprofGetOpDescSize

  

√

√

√

aclprofGetOpNum

  

√

√

√

aclprofGetOpTypeLen

  

√

√

√

aclprofGetOpType

  

√

√

√

aclprofGetOpNameLen

  

√

√

√

aclprofGetOpName

  

√

√

√

aclprofGetOpStart

  

√

√

√

aclprofGetOpEnd

  

√

√

√

aclprofGetOpDuration

  

√

√

√

aclprofGetModelId

  

√

√

√

aclprofGetStepTimestamp

  

√

√

√

Tensor Data Transfer

acltdtCreateChannel

  

x

√

x

acltdtSendTensor

  

x

√

x

acltdtReceiveTensor

  

x

√

x

acltdtStopChannel

  

x

√

x

acltdtDestroyChannel

  

x

√

x

acltdtCreateChannelWithCapacity

  

x

√

x

acltdtQueryChannelSize

  

x

√

x

Data Type Conversion and Data Size Obtaining

aclDataTypeSize

  

√

√

√

aclFloat16ToFloat

  

√

√

√

aclFloatToFloat16

  

√

√

√

Extension

aclextProcessAicpuTask

  

x

x

x

Shared Queue Management

acltdtCreateQueue

  

√

√

√

acltdtDestroyQueue

  

√

√

√

acltdtEnqueueData

  

√

√

√

acltdtDequeueData

  

√

√

√

acltdtEnqueue

  

x

x

x

acltdtDequeue

  

x

x

x

acltdtBindQueueRoutes

  

√

√

√

acltdtUnbindQueueRoutes

  

√

√

√

acltdtQueryQueueRoutes

  

√

√

√

acltdtGrantQueue

  

x

x

x

acltdtAttachQueue

  

x

x

x

Shared Buffer Management

acltdtAllocBuf

  

√

√

√

acltdtFreeBuf

  

√

√

√

acltdtGetBufData

  

√

√

√