@@ -136,50 +136,49 @@ static const int ACL_ERROR_PROFILING_FAILURE = 500005; | |||||
#define ACL_UNKNOWN_RANK 0xFFFFFFFFFFFFFFFE | #define ACL_UNKNOWN_RANK 0xFFFFFFFFFFFFFFFE | ||||
typedef enum { | typedef enum { | ||||
ACL_DT_UNDEFINED = -1, | |||||
ACL_FLOAT = 0, | |||||
ACL_FLOAT16 = 1, | |||||
ACL_INT8 = 2, | |||||
ACL_INT32 = 3, | |||||
ACL_UINT8 = 4, | |||||
ACL_INT16 = 6, | |||||
ACL_UINT16 = 7, | |||||
ACL_UINT32 = 8, | |||||
ACL_INT64 = 9, | |||||
ACL_UINT64 = 10, | |||||
ACL_DOUBLE = 11, | |||||
ACL_BOOL = 12, | |||||
ACL_STRING = 13, | |||||
ACL_DT_UNDEFINED = -1, | |||||
ACL_FLOAT = 0, | |||||
ACL_FLOAT16 = 1, | |||||
ACL_INT8 = 2, | |||||
ACL_INT32 = 3, | |||||
ACL_UINT8 = 4, | |||||
ACL_INT16 = 6, | |||||
ACL_UINT16 = 7, | |||||
ACL_UINT32 = 8, | |||||
ACL_INT64 = 9, | |||||
ACL_UINT64 = 10, | |||||
ACL_DOUBLE = 11, | |||||
ACL_BOOL = 12, | |||||
ACL_STRING = 13, | |||||
} aclDataType; | } aclDataType; | ||||
typedef enum { | typedef enum { | ||||
ACL_FORMAT_UNDEFINED = -1, | |||||
ACL_FORMAT_NCHW = 0, | |||||
ACL_FORMAT_NHWC = 1, | |||||
ACL_FORMAT_ND = 2, | |||||
ACL_FORMAT_NC1HWC0 = 3, | |||||
ACL_FORMAT_FRACTAL_Z = 4, | |||||
ACL_FORMAT_NC1HWC0_C04 = 12, | |||||
ACL_FORMAT_NDHWC = 27, | |||||
ACL_FORMAT_FRACTAL_NZ = 29, | |||||
ACL_FORMAT_NCDHW = 30, | |||||
ACL_FORMAT_NDC1HWC0 = 32, | |||||
ACL_FRACTAL_Z_3D = 33 | |||||
ACL_FORMAT_UNDEFINED = -1, | |||||
ACL_FORMAT_NCHW = 0, | |||||
ACL_FORMAT_NHWC = 1, | |||||
ACL_FORMAT_ND = 2, | |||||
ACL_FORMAT_NC1HWC0 = 3, | |||||
ACL_FORMAT_FRACTAL_Z = 4, | |||||
ACL_FORMAT_NC1HWC0_C04 = 12, | |||||
ACL_FORMAT_NDHWC = 27, | |||||
ACL_FORMAT_FRACTAL_NZ = 29, | |||||
ACL_FORMAT_NCDHW = 30, | |||||
ACL_FORMAT_NDC1HWC0 = 32, | |||||
ACL_FRACTAL_Z_3D = 33 | |||||
} aclFormat; | } aclFormat; | ||||
typedef enum { | typedef enum { | ||||
ACL_DEBUG = 0, | |||||
ACL_INFO = 1, | |||||
ACL_WARNING = 2, | |||||
ACL_ERROR = 3, | |||||
ACL_DEBUG = 0, | |||||
ACL_INFO = 1, | |||||
ACL_WARNING = 2, | |||||
ACL_ERROR = 3, | |||||
} aclLogLevel; | } aclLogLevel; | ||||
typedef enum { | typedef enum { | ||||
ACL_MEMTYPE_DEVICE = 0, | |||||
ACL_MEMTYPE_HOST = 1, | |||||
ACL_MEMTYPE_DEVICE = 0, | |||||
ACL_MEMTYPE_HOST = 1, | |||||
} aclMemType; | } aclMemType; | ||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
* @brief Converts data of type aclFloat16 to data of type float | * @brief Converts data of type aclFloat16 to data of type float | ||||
@@ -312,9 +311,7 @@ ACL_FUNC_VISIBILITY size_t aclDataTypeSize(aclDataType dataType); | |||||
* @retval aclTensorDesc pointer. | * @retval aclTensorDesc pointer. | ||||
* @retval nullptr if param is invalid or run out of memory | * @retval nullptr if param is invalid or run out of memory | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, | |||||
int numDims, | |||||
const int64_t *dims, | |||||
ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, int numDims, const int64_t *dims, | |||||
aclFormat format); | aclFormat format); | ||||
/** | /** | ||||
@@ -336,8 +333,7 @@ ACL_FUNC_VISIBILITY void aclDestroyTensorDesc(const aclTensorDesc *desc); | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc* desc, | |||||
size_t dimsCount, | |||||
ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc *desc, size_t dimsCount, | |||||
int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]); | int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]); | ||||
/** | /** | ||||
@@ -434,9 +430,7 @@ ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, si | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, | |||||
size_t index, | |||||
size_t dimRangeNum, | |||||
ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, size_t index, size_t dimRangeNum, | |||||
int64_t *dimRange); | int64_t *dimRange); | ||||
/** | /** | ||||
@@ -473,7 +467,7 @@ ACL_FUNC_VISIBILITY const char *aclGetTensorDescName(aclTensorDesc *desc); | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, | ACL_FUNC_VISIBILITY aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, | ||||
aclTensorDesc **dstDesc); | |||||
aclTensorDesc **dstDesc); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -561,7 +555,7 @@ ACL_FUNC_VISIBILITY aclError aclSetTensorOriginShape(aclTensorDesc *desc, int nu | |||||
* | * | ||||
* @retval null for failed. | * @retval null for failed. | ||||
* @retval OtherValues success. | * @retval OtherValues success. | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, size_t index); | ACL_FUNC_VISIBILITY aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, size_t index); | ||||
/** | /** | ||||
@@ -572,7 +566,7 @@ ACL_FUNC_VISIBILITY aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, | |||||
* | * | ||||
* @retval null for failed | * @retval null for failed | ||||
* @retval OtherValues success | * @retval OtherValues success | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY void *aclGetTensorDescAddress(const aclTensorDesc *desc); | ACL_FUNC_VISIBILITY void *aclGetTensorDescAddress(const aclTensorDesc *desc); | ||||
/** | /** | ||||
@@ -624,13 +618,12 @@ ACL_FUNC_VISIBILITY aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemTy | |||||
* @param ... [IN] the value of current log | * @param ... [IN] the value of current log | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line, | ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line, | ||||
const char *fmt, ...); | |||||
const char *fmt, ...); | |||||
#define ACL_APP_LOG(level, fmt, ...) \ | |||||
aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__) | |||||
#define ACL_APP_LOG(level, fmt, ...) aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__) | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_ACL_BASE_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_BASE_H_ |
@@ -27,19 +27,19 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
#define ACL_MAX_DIM_CNT 128 | |||||
#define ACL_MAX_TENSOR_NAME_LEN 128 | |||||
#define ACL_MAX_BATCH_NUM 128 | |||||
#define ACL_MAX_HW_NUM 128 | |||||
#define ACL_MAX_SHAPE_COUNT 128 | |||||
#define ACL_INVALID_NODE_INDEX 0xFFFFFFFF | |||||
#define ACL_MDL_LOAD_FROM_FILE 1 | |||||
#define ACL_MDL_LOAD_FROM_FILE_WITH_MEM 2 | |||||
#define ACL_MDL_LOAD_FROM_MEM 3 | |||||
#define ACL_MDL_LOAD_FROM_MEM_WITH_MEM 4 | |||||
#define ACL_MDL_LOAD_FROM_FILE_WITH_Q 5 | |||||
#define ACL_MDL_LOAD_FROM_MEM_WITH_Q 6 | |||||
#define ACL_MAX_DIM_CNT 128 | |||||
#define ACL_MAX_TENSOR_NAME_LEN 128 | |||||
#define ACL_MAX_BATCH_NUM 128 | |||||
#define ACL_MAX_HW_NUM 128 | |||||
#define ACL_MAX_SHAPE_COUNT 128 | |||||
#define ACL_INVALID_NODE_INDEX 0xFFFFFFFF | |||||
#define ACL_MDL_LOAD_FROM_FILE 1 | |||||
#define ACL_MDL_LOAD_FROM_FILE_WITH_MEM 2 | |||||
#define ACL_MDL_LOAD_FROM_MEM 3 | |||||
#define ACL_MDL_LOAD_FROM_MEM_WITH_MEM 4 | |||||
#define ACL_MDL_LOAD_FROM_FILE_WITH_Q 5 | |||||
#define ACL_MDL_LOAD_FROM_MEM_WITH_Q 6 | |||||
#define ACL_DYNAMIC_TENSOR_NAME "ascend_mbatch_shape_data" | #define ACL_DYNAMIC_TENSOR_NAME "ascend_mbatch_shape_data" | ||||
#define ACL_DYNAMIC_AIPP_NAME "ascend_dynamic_aipp_data" | #define ACL_DYNAMIC_AIPP_NAME "ascend_dynamic_aipp_data" | ||||
@@ -51,123 +51,123 @@ typedef struct aclAippExtendInfo aclAippExtendInfo; | |||||
typedef struct aclmdlConfigHandle aclmdlConfigHandle; | typedef struct aclmdlConfigHandle aclmdlConfigHandle; | ||||
typedef enum { | typedef enum { | ||||
ACL_YUV420SP_U8 = 1, | |||||
ACL_XRGB8888_U8, | |||||
ACL_RGB888_U8, | |||||
ACL_YUV400_U8, | |||||
ACL_NC1HWC0DI_FP16, | |||||
ACL_NC1HWC0DI_S8, | |||||
ACL_ARGB8888_U8, | |||||
ACL_YUYV_U8, | |||||
ACL_YUV422SP_U8, | |||||
ACL_AYUV444_U8, | |||||
ACL_RAW10, | |||||
ACL_RAW12, | |||||
ACL_RAW16, | |||||
ACL_RAW24, | |||||
ACL_AIPP_RESERVED = 0xffff, | |||||
ACL_YUV420SP_U8 = 1, | |||||
ACL_XRGB8888_U8, | |||||
ACL_RGB888_U8, | |||||
ACL_YUV400_U8, | |||||
ACL_NC1HWC0DI_FP16, | |||||
ACL_NC1HWC0DI_S8, | |||||
ACL_ARGB8888_U8, | |||||
ACL_YUYV_U8, | |||||
ACL_YUV422SP_U8, | |||||
ACL_AYUV444_U8, | |||||
ACL_RAW10, | |||||
ACL_RAW12, | |||||
ACL_RAW16, | |||||
ACL_RAW24, | |||||
ACL_AIPP_RESERVED = 0xffff, | |||||
} aclAippInputFormat; | } aclAippInputFormat; | ||||
typedef enum { | typedef enum { | ||||
ACL_MDL_PRIORITY_INT32 = 0, | |||||
ACL_MDL_LOAD_TYPE_SIZET, | |||||
ACL_MDL_PATH_PTR, /**< pointer to model load path with deep copy */ | |||||
ACL_MDL_MEM_ADDR_PTR, /**< pointer to model memory with shallow copy */ | |||||
ACL_MDL_MEM_SIZET, | |||||
ACL_MDL_WEIGHT_ADDR_PTR, /**< pointer to weight memory of model with shallow copy */ | |||||
ACL_MDL_WEIGHT_SIZET, | |||||
ACL_MDL_WORKSPACE_ADDR_PTR, /**< pointer to worksapce memory of model with shallow copy */ | |||||
ACL_MDL_WORKSPACE_SIZET, | |||||
ACL_MDL_INPUTQ_NUM_SIZET, | |||||
ACL_MDL_INPUTQ_ADDR_PTR, /**< pointer to inputQ with shallow copy */ | |||||
ACL_MDL_OUTPUTQ_NUM_SIZET, | |||||
ACL_MDL_OUTPUTQ_ADDR_PTR /**< pointer to outputQ with shallow copy */ | |||||
ACL_MDL_PRIORITY_INT32 = 0, | |||||
ACL_MDL_LOAD_TYPE_SIZET, | |||||
ACL_MDL_PATH_PTR, /**< pointer to model load path with deep copy */ | |||||
ACL_MDL_MEM_ADDR_PTR, /**< pointer to model memory with shallow copy */ | |||||
ACL_MDL_MEM_SIZET, | |||||
ACL_MDL_WEIGHT_ADDR_PTR, /**< pointer to weight memory of model with shallow copy */ | |||||
ACL_MDL_WEIGHT_SIZET, | |||||
ACL_MDL_WORKSPACE_ADDR_PTR, /**< pointer to worksapce memory of model with shallow copy */ | |||||
ACL_MDL_WORKSPACE_SIZET, | |||||
ACL_MDL_INPUTQ_NUM_SIZET, | |||||
ACL_MDL_INPUTQ_ADDR_PTR, /**< pointer to inputQ with shallow copy */ | |||||
ACL_MDL_OUTPUTQ_NUM_SIZET, | |||||
ACL_MDL_OUTPUTQ_ADDR_PTR /**< pointer to outputQ with shallow copy */ | |||||
} aclmdlConfigAttr; | } aclmdlConfigAttr; | ||||
typedef enum { | typedef enum { | ||||
ACL_DATA_WITHOUT_AIPP = 0, | |||||
ACL_DATA_WITH_STATIC_AIPP, | |||||
ACL_DATA_WITH_DYNAMIC_AIPP, | |||||
ACL_DYNAMIC_AIPP_NODE | |||||
ACL_DATA_WITHOUT_AIPP = 0, | |||||
ACL_DATA_WITH_STATIC_AIPP, | |||||
ACL_DATA_WITH_DYNAMIC_AIPP, | |||||
ACL_DYNAMIC_AIPP_NODE | |||||
} aclmdlInputAippType; | } aclmdlInputAippType; | ||||
typedef struct aclmdlIODims { | typedef struct aclmdlIODims { | ||||
char name[ACL_MAX_TENSOR_NAME_LEN]; /**< tensor name */ | |||||
size_t dimCount; /**< dim array count */ | |||||
int64_t dims[ACL_MAX_DIM_CNT]; /**< dim data array */ | |||||
char name[ACL_MAX_TENSOR_NAME_LEN]; /**< tensor name */ | |||||
size_t dimCount; /**< dim array count */ | |||||
int64_t dims[ACL_MAX_DIM_CNT]; /**< dim data array */ | |||||
} aclmdlIODims; | } aclmdlIODims; | ||||
typedef struct aclAippDims { | typedef struct aclAippDims { | ||||
aclmdlIODims srcDims; /**< input dims before model transform */ | |||||
size_t srcSize; /**< input size before model transform */ | |||||
aclmdlIODims aippOutdims; /**< aipp output dims */ | |||||
size_t aippOutSize; /**< aipp output size */ | |||||
aclmdlIODims srcDims; /**< input dims before model transform */ | |||||
size_t srcSize; /**< input size before model transform */ | |||||
aclmdlIODims aippOutdims; /**< aipp output dims */ | |||||
size_t aippOutSize; /**< aipp output size */ | |||||
} aclAippDims; | } aclAippDims; | ||||
typedef struct aclmdlBatch { | typedef struct aclmdlBatch { | ||||
size_t batchCount; /**< batch array count */ | |||||
uint64_t batch[ACL_MAX_BATCH_NUM]; /**< batch data array */ | |||||
size_t batchCount; /**< batch array count */ | |||||
uint64_t batch[ACL_MAX_BATCH_NUM]; /**< batch data array */ | |||||
} aclmdlBatch; | } aclmdlBatch; | ||||
typedef struct aclmdlHW { | typedef struct aclmdlHW { | ||||
size_t hwCount; /**< height&width array count */ | |||||
uint64_t hw[ACL_MAX_HW_NUM][2]; /**< height&width data array */ | |||||
size_t hwCount; /**< height&width array count */ | |||||
uint64_t hw[ACL_MAX_HW_NUM][2]; /**< height&width data array */ | |||||
} aclmdlHW; | } aclmdlHW; | ||||
typedef struct aclAippInfo { | typedef struct aclAippInfo { | ||||
aclAippInputFormat inputFormat; | |||||
int32_t srcImageSizeW; | |||||
int32_t srcImageSizeH; | |||||
int8_t cropSwitch; | |||||
int32_t loadStartPosW; | |||||
int32_t loadStartPosH; | |||||
int32_t cropSizeW; | |||||
int32_t cropSizeH; | |||||
int8_t resizeSwitch; | |||||
int32_t resizeOutputW; | |||||
int32_t resizeOutputH; | |||||
int8_t paddingSwitch; | |||||
int32_t leftPaddingSize; | |||||
int32_t rightPaddingSize; | |||||
int32_t topPaddingSize; | |||||
int32_t bottomPaddingSize; | |||||
int8_t cscSwitch; | |||||
int8_t rbuvSwapSwitch; | |||||
int8_t axSwapSwitch; | |||||
int8_t singleLineMode; | |||||
int32_t matrixR0C0; | |||||
int32_t matrixR0C1; | |||||
int32_t matrixR0C2; | |||||
int32_t matrixR1C0; | |||||
int32_t matrixR1C1; | |||||
int32_t matrixR1C2; | |||||
int32_t matrixR2C0; | |||||
int32_t matrixR2C1; | |||||
int32_t matrixR2C2; | |||||
int32_t outputBias0; | |||||
int32_t outputBias1; | |||||
int32_t outputBias2; | |||||
int32_t inputBias0; | |||||
int32_t inputBias1; | |||||
int32_t inputBias2; | |||||
int32_t meanChn0; | |||||
int32_t meanChn1; | |||||
int32_t meanChn2; | |||||
int32_t meanChn3; | |||||
float minChn0; | |||||
float minChn1; | |||||
float minChn2; | |||||
float minChn3; | |||||
float varReciChn0; | |||||
float varReciChn1; | |||||
float varReciChn2; | |||||
float varReciChn3; | |||||
aclFormat srcFormat; | |||||
aclDataType srcDatatype; | |||||
size_t srcDimNum; | |||||
size_t shapeCount; | |||||
aclAippDims outDims[ACL_MAX_SHAPE_COUNT]; | |||||
aclAippExtendInfo *aippExtend; /**< reserved parameters, current version needs to be null */ | |||||
aclAippInputFormat inputFormat; | |||||
int32_t srcImageSizeW; | |||||
int32_t srcImageSizeH; | |||||
int8_t cropSwitch; | |||||
int32_t loadStartPosW; | |||||
int32_t loadStartPosH; | |||||
int32_t cropSizeW; | |||||
int32_t cropSizeH; | |||||
int8_t resizeSwitch; | |||||
int32_t resizeOutputW; | |||||
int32_t resizeOutputH; | |||||
int8_t paddingSwitch; | |||||
int32_t leftPaddingSize; | |||||
int32_t rightPaddingSize; | |||||
int32_t topPaddingSize; | |||||
int32_t bottomPaddingSize; | |||||
int8_t cscSwitch; | |||||
int8_t rbuvSwapSwitch; | |||||
int8_t axSwapSwitch; | |||||
int8_t singleLineMode; | |||||
int32_t matrixR0C0; | |||||
int32_t matrixR0C1; | |||||
int32_t matrixR0C2; | |||||
int32_t matrixR1C0; | |||||
int32_t matrixR1C1; | |||||
int32_t matrixR1C2; | |||||
int32_t matrixR2C0; | |||||
int32_t matrixR2C1; | |||||
int32_t matrixR2C2; | |||||
int32_t outputBias0; | |||||
int32_t outputBias1; | |||||
int32_t outputBias2; | |||||
int32_t inputBias0; | |||||
int32_t inputBias1; | |||||
int32_t inputBias2; | |||||
int32_t meanChn0; | |||||
int32_t meanChn1; | |||||
int32_t meanChn2; | |||||
int32_t meanChn3; | |||||
float minChn0; | |||||
float minChn1; | |||||
float minChn2; | |||||
float minChn3; | |||||
float varReciChn0; | |||||
float varReciChn1; | |||||
float varReciChn2; | |||||
float varReciChn3; | |||||
aclFormat srcFormat; | |||||
aclDataType srcDatatype; | |||||
size_t srcDimNum; | |||||
size_t shapeCount; | |||||
aclAippDims outDims[ACL_MAX_SHAPE_COUNT]; | |||||
aclAippExtendInfo *aippExtend; /**< reserved parameters, current version needs to be null */ | |||||
} aclAippInfo; | } aclAippInfo; | ||||
/** | /** | ||||
@@ -339,8 +339,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFile(const char *modelPath, uint32_t | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, | |||||
uint32_t *modelId); | |||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, uint32_t *modelId); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -362,9 +361,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelS | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, | |||||
uint32_t *modelId, void *workPtr, size_t workSize, | |||||
void *weightPtr, size_t weightSize); | |||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, uint32_t *modelId, void *workPtr, | |||||
size_t workSize, void *weightPtr, size_t weightSize); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -387,9 +385,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithMem(const void *model, size_t modelSize, | |||||
uint32_t *modelId, void *workPtr, size_t workSize, | |||||
void *weightPtr, size_t weightSize); | |||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithMem(const void *model, size_t modelSize, uint32_t *modelId, | |||||
void *workPtr, size_t workSize, void *weightPtr, | |||||
size_t weightSize); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -424,8 +422,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithQ(const char *modelPath, uint | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId, | ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMemWithQ(const void *model, size_t modelSize, uint32_t *modelId, | ||||
const uint32_t *inputQ, size_t inputQNum, | |||||
const uint32_t *outputQ, size_t outputQNum); | |||||
const uint32_t *inputQ, size_t inputQNum, const uint32_t *outputQ, | |||||
size_t outputQNum); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -455,8 +453,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlExecute(uint32_t modelId, const aclmdlDataset | |||||
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | ||||
* aclmdlLoadFromMemWithMem | * aclmdlLoadFromMemWithMem | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, | |||||
aclmdlDataset *output, aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output, | |||||
aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -831,11 +829,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPInputFormat(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t csc_switch, | |||||
int16_t cscMatrixR0C0, int16_t cscMatrixR0C1, int16_t cscMatrixR0C2, | |||||
int16_t cscMatrixR1C0, int16_t cscMatrixR1C1, int16_t cscMatrixR1C2, | |||||
int16_t cscMatrixR2C0, int16_t cscMatrixR2C1, int16_t cscMatrixR2C2, | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t csc_switch, int16_t cscMatrixR0C0, | |||||
int16_t cscMatrixR0C1, int16_t cscMatrixR0C2, int16_t cscMatrixR1C0, | |||||
int16_t cscMatrixR1C1, int16_t cscMatrixR1C2, int16_t cscMatrixR2C0, | |||||
int16_t cscMatrixR2C1, int16_t cscMatrixR2C2, | |||||
uint8_t cscOutputBiasR0, uint8_t cscOutputBiasR1, | uint8_t cscOutputBiasR0, uint8_t cscOutputBiasR1, | ||||
uint8_t cscOutputBiasR2, uint8_t cscInputBiasR0, | uint8_t cscOutputBiasR2, uint8_t cscInputBiasR0, | ||||
uint8_t cscInputBiasR1, uint8_t cscInputBiasR2); | uint8_t cscInputBiasR1, uint8_t cscInputBiasR2); | ||||
@@ -851,7 +849,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, in | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t rbuvSwapSwitch); | ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t rbuvSwapSwitch); | ||||
/** | /** | ||||
@@ -865,7 +863,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *aippParmsSe | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t axSwapSwitch); | ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *aippParmsSet, int8_t axSwapSwitch); | ||||
/** | /** | ||||
@@ -880,7 +878,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet, int32_t srcImageSizeW, | ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet, int32_t srcImageSizeW, | ||||
int32_t srcImageSizeH); | int32_t srcImageSizeH); | ||||
@@ -900,14 +898,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, | |||||
int8_t scfSwitch, | |||||
int32_t scfInputSizeW, | |||||
int32_t scfInputSizeH, | |||||
int32_t scfOutputSizeW, | |||||
int32_t scfOutputSizeH, | |||||
uint64_t batchIndex); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, int8_t scfSwitch, int32_t scfInputSizeW, | |||||
int32_t scfInputSizeH, int32_t scfOutputSizeW, | |||||
int32_t scfOutputSizeH, uint64_t batchIndex); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -925,13 +919,9 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, | |||||
int8_t cropSwitch, | |||||
int32_t cropStartPosW, | |||||
int32_t cropStartPosH, | |||||
int32_t cropSizeW, | |||||
int32_t cropSizeH, | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, int8_t cropSwitch, int32_t cropStartPosW, | |||||
int32_t cropStartPosH, int32_t cropSizeW, int32_t cropSizeH, | |||||
uint64_t batchIndex); | uint64_t batchIndex); | ||||
/** | /** | ||||
@@ -950,7 +940,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet, int8_t paddingSwitch, | ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet, int8_t paddingSwitch, | ||||
int32_t paddingSizeTop, int32_t paddingSizeBottom, | int32_t paddingSizeTop, int32_t paddingSizeBottom, | ||||
int32_t paddingSizeLeft, int32_t paddingSizeRight, | int32_t paddingSizeLeft, int32_t paddingSizeRight, | ||||
@@ -971,13 +961,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, | |||||
int16_t dtcPixelMeanChn0, | |||||
int16_t dtcPixelMeanChn1, | |||||
int16_t dtcPixelMeanChn2, | |||||
int16_t dtcPixelMeanChn3, | |||||
uint64_t batchIndex); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, int16_t dtcPixelMeanChn0, | |||||
int16_t dtcPixelMeanChn1, int16_t dtcPixelMeanChn2, | |||||
int16_t dtcPixelMeanChn3, uint64_t batchIndex); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -994,13 +981,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, | |||||
float dtcPixelMinChn0, | |||||
float dtcPixelMinChn1, | |||||
float dtcPixelMinChn2, | |||||
float dtcPixelMinChn3, | |||||
uint64_t batchIndex); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, float dtcPixelMinChn0, | |||||
float dtcPixelMinChn1, float dtcPixelMinChn2, | |||||
float dtcPixelMinChn3, uint64_t batchIndex); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -1017,13 +1001,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
* | * | ||||
* @see aclmdlCreateAIPP | * @see aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, | |||||
float dtcPixelVarReciChn0, | |||||
float dtcPixelVarReciChn1, | |||||
float dtcPixelVarReciChn2, | |||||
float dtcPixelVarReciChn3, | |||||
uint64_t batchIndex); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, float dtcPixelVarReciChn0, | |||||
float dtcPixelVarReciChn1, float dtcPixelVarReciChn2, | |||||
float dtcPixelVarReciChn3, uint64_t batchIndex); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -1039,10 +1020,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, | |||||
* | * | ||||
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | ||||
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, | |||||
aclmdlDataset *dataset, | |||||
size_t index, | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, aclmdlDataset *dataset, size_t index, | |||||
const aclmdlAIPP *aippParmsSet); | const aclmdlAIPP *aippParmsSet); | ||||
/** | /** | ||||
@@ -1059,10 +1038,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, | |||||
* | * | ||||
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | ||||
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, | |||||
aclmdlDataset *dataset, | |||||
size_t index, | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, aclmdlDataset *dataset, size_t index, | |||||
const aclmdlAIPP *aippParmsSet); | const aclmdlAIPP *aippParmsSet); | ||||
/** | /** | ||||
@@ -1080,10 +1057,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, | |||||
* | * | ||||
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | ||||
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, | |||||
size_t index, | |||||
aclmdlInputAippType *type, | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, size_t index, aclmdlInputAippType *type, | |||||
size_t *dynamicAttachedDataIndex); | size_t *dynamicAttachedDataIndex); | ||||
/** | /** | ||||
@@ -1100,7 +1075,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, | |||||
* | * | ||||
* @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | | ||||
* aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t index, aclAippInfo *aippinfo); | ACL_FUNC_VISIBILITY aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t index, aclAippInfo *aippinfo); | ||||
/** | /** | ||||
@@ -1119,10 +1094,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetFirstAippInfo(uint32_t modelId, size_t ind | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed | * @retval ACL_SUCCESS The function is successfully executed | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_t streamId, | |||||
uint32_t taskId, char *opName, size_t opNameLen, aclTensorDesc **inputDesc, size_t *numInputs, | |||||
aclTensorDesc **outputDesc, size_t *numOutputs); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_t streamId, uint32_t taskId, | |||||
char *opName, size_t opNameLen, aclTensorDesc **inputDesc, | |||||
size_t *numInputs, aclTensorDesc **outputDesc, | |||||
size_t *numOutputs); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -1130,7 +1106,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlCreateAndGetOpDesc(uint32_t deviceId, uint32_ | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlInitDump(); | ACL_FUNC_VISIBILITY aclError aclmdlInitDump(); | ||||
/** | /** | ||||
@@ -1141,7 +1117,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlInitDump(); | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlSetDump(const char *dumpCfgPath); | ACL_FUNC_VISIBILITY aclError aclmdlSetDump(const char *dumpCfgPath); | ||||
/** | /** | ||||
@@ -1150,7 +1126,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetDump(const char *dumpCfgPath); | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlFinalizeDump(); | ACL_FUNC_VISIBILITY aclError aclmdlFinalizeDump(); | ||||
/** | /** | ||||
@@ -1162,7 +1138,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlFinalizeDump(); | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *handle, uint32_t *modelId); | ACL_FUNC_VISIBILITY aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *handle, uint32_t *modelId); | ||||
/** | /** | ||||
@@ -1172,7 +1148,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *hand | |||||
* @retval the aclmdlConfigHandle pointer | * @retval the aclmdlConfigHandle pointer | ||||
* | * | ||||
* @see aclmdlDestroyConfigHandle | * @see aclmdlDestroyConfigHandle | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclmdlConfigHandle *aclmdlCreateConfigHandle(); | ACL_FUNC_VISIBILITY aclmdlConfigHandle *aclmdlCreateConfigHandle(); | ||||
/** | /** | ||||
@@ -1201,7 +1177,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlDestroyConfigHandle(aclmdlConfigHandle *handl | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclmdlSetConfigOpt(aclmdlConfigHandle *handle, aclmdlConfigAttr attr, | ACL_FUNC_VISIBILITY aclError aclmdlSetConfigOpt(aclmdlConfigHandle *handle, aclmdlConfigAttr attr, | ||||
const void *attrValue, size_t valueSize); | |||||
const void *attrValue, size_t valueSize); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -1219,4 +1195,4 @@ ACL_FUNC_VISIBILITY const char *aclmdlGetTensorRealName(const aclmdlDesc *modelD | |||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_ACL_MODEL_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_MODEL_H_ |
@@ -33,9 +33,9 @@ typedef void (*aclDataDeallocator)(void *data, size_t length); | |||||
static const int ACL_COMPILE_FLAG_BIN_SELECTOR = 1; | static const int ACL_COMPILE_FLAG_BIN_SELECTOR = 1; | ||||
typedef enum aclEngineType { | typedef enum aclEngineType { | ||||
ACL_ENGINE_SYS, | |||||
ACL_ENGINE_AICORE, | |||||
ACL_ENGINE_VECTOR, | |||||
ACL_ENGINE_SYS, | |||||
ACL_ENGINE_AICORE, | |||||
ACL_ENGINE_VECTOR, | |||||
} aclopEngineType; | } aclopEngineType; | ||||
/** | /** | ||||
@@ -148,7 +148,7 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrString(aclopAttr *attr, const char *att | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *attrName, int numValues, | ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *attrName, int numValues, | ||||
const uint8_t *values); | |||||
const uint8_t *values); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -163,7 +163,7 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *a | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *attrName, int numValues, | ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *attrName, int numValues, | ||||
const int64_t *values); | |||||
const int64_t *values); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -178,7 +178,7 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *at | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char *attrName, int numValues, | ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char *attrName, int numValues, | ||||
const float *values); | |||||
const float *values); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -193,7 +193,7 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char * | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char *attrName, int numValues, | ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char *attrName, int numValues, | ||||
const char **values); | |||||
const char **values); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -208,11 +208,8 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, | |||||
const char *attrName, | |||||
int numLists, | |||||
const int *numValues, | |||||
const int64_t *const values[]); | |||||
ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, const char *attrName, int numLists, | |||||
const int *numValues, const int64_t *const values[]); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -242,15 +239,10 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead") | ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead") | ||||
ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, | |||||
int numInputs, | |||||
const aclTensorDesc *const inputDesc[], | |||||
const aclDataBuffer *const inputs[], | |||||
int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], | |||||
aclDataBuffer *const outputs[], | |||||
const aclopAttr *attr, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], | |||||
const aclDataBuffer *const inputs[], int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], | |||||
const aclopAttr *attr, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -280,15 +272,9 @@ ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, | |||||
int numInputs, | |||||
aclTensorDesc *inputDesc[], | |||||
aclDataBuffer *inputs[], | |||||
int numOutputs, | |||||
aclTensorDesc *outputDesc[], | |||||
aclDataBuffer *outputs[], | |||||
aclopAttr *attr, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, int numInputs, aclTensorDesc *inputDesc[], | |||||
aclDataBuffer *inputs[], int numOutputs, aclTensorDesc *outputDesc[], | |||||
aclDataBuffer *outputs[], aclopAttr *attr, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -306,12 +292,9 @@ ACL_FUNC_VISIBILITY aclError aclopExecuteV2(const char *opType, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, | |||||
int numInputs, | |||||
const aclTensorDesc *const inputDesc[], | |||||
int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], | |||||
const aclopAttr *opAttr, | |||||
ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, int numInputs, | |||||
const aclTensorDesc *const inputDesc[], int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
/** | /** | ||||
@@ -343,12 +326,9 @@ ACL_FUNC_VISIBILITY void aclopDestroyHandle(aclopHandle *handle); | |||||
* | * | ||||
* @see aclopCreateHandle | aclCreateDataBuffer | * @see aclopCreateHandle | aclCreateDataBuffer | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, | |||||
int numInputs, | |||||
const aclDataBuffer *const inputs[], | |||||
int numOutputs, | |||||
aclDataBuffer *const outputs[], | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, int numInputs, | |||||
const aclDataBuffer *const inputs[], int numOutputs, | |||||
aclDataBuffer *const outputs[], aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -364,11 +344,8 @@ ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, | |||||
const aclDataBuffer *srcBuffer, | |||||
const aclTensorDesc *dstDesc, | |||||
aclDataBuffer *dstBuffer, | |||||
uint8_t truncate, | |||||
ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, const aclDataBuffer *srcBuffer, | |||||
const aclTensorDesc *dstDesc, aclDataBuffer *dstBuffer, uint8_t truncate, | |||||
aclrtStream stream); | aclrtStream stream); | ||||
/** | /** | ||||
@@ -383,12 +360,9 @@ ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, | |||||
aclTensorDesc *dstDesc, | |||||
uint8_t truncate, | |||||
ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, aclTensorDesc *dstDesc, uint8_t truncate, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
* @brief create kernel | * @brief create kernel | ||||
@@ -407,15 +381,10 @@ ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, | |||||
* | * | ||||
* @see aclopCompile | * @see aclopCompile | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, | |||||
const char *kernelId, | |||||
const char *kernelName, | |||||
void *binData, | |||||
int binSize, | |||||
aclopEngineType enginetype, | |||||
ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, const char *kernelId, const char *kernelName, | |||||
void *binData, int binSize, aclopEngineType enginetype, | |||||
aclDataDeallocator deallocator); | aclDataDeallocator deallocator); | ||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
* @brief create kernel | * @brief create kernel | ||||
@@ -430,11 +399,8 @@ ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
typedef aclError (*aclopCompileFunc)(int numInputs, | |||||
const aclTensorDesc *const inputDesc[], | |||||
int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], | |||||
const aclopAttr *opAttr, | |||||
typedef aclError (*aclopCompileFunc)(int numInputs, const aclTensorDesc *const inputDesc[], int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], const aclopAttr *opAttr, | |||||
aclopKernelDesc *aclopKernelDesc); | aclopKernelDesc *aclopKernelDesc); | ||||
/** | /** | ||||
@@ -475,11 +441,8 @@ ACL_FUNC_VISIBILITY aclError aclopUnregisterCompileFunc(const char *opType); | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, | |||||
const char *kernelId, | |||||
uint32_t blockDim, | |||||
const void *args, | |||||
uint32_t argSize); | |||||
ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, const char *kernelId, uint32_t blockDim, | |||||
const void *args, uint32_t argSize); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -510,12 +473,9 @@ ACL_FUNC_VISIBILITY aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kerne | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, | |||||
int numInputs, | |||||
const aclTensorDesc *const inputDesc[], | |||||
int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], | |||||
const aclopAttr *attr); | |||||
ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, int numInputs, | |||||
const aclTensorDesc *const inputDesc[], int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], const aclopAttr *attr); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -533,17 +493,12 @@ ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, | |||||
int numInputs, | |||||
aclTensorDesc *inputDesc[], | |||||
aclDataBuffer *inputs[], | |||||
int numOutputs, | |||||
aclTensorDesc *outputDesc[], | |||||
ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, int numInputs, aclTensorDesc *inputDesc[], | |||||
aclDataBuffer *inputs[], int numOutputs, aclTensorDesc *outputDesc[], | |||||
aclopAttr *attr); | aclopAttr *attr); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_ACL_OP_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_OP_H_ |
@@ -24,21 +24,18 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
typedef enum aclCompileType { | |||||
ACL_COMPILE_SYS, | |||||
ACL_COMPILE_UNREGISTERED | |||||
} aclopCompileType; | |||||
typedef enum aclCompileType { ACL_COMPILE_SYS, ACL_COMPILE_UNREGISTERED } aclopCompileType; | |||||
typedef enum { | typedef enum { | ||||
ACL_PRECISION_MODE, | |||||
ACL_AICORE_NUM, | |||||
ACL_AUTO_TUNE_MODE, | |||||
ACL_OP_SELECT_IMPL_MODE, | |||||
ACL_OPTYPELIST_FOR_IMPLMODE, | |||||
ACL_OP_DEBUG_LEVEL, | |||||
ACL_DEBUG_DIR, | |||||
ACL_OP_COMPILER_CACHE_MODE, | |||||
ACL_OP_COMPILER_CACHE_DIR | |||||
ACL_PRECISION_MODE, | |||||
ACL_AICORE_NUM, | |||||
ACL_AUTO_TUNE_MODE, | |||||
ACL_OP_SELECT_IMPL_MODE, | |||||
ACL_OPTYPELIST_FOR_IMPLMODE, | |||||
ACL_OP_DEBUG_LEVEL, | |||||
ACL_DEBUG_DIR, | |||||
ACL_OP_COMPILER_CACHE_MODE, | |||||
ACL_OP_COMPILER_CACHE_DIR | |||||
} aclCompileOpt; | } aclCompileOpt; | ||||
/** | /** | ||||
@@ -59,15 +56,10 @@ typedef enum { | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, | |||||
int numInputs, | |||||
const aclTensorDesc *const inputDesc[], | |||||
int numOutputs, | |||||
const aclTensorDesc *const outputDesc[], | |||||
const aclopAttr *attr, | |||||
aclopEngineType engineType, | |||||
aclopCompileType compileFlag, | |||||
const char *opPath); | |||||
ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], | |||||
int numOutputs, const aclTensorDesc *const outputDesc[], | |||||
const aclopAttr *attr, aclopEngineType engineType, | |||||
aclopCompileType compileFlag, const char *opPath); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -90,11 +82,10 @@ ACL_FUNC_VISIBILITY aclError aclopCompile(const char *opType, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclopCompileAndExecute(const char *opType, | |||||
int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], | |||||
int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], | |||||
const aclopAttr *attr, aclopEngineType engineType, aclopCompileType compileFlag, | |||||
const char *opPath, aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclopCompileAndExecute( | |||||
const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], const aclDataBuffer *const inputs[], | |||||
int numOutputs, const aclTensorDesc *const outputDesc[], aclDataBuffer *const outputs[], const aclopAttr *attr, | |||||
aclopEngineType engineType, aclopCompileType compileFlag, const char *opPath, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -112,4 +103,4 @@ ACL_FUNC_VISIBILITY aclError aclSetCompileopt(aclCompileOpt opt, const char *val | |||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_ACL_OP_COMPILER_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_OP_COMPILER_H_ |
@@ -23,24 +23,24 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
#define ACL_PROF_ACL_API 0x0001 | |||||
#define ACL_PROF_TASK_TIME 0x0002 | |||||
#define ACL_PROF_AICORE_METRICS 0x0004 | |||||
#define ACL_PROF_AICPU 0x0008 | |||||
#define ACL_PROF_ACL_API 0x0001 | |||||
#define ACL_PROF_TASK_TIME 0x0002 | |||||
#define ACL_PROF_AICORE_METRICS 0x0004 | |||||
#define ACL_PROF_AICPU 0x0008 | |||||
/** | /** | ||||
* @deprecated please use aclprofGetOpTypeLen and aclprofGetOpTNameLen instead | * @deprecated please use aclprofGetOpTypeLen and aclprofGetOpTNameLen instead | ||||
*/ | */ | ||||
#define ACL_PROF_MAX_OP_NAME_LEN 257 | |||||
#define ACL_PROF_MAX_OP_TYPE_LEN 65 | |||||
#define ACL_PROF_MAX_OP_NAME_LEN 257 | |||||
#define ACL_PROF_MAX_OP_TYPE_LEN 65 | |||||
typedef enum { | typedef enum { | ||||
ACL_AICORE_ARITHMETIC_UTILIZATION = 0, | |||||
ACL_AICORE_PIPE_UTILIZATION = 1, | |||||
ACL_AICORE_MEMORY_BANDWIDTH = 2, | |||||
ACL_AICORE_L0B_AND_WIDTH = 3, | |||||
ACL_AICORE_RESOURCE_CONFLICT_RATIO = 4, | |||||
ACL_AICORE_NONE = 0xFF | |||||
ACL_AICORE_ARITHMETIC_UTILIZATION = 0, | |||||
ACL_AICORE_PIPE_UTILIZATION = 1, | |||||
ACL_AICORE_MEMORY_BANDWIDTH = 2, | |||||
ACL_AICORE_L0B_AND_WIDTH = 3, | |||||
ACL_AICORE_RESOURCE_CONFLICT_RATIO = 4, | |||||
ACL_AICORE_NONE = 0xFF | |||||
} aclprofAicoreMetrics; | } aclprofAicoreMetrics; | ||||
typedef struct aclprofConfig aclprofConfig; | typedef struct aclprofConfig aclprofConfig; | ||||
@@ -101,7 +101,8 @@ ACL_FUNC_VISIBILITY aclError aclprofStart(const aclprofConfig *profilerConfig); | |||||
* @see aclprofDestroyConfig | * @see aclprofDestroyConfig | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, | ACL_FUNC_VISIBILITY aclprofConfig *aclprofCreateConfig(uint32_t *deviceIdList, uint32_t deviceNums, | ||||
aclprofAicoreMetrics aicoreMetrics, aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig); | |||||
aclprofAicoreMetrics aicoreMetrics, | |||||
aclprofAicoreEvents *aicoreEvents, uint64_t dataTypeConfig); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -141,8 +142,7 @@ ACL_FUNC_VISIBILITY aclError aclprofStop(const aclprofConfig *profilerConfig); | |||||
* | * | ||||
* @see aclprofModelUnSubscribe | * @see aclprofModelUnSubscribe | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclprofModelSubscribe(uint32_t modelId, | |||||
const aclprofSubscribeConfig *profSubscribeConfig); | |||||
ACL_FUNC_VISIBILITY aclError aclprofModelSubscribe(uint32_t modelId, const aclprofSubscribeConfig *profSubscribeConfig); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -170,7 +170,7 @@ ACL_FUNC_VISIBILITY aclError aclprofModelUnSubscribe(uint32_t modelId); | |||||
* @see aclprofDestroySubscribeConfig | * @see aclprofDestroySubscribeConfig | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, | ACL_FUNC_VISIBILITY aclprofSubscribeConfig *aclprofCreateSubscribeConfig(int8_t timeInfoSwitch, | ||||
aclprofAicoreMetrics aicoreMetrics, void *fd); | |||||
aclprofAicoreMetrics aicoreMetrics, void *fd); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -222,7 +222,7 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpNum(const void *opInfo, size_t opInfoLe | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpTypeLen(const void *opInfo, size_t opInfoLen, uint32_t index, | ACL_FUNC_VISIBILITY aclError aclprofGetOpTypeLen(const void *opInfo, size_t opInfoLen, uint32_t index, | ||||
size_t *opTypeLen); | |||||
size_t *opTypeLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -237,8 +237,8 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpTypeLen(const void *opInfo, size_t opIn | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpType(const void *opInfo, size_t opInfoLen, uint32_t index, | |||||
char *opType, size_t opTypeLen); | |||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpType(const void *opInfo, size_t opInfoLen, uint32_t index, char *opType, | |||||
size_t opTypeLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -253,7 +253,7 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpType(const void *opInfo, size_t opInfoL | |||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpNameLen(const void *opInfo, size_t opInfoLen, uint32_t index, | ACL_FUNC_VISIBILITY aclError aclprofGetOpNameLen(const void *opInfo, size_t opInfoLen, uint32_t index, | ||||
size_t *opNameLen); | |||||
size_t *opNameLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -268,8 +268,8 @@ ACL_FUNC_VISIBILITY aclError aclprofGetOpNameLen(const void *opInfo, size_t opIn | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, | |||||
char *opName, size_t opNameLen); | |||||
ACL_FUNC_VISIBILITY aclError aclprofGetOpName(const void *opInfo, size_t opInfoLen, uint32_t index, char *opName, | |||||
size_t opNameLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -326,4 +326,4 @@ ACL_FUNC_VISIBILITY size_t aclprofGetModelId(const void *opInfo, size_t opInfoLe | |||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_PROF_H_ | |||||
#endif // INC_EXTERNAL_ACL_PROF_H_ |
@@ -28,63 +28,63 @@ extern "C" { | |||||
#define ACL_EVENT_TIME_LINE 0x00000008u | #define ACL_EVENT_TIME_LINE 0x00000008u | ||||
typedef enum aclrtRunMode { | typedef enum aclrtRunMode { | ||||
ACL_DEVICE, | |||||
ACL_HOST, | |||||
ACL_DEVICE, | |||||
ACL_HOST, | |||||
} aclrtRunMode; | } aclrtRunMode; | ||||
typedef enum aclrtTsId { | typedef enum aclrtTsId { | ||||
ACL_TS_ID_AICORE = 0, | |||||
ACL_TS_ID_AIVECTOR = 1, | |||||
ACL_TS_ID_RESERVED = 2, | |||||
ACL_TS_ID_AICORE = 0, | |||||
ACL_TS_ID_AIVECTOR = 1, | |||||
ACL_TS_ID_RESERVED = 2, | |||||
} aclrtTsId; | } aclrtTsId; | ||||
typedef enum aclrtEventStatus { | typedef enum aclrtEventStatus { | ||||
ACL_EVENT_STATUS_COMPLETE = 0, | |||||
ACL_EVENT_STATUS_NOT_READY = 1, | |||||
ACL_EVENT_STATUS_RESERVED = 2, | |||||
ACL_EVENT_STATUS_COMPLETE = 0, | |||||
ACL_EVENT_STATUS_NOT_READY = 1, | |||||
ACL_EVENT_STATUS_RESERVED = 2, | |||||
} aclrtEventStatus; | } aclrtEventStatus; | ||||
typedef enum aclrtCallbackBlockType { | typedef enum aclrtCallbackBlockType { | ||||
ACL_CALLBACK_NO_BLOCK, | |||||
ACL_CALLBACK_BLOCK, | |||||
ACL_CALLBACK_NO_BLOCK, | |||||
ACL_CALLBACK_BLOCK, | |||||
} aclrtCallbackBlockType; | } aclrtCallbackBlockType; | ||||
typedef enum aclrtMemcpyKind { | typedef enum aclrtMemcpyKind { | ||||
ACL_MEMCPY_HOST_TO_HOST, | |||||
ACL_MEMCPY_HOST_TO_DEVICE, | |||||
ACL_MEMCPY_DEVICE_TO_HOST, | |||||
ACL_MEMCPY_DEVICE_TO_DEVICE, | |||||
ACL_MEMCPY_HOST_TO_HOST, | |||||
ACL_MEMCPY_HOST_TO_DEVICE, | |||||
ACL_MEMCPY_DEVICE_TO_HOST, | |||||
ACL_MEMCPY_DEVICE_TO_DEVICE, | |||||
} aclrtMemcpyKind; | } aclrtMemcpyKind; | ||||
typedef enum aclrtMemMallocPolicy { | typedef enum aclrtMemMallocPolicy { | ||||
ACL_MEM_MALLOC_HUGE_FIRST, | |||||
ACL_MEM_MALLOC_HUGE_ONLY, | |||||
ACL_MEM_MALLOC_NORMAL_ONLY, | |||||
ACL_MEM_MALLOC_HUGE_FIRST_P2P, | |||||
ACL_MEM_MALLOC_HUGE_ONLY_P2P, | |||||
ACL_MEM_MALLOC_NORMAL_ONLY_P2P, | |||||
ACL_MEM_MALLOC_HUGE_FIRST, | |||||
ACL_MEM_MALLOC_HUGE_ONLY, | |||||
ACL_MEM_MALLOC_NORMAL_ONLY, | |||||
ACL_MEM_MALLOC_HUGE_FIRST_P2P, | |||||
ACL_MEM_MALLOC_HUGE_ONLY_P2P, | |||||
ACL_MEM_MALLOC_NORMAL_ONLY_P2P, | |||||
} aclrtMemMallocPolicy; | } aclrtMemMallocPolicy; | ||||
typedef enum aclrtMemAttr { | typedef enum aclrtMemAttr { | ||||
ACL_DDR_MEM, | |||||
ACL_HBM_MEM, | |||||
ACL_DDR_MEM_HUGE, | |||||
ACL_DDR_MEM_NORMAL, | |||||
ACL_HBM_MEM_HUGE, | |||||
ACL_HBM_MEM_NORMAL, | |||||
ACL_DDR_MEM_P2P_HUGE, | |||||
ACL_DDR_MEM_P2P_NORMAL, | |||||
ACL_HBM_MEM_P2P_HUGE, | |||||
ACL_HBM_MEM_P2P_NORMAL, | |||||
ACL_DDR_MEM, | |||||
ACL_HBM_MEM, | |||||
ACL_DDR_MEM_HUGE, | |||||
ACL_DDR_MEM_NORMAL, | |||||
ACL_HBM_MEM_HUGE, | |||||
ACL_HBM_MEM_NORMAL, | |||||
ACL_DDR_MEM_P2P_HUGE, | |||||
ACL_DDR_MEM_P2P_NORMAL, | |||||
ACL_HBM_MEM_P2P_HUGE, | |||||
ACL_HBM_MEM_P2P_NORMAL, | |||||
} aclrtMemAttr; | } aclrtMemAttr; | ||||
typedef enum aclrtGroupAttr { | typedef enum aclrtGroupAttr { | ||||
ACL_GROUP_AICORE_INT, | |||||
ACL_GROUP_AIV_INT, | |||||
ACL_GROUP_AIC_INT, | |||||
ACL_GROUP_SDMANUM_INT, | |||||
ACL_GROUP_ASQNUM_INT, | |||||
ACL_GROUP_GROUPID_INT | |||||
ACL_GROUP_AICORE_INT, | |||||
ACL_GROUP_AIV_INT, | |||||
ACL_GROUP_AIC_INT, | |||||
ACL_GROUP_SDMANUM_INT, | |||||
ACL_GROUP_ASQNUM_INT, | |||||
ACL_GROUP_GROUPID_INT | |||||
} aclrtGroupAttr; | } aclrtGroupAttr; | ||||
typedef struct tagRtGroupInfo aclrtGroupInfo; | typedef struct tagRtGroupInfo aclrtGroupInfo; | ||||
@@ -487,7 +487,7 @@ ACL_FUNC_VISIBILITY aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stre | |||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream); | ACL_FUNC_VISIBILITY aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream); | ||||
/** | |||||
/** | |||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
* @brief Queries an event's status | * @brief Queries an event's status | ||||
* | * | ||||
@@ -549,9 +549,7 @@ ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent start, | |||||
* | * | ||||
* @see aclrtFree | acldvppMalloc | aclrtMallocCached | * @see aclrtFree | acldvppMalloc | aclrtMallocCached | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, | |||||
size_t size, | |||||
aclrtMemMallocPolicy policy); | |||||
ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, size_t size, aclrtMemMallocPolicy policy); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -574,9 +572,7 @@ ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, | |||||
* | * | ||||
* @see aclrtFree | aclrtMalloc | * @see aclrtFree | aclrtMalloc | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, | |||||
size_t size, | |||||
aclrtMemMallocPolicy policy); | |||||
ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, size_t size, aclrtMemMallocPolicy policy); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -667,10 +663,7 @@ ACL_FUNC_VISIBILITY aclError aclrtFreeHost(void *hostPtr); | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, | |||||
size_t destMax, | |||||
const void *src, | |||||
size_t count, | |||||
ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, size_t destMax, const void *src, size_t count, | |||||
aclrtMemcpyKind kind); | aclrtMemcpyKind kind); | ||||
/** | /** | ||||
@@ -717,38 +710,31 @@ ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t | |||||
* | * | ||||
* @see aclrtSynchronizeStream | * @see aclrtSynchronizeStream | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, | |||||
size_t destMax, | |||||
const void *src, | |||||
size_t count, | |||||
aclrtMemcpyKind kind, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, size_t destMax, const void *src, size_t count, | |||||
aclrtMemcpyKind kind, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | |||||
* @brief Asynchronous initialize memory | |||||
* and set contents of memory to specified value async | |||||
* | |||||
* @par Function | |||||
* @ingroup AscendCL | |||||
* @brief Asynchronous initialize memory | |||||
* and set contents of memory to specified value async | |||||
* | |||||
* @par Function | |||||
* The memory to be initialized is on the Host or device side, | * The memory to be initialized is on the Host or device side, | ||||
* and the system determines whether | * and the system determines whether | ||||
* it is host or device according to the address | * it is host or device according to the address | ||||
* | * | ||||
* @param devPtr [IN] destination address pointer | |||||
* @param maxCount [IN] Max length of destination address memory | |||||
* @param value [IN] set value | |||||
* @param count [IN] the number of byte to set | |||||
* @param stream [IN] asynchronized task stream | |||||
* | |||||
* @retval ACL_SUCCESS The function is successfully executed. | |||||
* @retval OtherValues Failure | |||||
* | |||||
* @see aclrtSynchronizeStream | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, | |||||
size_t maxCount, | |||||
int32_t value, | |||||
size_t count, | |||||
* @param devPtr [IN] destination address pointer | |||||
* @param maxCount [IN] Max length of destination address memory | |||||
* @param value [IN] set value | |||||
* @param count [IN] the number of byte to set | |||||
* @param stream [IN] asynchronized task stream | |||||
* | |||||
* @retval ACL_SUCCESS The function is successfully executed. | |||||
* @retval OtherValues Failure | |||||
* | |||||
* @see aclrtSynchronizeStream | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, size_t maxCount, int32_t value, size_t count, | |||||
aclrtStream stream); | aclrtStream stream); | ||||
/** | /** | ||||
@@ -894,11 +880,8 @@ ACL_FUNC_VISIBILITY aclError aclrtGetAllGroupInfo(aclrtGroupInfo *groupInfo); | |||||
* | * | ||||
* @see aclrtGetGroupCount | aclrtGetAllGroupInfo | * @see aclrtGetGroupCount | aclrtGetAllGroupInfo | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, | |||||
int32_t groupIndex, | |||||
aclrtGroupAttr attr, | |||||
void *attrValue, | |||||
size_t valueLen, | |||||
ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, int32_t groupIndex, | |||||
aclrtGroupAttr attr, void *attrValue, size_t valueLen, | |||||
size_t *paramRetSize); | size_t *paramRetSize); | ||||
/** | /** | ||||
@@ -961,5 +944,4 @@ ACL_FUNC_VISIBILITY aclError aclrtGetMemInfo(aclrtMemAttr attr, size_t *free, si | |||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_ACL_RT_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_RT_H_ |
@@ -24,10 +24,10 @@ extern "C" { | |||||
#endif | #endif | ||||
enum acltdtTensorType { | enum acltdtTensorType { | ||||
ACL_TENSOR_DATA_UNDEFINED = -1, | |||||
ACL_TENSOR_DATA_TENSOR, | |||||
ACL_TENSOR_DATA_END_OF_SEQUENCE, | |||||
ACL_TENSOR_DATA_ABNORMAL | |||||
ACL_TENSOR_DATA_UNDEFINED = -1, | |||||
ACL_TENSOR_DATA_TENSOR, | |||||
ACL_TENSOR_DATA_END_OF_SEQUENCE, | |||||
ACL_TENSOR_DATA_ABNORMAL | |||||
}; | }; | ||||
typedef struct acltdtDataItem acltdtDataItem; | typedef struct acltdtDataItem acltdtDataItem; | ||||
@@ -64,7 +64,7 @@ ACL_FUNC_VISIBILITY aclDataType acltdtGetDataTypeFromItem(const acltdtDataItem * | |||||
* | * | ||||
* @retval null for failed | * @retval null for failed | ||||
* @retval OtherValues success | * @retval OtherValues success | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY void *acltdtGetDataAddrFromItem(const acltdtDataItem *dataItem); | ACL_FUNC_VISIBILITY void *acltdtGetDataAddrFromItem(const acltdtDataItem *dataItem); | ||||
/** | /** | ||||
@@ -75,7 +75,7 @@ ACL_FUNC_VISIBILITY void *acltdtGetDataAddrFromItem(const acltdtDataItem *dataIt | |||||
* | * | ||||
* @retval 0 for failed | * @retval 0 for failed | ||||
* @retval OtherValues success | * @retval OtherValues success | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY size_t acltdtGetDataSizeFromItem(const acltdtDataItem *dataItem); | ACL_FUNC_VISIBILITY size_t acltdtGetDataSizeFromItem(const acltdtDataItem *dataItem); | ||||
/** | /** | ||||
@@ -86,7 +86,7 @@ ACL_FUNC_VISIBILITY size_t acltdtGetDataSizeFromItem(const acltdtDataItem *dataI | |||||
* | * | ||||
* @retval 0 for failed | * @retval 0 for failed | ||||
* @retval OtherValues success | * @retval OtherValues success | ||||
*/ | |||||
*/ | |||||
ACL_FUNC_VISIBILITY size_t acltdtGetDimNumFromItem(const acltdtDataItem *dataItem); | ACL_FUNC_VISIBILITY size_t acltdtGetDimNumFromItem(const acltdtDataItem *dataItem); | ||||
/** | /** | ||||
@@ -118,12 +118,8 @@ ACL_FUNC_VISIBILITY aclError acltdtGetDimsFromItem(const acltdtDataItem *dataIte | |||||
* | * | ||||
* @see acltdtDestroyDataItem | * @see acltdtDestroyDataItem | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType, | |||||
const int64_t *dims, | |||||
size_t dimNum, | |||||
aclDataType dataType, | |||||
void *data, | |||||
size_t size); | |||||
ACL_FUNC_VISIBILITY acltdtDataItem *acltdtCreateDataItem(acltdtTensorType tdtType, const int64_t *dims, size_t dimNum, | |||||
aclDataType dataType, void *data, size_t size); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -254,8 +250,7 @@ ACL_FUNC_VISIBILITY aclError acltdtDestroyChannel(acltdtChannelHandle *handle); | |||||
* | * | ||||
* @see acltdtReceiveTensor | * @see acltdtReceiveTensor | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle, | |||||
const acltdtDataset *dataset, | |||||
ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle, const acltdtDataset *dataset, | |||||
int32_t timeout); | int32_t timeout); | ||||
/** | /** | ||||
@@ -271,13 +266,11 @@ ACL_FUNC_VISIBILITY aclError acltdtSendTensor(const acltdtChannelHandle *handle, | |||||
* | * | ||||
* @see acltdtSendTensor | * @see acltdtSendTensor | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError acltdtReceiveTensor(const acltdtChannelHandle *handle, | |||||
acltdtDataset *dataset, | |||||
ACL_FUNC_VISIBILITY aclError acltdtReceiveTensor(const acltdtChannelHandle *handle, acltdtDataset *dataset, | |||||
int32_t timeout); | int32_t timeout); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif //INC_EXTERNAL_ACL_ACL_TDT_H_ | |||||
#endif // INC_EXTERNAL_ACL_ACL_TDT_H_ |
@@ -23,80 +23,80 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
static const int32_t ACL_RT_SUCCESS = 0; // success | |||||
static const int32_t ACL_RT_SUCCESS = 0; // success | |||||
static const int32_t ACL_ERROR_RT_PARAM_INVALID = 107000; // param invalid | |||||
static const int32_t ACL_ERROR_RT_INVALID_DEVICEID = 107001; // invalid device id | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_NULL = 107002; // current context null | |||||
static const int32_t ACL_ERROR_RT_STREAM_CONTEXT = 107003; // stream not in current context | |||||
static const int32_t ACL_ERROR_RT_MODEL_CONTEXT = 107004; // model not in current context | |||||
static const int32_t ACL_ERROR_RT_STREAM_MODEL = 107005; // stream not in model | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID = 107006; // event timestamp invalid | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL = 107007; // event timestamp reversal | |||||
static const int32_t ACL_ERROR_RT_ADDR_UNALIGNED = 107008; // memory address unaligned | |||||
static const int32_t ACL_ERROR_RT_FILE_OPEN = 107009; // open file failed | |||||
static const int32_t ACL_ERROR_RT_FILE_WRITE = 107010; // write file failed | |||||
static const int32_t ACL_ERROR_RT_STREAM_SUBSCRIBE = 107011; // error subscribe stream | |||||
static const int32_t ACL_ERROR_RT_THREAD_SUBSCRIBE = 107012; // error subscribe thread | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_SET = 107013; // group not set | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_CREATE = 107014; // group not create | |||||
static const int32_t ACL_ERROR_RT_STREAM_NO_CB_REG = 107015; // callback not register to stream | |||||
static const int32_t ACL_ERROR_RT_INVALID_MEMORY_TYPE = 107016; // invalid memory type | |||||
static const int32_t ACL_ERROR_RT_INVALID_HANDLE = 107017; // invalid handle | |||||
static const int32_t ACL_ERROR_RT_INVALID_MALLOC_TYPE = 107018; // invalid malloc type | |||||
static const int32_t ACL_ERROR_RT_PARAM_INVALID = 107000; // param invalid | |||||
static const int32_t ACL_ERROR_RT_INVALID_DEVICEID = 107001; // invalid device id | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_NULL = 107002; // current context null | |||||
static const int32_t ACL_ERROR_RT_STREAM_CONTEXT = 107003; // stream not in current context | |||||
static const int32_t ACL_ERROR_RT_MODEL_CONTEXT = 107004; // model not in current context | |||||
static const int32_t ACL_ERROR_RT_STREAM_MODEL = 107005; // stream not in model | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID = 107006; // event timestamp invalid | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL = 107007; // event timestamp reversal | |||||
static const int32_t ACL_ERROR_RT_ADDR_UNALIGNED = 107008; // memory address unaligned | |||||
static const int32_t ACL_ERROR_RT_FILE_OPEN = 107009; // open file failed | |||||
static const int32_t ACL_ERROR_RT_FILE_WRITE = 107010; // write file failed | |||||
static const int32_t ACL_ERROR_RT_STREAM_SUBSCRIBE = 107011; // error subscribe stream | |||||
static const int32_t ACL_ERROR_RT_THREAD_SUBSCRIBE = 107012; // error subscribe thread | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_SET = 107013; // group not set | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_CREATE = 107014; // group not create | |||||
static const int32_t ACL_ERROR_RT_STREAM_NO_CB_REG = 107015; // callback not register to stream | |||||
static const int32_t ACL_ERROR_RT_INVALID_MEMORY_TYPE = 107016; // invalid memory type | |||||
static const int32_t ACL_ERROR_RT_INVALID_HANDLE = 107017; // invalid handle | |||||
static const int32_t ACL_ERROR_RT_INVALID_MALLOC_TYPE = 107018; // invalid malloc type | |||||
static const int32_t ACL_ERROR_RT_FEATURE_NOT_SUPPORT = 207000; // feature not support | |||||
static const int32_t ACL_ERROR_RT_MEMORY_ALLOCATION = 207001; // memory allocation error | |||||
static const int32_t ACL_ERROR_RT_MEMORY_FREE = 207002; // memory free error | |||||
static const int32_t ACL_ERROR_RT_AICORE_OVER_FLOW = 207003; // aicore over flow | |||||
static const int32_t ACL_ERROR_RT_NO_DEVICE = 207004; // no device | |||||
static const int32_t ACL_ERROR_RT_RESOURCE_ALLOC_FAIL = 207005; // resource alloc fail | |||||
static const int32_t ACL_ERROR_RT_NO_PERMISSION = 207006; // no permission | |||||
static const int32_t ACL_ERROR_RT_NO_EVENT_RESOURCE = 207007; // no event resource | |||||
static const int32_t ACL_ERROR_RT_NO_STREAM_RESOURCE = 207008; // no stream resource | |||||
static const int32_t ACL_ERROR_RT_NO_NOTIFY_RESOURCE = 207009; // no notify resource | |||||
static const int32_t ACL_ERROR_RT_NO_MODEL_RESOURCE = 207010; // no model resource | |||||
static const int32_t ACL_ERROR_RT_FEATURE_NOT_SUPPORT = 207000; // feature not support | |||||
static const int32_t ACL_ERROR_RT_MEMORY_ALLOCATION = 207001; // memory allocation error | |||||
static const int32_t ACL_ERROR_RT_MEMORY_FREE = 207002; // memory free error | |||||
static const int32_t ACL_ERROR_RT_AICORE_OVER_FLOW = 207003; // aicore over flow | |||||
static const int32_t ACL_ERROR_RT_NO_DEVICE = 207004; // no device | |||||
static const int32_t ACL_ERROR_RT_RESOURCE_ALLOC_FAIL = 207005; // resource alloc fail | |||||
static const int32_t ACL_ERROR_RT_NO_PERMISSION = 207006; // no permission | |||||
static const int32_t ACL_ERROR_RT_NO_EVENT_RESOURCE = 207007; // no event resource | |||||
static const int32_t ACL_ERROR_RT_NO_STREAM_RESOURCE = 207008; // no stream resource | |||||
static const int32_t ACL_ERROR_RT_NO_NOTIFY_RESOURCE = 207009; // no notify resource | |||||
static const int32_t ACL_ERROR_RT_NO_MODEL_RESOURCE = 207010; // no model resource | |||||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_FULL = 507002; // task full in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_EMPTY = 507003; // task empty in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_NOT_COMPLETE = 507004; // stream not complete | |||||
static const int32_t ACL_ERROR_RT_END_OF_SEQUENCE = 507005; // end of sequence | |||||
static const int32_t ACL_ERROR_RT_EVENT_NOT_COMPLETE = 507006; // event not complete | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error | |||||
static const int32_t ACL_ERROR_RT_SOC_VERSION = 507008; // soc version error | |||||
static const int32_t ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT = 507009; // task type not support | |||||
static const int32_t ACL_ERROR_RT_LOST_HEARTBEAT = 507010; // ts lost heartbeat | |||||
static const int32_t ACL_ERROR_RT_MODEL_EXECUTE = 507011; // model execute failed | |||||
static const int32_t ACL_ERROR_RT_REPORT_TIMEOUT = 507012; // report timeout | |||||
static const int32_t ACL_ERROR_RT_SYS_DMA = 507013; // sys dma error | |||||
static const int32_t ACL_ERROR_RT_AICORE_TIMEOUT = 507014; // aicore timeout | |||||
static const int32_t ACL_ERROR_RT_AICORE_EXCEPTION = 507015; // aicore exception | |||||
static const int32_t ACL_ERROR_RT_AICORE_TRAP_EXCEPTION = 507016; // aicore trap exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_TIMEOUT = 507017; // aicpu timeout | |||||
static const int32_t ACL_ERROR_RT_AICPU_EXCEPTION = 507018; // aicpu exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR = 507019; // aicpu datadump response error | |||||
static const int32_t ACL_ERROR_RT_AICPU_MODEL_RSP_ERR = 507020; // aicpu model operate response error | |||||
static const int32_t ACL_ERROR_RT_PROFILING_ERROR = 507021; // profiling error | |||||
static const int32_t ACL_ERROR_RT_IPC_ERROR = 507022; // ipc error | |||||
static const int32_t ACL_ERROR_RT_MODEL_ABORT_NORMAL = 507023; // model abort normal | |||||
static const int32_t ACL_ERROR_RT_KERNEL_UNREGISTERING = 507024; // kernel unregistering | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NOT_INIT = 507025; // ringbuffer not init | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NO_DATA = 507026; // ringbuffer no data | |||||
static const int32_t ACL_ERROR_RT_KERNEL_LOOKUP = 507027; // kernel lookup error | |||||
static const int32_t ACL_ERROR_RT_KERNEL_DUPLICATE = 507028; // kernel register duplicate | |||||
static const int32_t ACL_ERROR_RT_DEBUG_REGISTER_FAIL = 507029; // debug register failed | |||||
static const int32_t ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL = 507030; // debug unregister failed | |||||
static const int32_t ACL_ERROR_RT_LABEL_CONTEXT = 507031; // label not in current context | |||||
static const int32_t ACL_ERROR_RT_PROGRAM_USE_OUT = 507032; // program register num use out | |||||
static const int32_t ACL_ERROR_RT_DEV_SETUP_ERROR = 507033; // device setup error | |||||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_FULL = 507002; // task full in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_EMPTY = 507003; // task empty in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_NOT_COMPLETE = 507004; // stream not complete | |||||
static const int32_t ACL_ERROR_RT_END_OF_SEQUENCE = 507005; // end of sequence | |||||
static const int32_t ACL_ERROR_RT_EVENT_NOT_COMPLETE = 507006; // event not complete | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error | |||||
static const int32_t ACL_ERROR_RT_SOC_VERSION = 507008; // soc version error | |||||
static const int32_t ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT = 507009; // task type not support | |||||
static const int32_t ACL_ERROR_RT_LOST_HEARTBEAT = 507010; // ts lost heartbeat | |||||
static const int32_t ACL_ERROR_RT_MODEL_EXECUTE = 507011; // model execute failed | |||||
static const int32_t ACL_ERROR_RT_REPORT_TIMEOUT = 507012; // report timeout | |||||
static const int32_t ACL_ERROR_RT_SYS_DMA = 507013; // sys dma error | |||||
static const int32_t ACL_ERROR_RT_AICORE_TIMEOUT = 507014; // aicore timeout | |||||
static const int32_t ACL_ERROR_RT_AICORE_EXCEPTION = 507015; // aicore exception | |||||
static const int32_t ACL_ERROR_RT_AICORE_TRAP_EXCEPTION = 507016; // aicore trap exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_TIMEOUT = 507017; // aicpu timeout | |||||
static const int32_t ACL_ERROR_RT_AICPU_EXCEPTION = 507018; // aicpu exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR = 507019; // aicpu datadump response error | |||||
static const int32_t ACL_ERROR_RT_AICPU_MODEL_RSP_ERR = 507020; // aicpu model operate response error | |||||
static const int32_t ACL_ERROR_RT_PROFILING_ERROR = 507021; // profiling error | |||||
static const int32_t ACL_ERROR_RT_IPC_ERROR = 507022; // ipc error | |||||
static const int32_t ACL_ERROR_RT_MODEL_ABORT_NORMAL = 507023; // model abort normal | |||||
static const int32_t ACL_ERROR_RT_KERNEL_UNREGISTERING = 507024; // kernel unregistering | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NOT_INIT = 507025; // ringbuffer not init | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NO_DATA = 507026; // ringbuffer no data | |||||
static const int32_t ACL_ERROR_RT_KERNEL_LOOKUP = 507027; // kernel lookup error | |||||
static const int32_t ACL_ERROR_RT_KERNEL_DUPLICATE = 507028; // kernel register duplicate | |||||
static const int32_t ACL_ERROR_RT_DEBUG_REGISTER_FAIL = 507029; // debug register failed | |||||
static const int32_t ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL = 507030; // debug unregister failed | |||||
static const int32_t ACL_ERROR_RT_LABEL_CONTEXT = 507031; // label not in current context | |||||
static const int32_t ACL_ERROR_RT_PROGRAM_USE_OUT = 507032; // program register num use out | |||||
static const int32_t ACL_ERROR_RT_DEV_SETUP_ERROR = 507033; // device setup error | |||||
static const int32_t ACL_ERROR_RT_DRV_INTERNAL_ERROR = 507899; // drv internal error | |||||
static const int32_t ACL_ERROR_RT_AICPU_INTERNAL_ERROR = 507900; // aicpu internal error | |||||
static const int32_t ACL_ERROR_RT_DRV_INTERNAL_ERROR = 507899; // drv internal error | |||||
static const int32_t ACL_ERROR_RT_AICPU_INTERNAL_ERROR = 507900; // aicpu internal error | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ | |||||
#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ |
@@ -23,17 +23,9 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
typedef enum aclTransType { | |||||
ACL_TRANS_N, | |||||
ACL_TRANS_T, | |||||
ACL_TRANS_NZ, | |||||
ACL_TRANS_NZ_T | |||||
} aclTransType; | |||||
typedef enum aclTransType { ACL_TRANS_N, ACL_TRANS_T, ACL_TRANS_NZ, ACL_TRANS_NZ_T } aclTransType; | |||||
typedef enum aclComputeType { | |||||
ACL_COMPUTE_HIGH_PRECISION, | |||||
ACL_COMPUTE_LOW_PRECISION | |||||
} aclComputeType; | |||||
typedef enum aclComputeType { ACL_COMPUTE_HIGH_PRECISION, ACL_COMPUTE_LOW_PRECISION } aclComputeType; | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -61,12 +53,11 @@ typedef enum aclComputeType { | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n, | |||||
const void *alpha, const void *a, int lda, aclDataType dataTypeA, | |||||
const void *x, int incx, aclDataType dataTypeX, | |||||
const void *beta, void *y, int incy, aclDataType dataTypeY, | |||||
aclComputeType type, aclrtStream stream); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n, const void *alpha, const void *a, int lda, | |||||
aclDataType dataTypeA, const void *x, int incx, aclDataType dataTypeX, | |||||
const void *beta, void *y, int incy, aclDataType dataTypeY, | |||||
aclComputeType type, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -83,15 +74,10 @@ ACL_FUNC_VISIBILITY aclError aclblasGemvEx(aclTransType transA, int m, int n, | |||||
* | * | ||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA, | |||||
int m, | |||||
int n, | |||||
aclDataType dataTypeA, | |||||
aclDataType dataTypeX, | |||||
aclDataType dataTypeY, | |||||
aclComputeType type, | |||||
aclopHandle **handle); | |||||
*/ | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA, int m, int n, aclDataType dataTypeA, | |||||
aclDataType dataTypeX, aclDataType dataTypeY, | |||||
aclComputeType type, aclopHandle **handle); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -115,18 +101,9 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemvEx(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA, | |||||
int m, | |||||
int n, | |||||
const aclFloat16 *alpha, | |||||
const aclFloat16 *a, | |||||
int lda, | |||||
const aclFloat16 *x, | |||||
int incx, | |||||
const aclFloat16 *beta, | |||||
aclFloat16 *y, | |||||
int incy, | |||||
aclComputeType type, | |||||
ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA, int m, int n, const aclFloat16 *alpha, | |||||
const aclFloat16 *a, int lda, const aclFloat16 *x, int incx, | |||||
const aclFloat16 *beta, aclFloat16 *y, int incy, aclComputeType type, | |||||
aclrtStream stream); | aclrtStream stream); | ||||
/** | /** | ||||
@@ -142,10 +119,7 @@ ACL_FUNC_VISIBILITY aclError aclblasHgemv(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA, | |||||
int m, | |||||
int n, | |||||
aclComputeType type, | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA, int m, int n, aclComputeType type, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
/** | /** | ||||
@@ -171,19 +145,9 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemv(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA, | |||||
int m, | |||||
int n, | |||||
const int32_t *alpha, | |||||
const int8_t *a, | |||||
int lda, | |||||
const int8_t *x, | |||||
int incx, | |||||
const int32_t *beta, | |||||
int32_t *y, | |||||
int incy, | |||||
aclComputeType type, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA, int m, int n, const int32_t *alpha, const int8_t *a, | |||||
int lda, const int8_t *x, int incx, const int32_t *beta, int32_t *y, | |||||
int incy, aclComputeType type, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -198,10 +162,7 @@ ACL_FUNC_VISIBILITY aclError aclblasS8gemv(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA, | |||||
int m, | |||||
int n, | |||||
aclComputeType type, | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA, int m, int n, aclComputeType type, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
/** | /** | ||||
@@ -233,26 +194,11 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemv(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
const void *alpha, | |||||
const void *matrixA, | |||||
int lda, | |||||
aclDataType dataTypeA, | |||||
const void *matrixB, | |||||
int ldb, | |||||
aclDataType dataTypeB, | |||||
const void *beta, | |||||
void *matrixC, | |||||
int ldc, | |||||
aclDataType dataTypeC, | |||||
aclComputeType type, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n, | |||||
int k, const void *alpha, const void *matrixA, int lda, | |||||
aclDataType dataTypeA, const void *matrixB, int ldb, aclDataType dataTypeB, | |||||
const void *beta, void *matrixC, int ldc, aclDataType dataTypeC, | |||||
aclComputeType type, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -274,18 +220,10 @@ ACL_FUNC_VISIBILITY aclError aclblasGemmEx(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
aclDataType dataTypeA, | |||||
aclDataType dataTypeB, | |||||
aclDataType dataTypeC, | |||||
aclComputeType type, | |||||
aclopHandle **handle); | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA, aclTransType transB, aclTransType transC, | |||||
int m, int n, int k, aclDataType dataTypeA, | |||||
aclDataType dataTypeB, aclDataType dataTypeC, | |||||
aclComputeType type, aclopHandle **handle); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -313,22 +251,10 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForGemmEx(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
const aclFloat16 *alpha, | |||||
const aclFloat16 *matrixA, | |||||
int lda, | |||||
const aclFloat16 *matrixB, | |||||
int ldb, | |||||
const aclFloat16 *beta, | |||||
aclFloat16 *matrixC, | |||||
int ldc, | |||||
aclComputeType type, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n, | |||||
int k, const aclFloat16 *alpha, const aclFloat16 *matrixA, int lda, | |||||
const aclFloat16 *matrixB, int ldb, const aclFloat16 *beta, | |||||
aclFloat16 *matrixC, int ldc, aclComputeType type, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -346,13 +272,8 @@ ACL_FUNC_VISIBILITY aclError aclblasHgemm(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
aclComputeType type, | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA, aclTransType transB, aclTransType transC, | |||||
int m, int n, int k, aclComputeType type, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
/** | /** | ||||
@@ -381,23 +302,10 @@ ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForHgemm(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
const int32_t *alpha, | |||||
const int8_t *matrixA, | |||||
int lda, | |||||
const int8_t *matrixB, | |||||
int ldb, | |||||
const int32_t *beta, | |||||
int32_t *matrixC, | |||||
int ldc, | |||||
aclComputeType type, | |||||
aclrtStream stream); | |||||
ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA, aclTransType transB, aclTransType transC, int m, int n, | |||||
int k, const int32_t *alpha, const int8_t *matrixA, int lda, | |||||
const int8_t *matrixB, int ldb, const int32_t *beta, int32_t *matrixC, | |||||
int ldc, aclComputeType type, aclrtStream stream); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -415,17 +323,12 @@ ACL_FUNC_VISIBILITY aclError aclblasS8gemm(aclTransType transA, | |||||
* @retval ACL_SUCCESS The function is successfully executed. | * @retval ACL_SUCCESS The function is successfully executed. | ||||
* @retval OtherValues Failure | * @retval OtherValues Failure | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemm(aclTransType transA, | |||||
aclTransType transB, | |||||
aclTransType transC, | |||||
int m, | |||||
int n, | |||||
int k, | |||||
aclComputeType type, | |||||
ACL_FUNC_VISIBILITY aclError aclblasCreateHandleForS8gemm(aclTransType transA, aclTransType transB, aclTransType transC, | |||||
int m, int n, int k, aclComputeType type, | |||||
aclopHandle **handle); | aclopHandle **handle); | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_OPS_ACL_CBLAS_H_ | |||||
#endif // INC_EXTERNAL_ACL_OPS_ACL_CBLAS_H_ |
@@ -32,8 +32,8 @@ typedef struct aclfvSearchResult aclfvSearchResult; | |||||
// search operation type | // search operation type | ||||
enum aclfvSearchType { | enum aclfvSearchType { | ||||
SEARCH_1_N, // 1:N operation type | |||||
SEARCH_N_M // N:M operation type | |||||
SEARCH_1_N, // 1:N operation type | |||||
SEARCH_N_M // N:M operation type | |||||
}; | }; | ||||
/** | /** | ||||
@@ -104,7 +104,8 @@ ACL_FUNC_VISIBILITY aclError aclfvSetNMTopNum(aclfvInitPara *initPara, uint32_t | |||||
* @retval OtherValues success. | * @retval OtherValues success. | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset, | ACL_FUNC_VISIBILITY aclfvFeatureInfo *aclfvCreateFeatureInfo(uint32_t id0, uint32_t id1, uint32_t offset, | ||||
uint32_t featureLen, uint32_t featureCount, uint8_t *featureData, uint32_t featureDataLen); | |||||
uint32_t featureLen, uint32_t featureCount, | |||||
uint8_t *featureData, uint32_t featureDataLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -233,8 +234,9 @@ ACL_FUNC_VISIBILITY aclError aclfvDestroySearchInput(aclfvSearchInput *searchInp | |||||
* @retval null for failed. OtherValues success | * @retval null for failed. OtherValues success | ||||
*/ | */ | ||||
ACL_FUNC_VISIBILITY aclfvSearchResult *aclfvCreateSearchResult(uint32_t queryCnt, uint32_t *resultNum, | ACL_FUNC_VISIBILITY aclfvSearchResult *aclfvCreateSearchResult(uint32_t queryCnt, uint32_t *resultNum, | ||||
uint32_t resultNumDataLen, uint32_t *id0, uint32_t *id1, uint32_t *resultOffset, float *resultDistance, | |||||
uint32_t dataLen); | |||||
uint32_t resultNumDataLen, uint32_t *id0, uint32_t *id1, | |||||
uint32_t *resultOffset, float *resultDistance, | |||||
uint32_t dataLen); | |||||
/** | /** | ||||
* @ingroup AscendCL | * @ingroup AscendCL | ||||
@@ -348,4 +350,4 @@ ACL_FUNC_VISIBILITY aclError aclfvSearch(aclfvSearchType type, aclfvSearchInput | |||||
} | } | ||||
#endif | #endif | ||||
#endif // INC_EXTERNAL_ACL_OPS_ACL_RETR_H_ | |||||
#endif // INC_EXTERNAL_ACL_OPS_ACL_RETR_H_ |
@@ -27,7 +27,7 @@ | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif // __cplusplus | |||||
#endif // __cplusplus | |||||
/** | /** | ||||
* @brief Initialize HCCL. | * @brief Initialize HCCL. | ||||
@@ -66,14 +66,15 @@ extern HcclResult HcclCommInitRootInfo(uint32_t nRanks, const HcclRootInfo *root | |||||
* @param sendBuf A pointer identifying the input data address of the operator. | * @param sendBuf A pointer identifying the input data address of the operator. | ||||
* @param recvBuf A pointer identifying the output data address of the operator. | * @param recvBuf A pointer identifying the output data address of the operator. | ||||
* @param count An integer(u64) identifying the number of the output data. | * @param count An integer(u64) identifying the number of the output data. | ||||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, float16, float32. | |||||
* @param dataType The data type of the operator, must be one of the following types: int8, int16, int32, float16, | |||||
* float32. | |||||
* @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. | * @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. | ||||
* @param comm A pointer identifying the communication resource based on. | * @param comm A pointer identifying the communication resource based on. | ||||
* @param stream A pointer identifying the stream information. | * @param stream A pointer identifying the stream information. | ||||
* @return HcclResult | |||||
* @return HcclResult | |||||
*/ | */ | ||||
extern HcclResult HcclAllReduce(void *sendBuf, void *recvBuf, uint64_t count, HcclDataType dataType, | |||||
HcclReduceOp op, HcclComm comm, aclrtStream stream); | |||||
extern HcclResult HcclAllReduce(void *sendBuf, void *recvBuf, uint64_t count, HcclDataType dataType, HcclReduceOp op, | |||||
HcclComm comm, aclrtStream stream); | |||||
/** | /** | ||||
* @brief Broadcast operator. | * @brief Broadcast operator. | ||||
@@ -84,10 +85,10 @@ HcclReduceOp op, HcclComm comm, aclrtStream stream); | |||||
* @param root An integer(u32) identifying the the root rank in the operator. | * @param root An integer(u32) identifying the the root rank in the operator. | ||||
* @param comm A pointer identifying the communication resource based on | * @param comm A pointer identifying the communication resource based on | ||||
* @param stream A pointer identifying the stream information. | * @param stream A pointer identifying the stream information. | ||||
* @return HcclResult | |||||
* @return HcclResult | |||||
*/ | */ | ||||
extern HcclResult HcclBroadcast(void *buf, uint64_t count, HcclDataType dataType, uint32_t root, HcclComm comm, | |||||
aclrtStream stream); | |||||
extern HcclResult HcclBroadcast(void *buf, uint64_t count, HcclDataType dataType, uint32_t root, HcclComm comm, | |||||
aclrtStream stream); | |||||
/** | /** | ||||
* @brief ReduceScatter operator. | * @brief ReduceScatter operator. | ||||
@@ -99,10 +100,10 @@ aclrtStream stream); | |||||
* @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. | * @param op The reduction type of the operator, must be one of the following types: sum, min, max, prod. | ||||
* @param comm A pointer identifying the communication resource based on. | * @param comm A pointer identifying the communication resource based on. | ||||
* @param stream A pointer identifying the stream information. | * @param stream A pointer identifying the stream information. | ||||
* @return HcclResult | |||||
* @return HcclResult | |||||
*/ | */ | ||||
extern HcclResult HcclReduceScatter(void *sendBuf, void *recvBuf, uint64_t recvCount, HcclDataType dataType, | |||||
HcclReduceOp op, HcclComm comm, aclrtStream stream); | |||||
extern HcclResult HcclReduceScatter(void *sendBuf, void *recvBuf, uint64_t recvCount, HcclDataType dataType, | |||||
HcclReduceOp op, HcclComm comm, aclrtStream stream); | |||||
/** | /** | ||||
* @brief AllGather operator. | * @brief AllGather operator. | ||||
@@ -113,10 +114,10 @@ HcclReduceOp op, HcclComm comm, aclrtStream stream); | |||||
* @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | * @param dataType The data type of the operator, must be one of the following types: int8, int32, float16, float32. | ||||
* @param comm A pointer identifying the communication resource based on. | * @param comm A pointer identifying the communication resource based on. | ||||
* @param stream A pointer identifying the stream information. | * @param stream A pointer identifying the stream information. | ||||
* @return HcclResult | |||||
* @return HcclResult | |||||
*/ | */ | ||||
extern HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, | |||||
HcclComm comm, aclrtStream stream); | |||||
extern HcclResult HcclAllGather(void *sendBuf, void *recvBuf, uint64_t sendCount, HcclDataType dataType, HcclComm comm, | |||||
aclrtStream stream); | |||||
/** | /** | ||||
* @brief Destroy HCCL comm | * @brief Destroy HCCL comm | ||||
@@ -129,5 +130,5 @@ extern HcclResult HcclCommDestroy(HcclComm comm); | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif // __cplusplus | |||||
#endif // HCCL_H_ | |||||
#endif // __cplusplus | |||||
#endif // HCCL_H_ |
@@ -16,10 +16,10 @@ | |||||
/** | /** | ||||
* @file hccl_types.h | * @file hccl_types.h | ||||
* @brief HCCL data type definition | |||||
* | |||||
* @brief HCCL data type definition | |||||
* | |||||
*/ | */ | ||||
#ifndef HCCL_TYPES_H_ | #ifndef HCCL_TYPES_H_ | ||||
#define HCCL_TYPES_H_ | #define HCCL_TYPES_H_ | ||||
@@ -27,33 +27,33 @@ | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
extern "C" { | extern "C" { | ||||
#endif // __cplusplus | |||||
#endif // __cplusplus | |||||
/** | /** | ||||
* @brief HCCL functions return value definition | * @brief HCCL functions return value definition | ||||
*/ | */ | ||||
typedef enum { | typedef enum { | ||||
HCCL_SUCCESS = 0, /**< success */ | |||||
HCCL_E_PARA = 1, /**< parameter error */ | |||||
HCCL_E_PTR = 2, /**< empty pointer */ | |||||
HCCL_E_MEMORY = 3, /**< memory error */ | |||||
HCCL_E_INTERNAL = 4, /**< internal error */ | |||||
HCCL_E_NOT_SUPPORT = 5, /**< not support feature */ | |||||
HCCL_E_NOT_FOUND = 6, /**< not found specific resource */ | |||||
HCCL_E_UNAVAIL = 7, /**< resource unavailable */ | |||||
HCCL_E_SYSCALL = 8, /**< call system interface error */ | |||||
HCCL_E_TIMEOUT = 9, /**< timeout */ | |||||
HCCL_E_OPEN_FILE_FAILURE = 10, /**< open file fail */ | |||||
HCCL_E_TCP_CONNECT = 11, /**< tcp connect fail */ | |||||
HCCL_E_ROCE_CONNECT = 12, /**< roce connect fail */ | |||||
HCCL_E_TCP_TRANSFER = 13, /**< tcp transfer fail */ | |||||
HCCL_E_ROCE_TRANSFER = 14, /**< roce transfer fail */ | |||||
HCCL_E_RUNTIME = 15, /**< call runtime api fail */ | |||||
HCCL_E_DRV = 16, /**< call driver api fail */ | |||||
HCCL_E_PROFILING = 17, /**< call profiling api fail */ | |||||
HCCL_E_CCE = 18, /**< call cce api fail */ | |||||
HCCL_E_NETWORK = 19, /**< call network api fail */ | |||||
HCCL_E_RESERVED /**< reserved */ | |||||
HCCL_SUCCESS = 0, /**< success */ | |||||
HCCL_E_PARA = 1, /**< parameter error */ | |||||
HCCL_E_PTR = 2, /**< empty pointer */ | |||||
HCCL_E_MEMORY = 3, /**< memory error */ | |||||
HCCL_E_INTERNAL = 4, /**< internal error */ | |||||
HCCL_E_NOT_SUPPORT = 5, /**< not support feature */ | |||||
HCCL_E_NOT_FOUND = 6, /**< not found specific resource */ | |||||
HCCL_E_UNAVAIL = 7, /**< resource unavailable */ | |||||
HCCL_E_SYSCALL = 8, /**< call system interface error */ | |||||
HCCL_E_TIMEOUT = 9, /**< timeout */ | |||||
HCCL_E_OPEN_FILE_FAILURE = 10, /**< open file fail */ | |||||
HCCL_E_TCP_CONNECT = 11, /**< tcp connect fail */ | |||||
HCCL_E_ROCE_CONNECT = 12, /**< roce connect fail */ | |||||
HCCL_E_TCP_TRANSFER = 13, /**< tcp transfer fail */ | |||||
HCCL_E_ROCE_TRANSFER = 14, /**< roce transfer fail */ | |||||
HCCL_E_RUNTIME = 15, /**< call runtime api fail */ | |||||
HCCL_E_DRV = 16, /**< call driver api fail */ | |||||
HCCL_E_PROFILING = 17, /**< call profiling api fail */ | |||||
HCCL_E_CCE = 18, /**< call cce api fail */ | |||||
HCCL_E_NETWORK = 19, /**< call network api fail */ | |||||
HCCL_E_RESERVED /**< reserved */ | |||||
} HcclResult; | } HcclResult; | ||||
/** | /** | ||||
@@ -65,37 +65,37 @@ typedef void *HcclComm; | |||||
* @brief HCCL Reduction opperation | * @brief HCCL Reduction opperation | ||||
*/ | */ | ||||
typedef enum { | typedef enum { | ||||
HCCL_REDUCE_SUM = 0, /**< sum */ | |||||
HCCL_REDUCE_PROD = 1, /**< prod */ | |||||
HCCL_REDUCE_MAX = 2, /**< max */ | |||||
HCCL_REDUCE_MIN = 3, /**< min */ | |||||
HCCL_REDUCE_RESERVED /**< reserved */ | |||||
HCCL_REDUCE_SUM = 0, /**< sum */ | |||||
HCCL_REDUCE_PROD = 1, /**< prod */ | |||||
HCCL_REDUCE_MAX = 2, /**< max */ | |||||
HCCL_REDUCE_MIN = 3, /**< min */ | |||||
HCCL_REDUCE_RESERVED /**< reserved */ | |||||
} HcclReduceOp; | } HcclReduceOp; | ||||
/** | /** | ||||
* @brief HCCL data type | * @brief HCCL data type | ||||
*/ | */ | ||||
typedef enum { | typedef enum { | ||||
HCCL_DATA_TYPE_INT8 = 0, /**< int8 */ | |||||
HCCL_DATA_TYPE_INT16 = 1, /**< int16 */ | |||||
HCCL_DATA_TYPE_INT32 = 2, /**< int32 */ | |||||
HCCL_DATA_TYPE_FP16 = 3, /**< fp16 */ | |||||
HCCL_DATA_TYPE_FP32 = 4, /**< fp32 */ | |||||
HCCL_DATA_TYPE_INT64 = 5, /**< int64 */ | |||||
HCCL_DATA_TYPE_UINT64 = 6, /**< uint64 */ | |||||
HCCL_DATA_TYPE_RESERVED /**< reserved */ | |||||
HCCL_DATA_TYPE_INT8 = 0, /**< int8 */ | |||||
HCCL_DATA_TYPE_INT16 = 1, /**< int16 */ | |||||
HCCL_DATA_TYPE_INT32 = 2, /**< int32 */ | |||||
HCCL_DATA_TYPE_FP16 = 3, /**< fp16 */ | |||||
HCCL_DATA_TYPE_FP32 = 4, /**< fp32 */ | |||||
HCCL_DATA_TYPE_INT64 = 5, /**< int64 */ | |||||
HCCL_DATA_TYPE_UINT64 = 6, /**< uint64 */ | |||||
HCCL_DATA_TYPE_RESERVED /**< reserved */ | |||||
} HcclDataType; | } HcclDataType; | ||||
const uint32_t HCCL_ROOT_INFO_BYTES = 4108; // 4108: root info length | |||||
const uint32_t HCCL_ROOT_INFO_BYTES = 4108; // 4108: root info length | |||||
/** | /** | ||||
* @brief HCCL root info | * @brief HCCL root info | ||||
*/ | */ | ||||
typedef struct HcclRootInfoDef { | typedef struct HcclRootInfoDef { | ||||
char internal[HCCL_ROOT_INFO_BYTES]; | |||||
char internal[HCCL_ROOT_INFO_BYTES]; | |||||
} HcclRootInfo; | } HcclRootInfo; | ||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif // __cplusplus | |||||
#endif // HCCL_TYPES_H_ | |||||
#endif // __cplusplus | |||||
#endif // HCCL_TYPES_H_ |
@@ -23,80 +23,80 @@ | |||||
extern "C" { | extern "C" { | ||||
#endif | #endif | ||||
static const int32_t ACL_RT_SUCCESS = 0; // success | |||||
static const int32_t ACL_RT_SUCCESS = 0; // success | |||||
static const int32_t ACL_ERROR_RT_PARAM_INVALID = 107000; // param invalid | |||||
static const int32_t ACL_ERROR_RT_INVALID_DEVICEID = 107001; // invalid device id | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_NULL = 107002; // current context null | |||||
static const int32_t ACL_ERROR_RT_STREAM_CONTEXT = 107003; // stream not in current context | |||||
static const int32_t ACL_ERROR_RT_MODEL_CONTEXT = 107004; // model not in current context | |||||
static const int32_t ACL_ERROR_RT_STREAM_MODEL = 107005; // stream not in model | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID = 107006; // event timestamp invalid | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL = 107007; // event timestamp reversal | |||||
static const int32_t ACL_ERROR_RT_ADDR_UNALIGNED = 107008; // memory address unaligned | |||||
static const int32_t ACL_ERROR_RT_FILE_OPEN = 107009; // open file failed | |||||
static const int32_t ACL_ERROR_RT_FILE_WRITE = 107010; // write file failed | |||||
static const int32_t ACL_ERROR_RT_STREAM_SUBSCRIBE = 107011; // error subscribe stream | |||||
static const int32_t ACL_ERROR_RT_THREAD_SUBSCRIBE = 107012; // error subscribe thread | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_SET = 107013; // group not set | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_CREATE = 107014; // group not create | |||||
static const int32_t ACL_ERROR_RT_STREAM_NO_CB_REG = 107015; // callback not register to stream | |||||
static const int32_t ACL_ERROR_RT_INVALID_MEMORY_TYPE = 107016; // invalid memory type | |||||
static const int32_t ACL_ERROR_RT_INVALID_HANDLE = 107017; // invalid handle | |||||
static const int32_t ACL_ERROR_RT_INVALID_MALLOC_TYPE = 107018; // invalid malloc type | |||||
static const int32_t ACL_ERROR_RT_PARAM_INVALID = 107000; // param invalid | |||||
static const int32_t ACL_ERROR_RT_INVALID_DEVICEID = 107001; // invalid device id | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_NULL = 107002; // current context null | |||||
static const int32_t ACL_ERROR_RT_STREAM_CONTEXT = 107003; // stream not in current context | |||||
static const int32_t ACL_ERROR_RT_MODEL_CONTEXT = 107004; // model not in current context | |||||
static const int32_t ACL_ERROR_RT_STREAM_MODEL = 107005; // stream not in model | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID = 107006; // event timestamp invalid | |||||
static const int32_t ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL = 107007; // event timestamp reversal | |||||
static const int32_t ACL_ERROR_RT_ADDR_UNALIGNED = 107008; // memory address unaligned | |||||
static const int32_t ACL_ERROR_RT_FILE_OPEN = 107009; // open file failed | |||||
static const int32_t ACL_ERROR_RT_FILE_WRITE = 107010; // write file failed | |||||
static const int32_t ACL_ERROR_RT_STREAM_SUBSCRIBE = 107011; // error subscribe stream | |||||
static const int32_t ACL_ERROR_RT_THREAD_SUBSCRIBE = 107012; // error subscribe thread | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_SET = 107013; // group not set | |||||
static const int32_t ACL_ERROR_RT_GROUP_NOT_CREATE = 107014; // group not create | |||||
static const int32_t ACL_ERROR_RT_STREAM_NO_CB_REG = 107015; // callback not register to stream | |||||
static const int32_t ACL_ERROR_RT_INVALID_MEMORY_TYPE = 107016; // invalid memory type | |||||
static const int32_t ACL_ERROR_RT_INVALID_HANDLE = 107017; // invalid handle | |||||
static const int32_t ACL_ERROR_RT_INVALID_MALLOC_TYPE = 107018; // invalid malloc type | |||||
static const int32_t ACL_ERROR_RT_FEATURE_NOT_SUPPORT = 207000; // feature not support | |||||
static const int32_t ACL_ERROR_RT_MEMORY_ALLOCATION = 207001; // memory allocation error | |||||
static const int32_t ACL_ERROR_RT_MEMORY_FREE = 207002; // memory free error | |||||
static const int32_t ACL_ERROR_RT_AICORE_OVER_FLOW = 207003; // aicore over flow | |||||
static const int32_t ACL_ERROR_RT_NO_DEVICE = 207004; // no device | |||||
static const int32_t ACL_ERROR_RT_RESOURCE_ALLOC_FAIL = 207005; // resource alloc fail | |||||
static const int32_t ACL_ERROR_RT_NO_PERMISSION = 207006; // no permission | |||||
static const int32_t ACL_ERROR_RT_NO_EVENT_RESOURCE = 207007; // no event resource | |||||
static const int32_t ACL_ERROR_RT_NO_STREAM_RESOURCE = 207008; // no stream resource | |||||
static const int32_t ACL_ERROR_RT_NO_NOTIFY_RESOURCE = 207009; // no notify resource | |||||
static const int32_t ACL_ERROR_RT_NO_MODEL_RESOURCE = 207010; // no model resource | |||||
static const int32_t ACL_ERROR_RT_FEATURE_NOT_SUPPORT = 207000; // feature not support | |||||
static const int32_t ACL_ERROR_RT_MEMORY_ALLOCATION = 207001; // memory allocation error | |||||
static const int32_t ACL_ERROR_RT_MEMORY_FREE = 207002; // memory free error | |||||
static const int32_t ACL_ERROR_RT_AICORE_OVER_FLOW = 207003; // aicore over flow | |||||
static const int32_t ACL_ERROR_RT_NO_DEVICE = 207004; // no device | |||||
static const int32_t ACL_ERROR_RT_RESOURCE_ALLOC_FAIL = 207005; // resource alloc fail | |||||
static const int32_t ACL_ERROR_RT_NO_PERMISSION = 207006; // no permission | |||||
static const int32_t ACL_ERROR_RT_NO_EVENT_RESOURCE = 207007; // no event resource | |||||
static const int32_t ACL_ERROR_RT_NO_STREAM_RESOURCE = 207008; // no stream resource | |||||
static const int32_t ACL_ERROR_RT_NO_NOTIFY_RESOURCE = 207009; // no notify resource | |||||
static const int32_t ACL_ERROR_RT_NO_MODEL_RESOURCE = 207010; // no model resource | |||||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_FULL = 507002; // task full in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_EMPTY = 507003; // task empty in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_NOT_COMPLETE = 507004; // stream not complete | |||||
static const int32_t ACL_ERROR_RT_END_OF_SEQUENCE = 507005; // end of sequence | |||||
static const int32_t ACL_ERROR_RT_EVENT_NOT_COMPLETE = 507006; // event not complete | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error | |||||
static const int32_t ACL_ERROR_RT_SOC_VERSION = 507008; // soc version error | |||||
static const int32_t ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT = 507009; // task type not support | |||||
static const int32_t ACL_ERROR_RT_LOST_HEARTBEAT = 507010; // ts lost heartbeat | |||||
static const int32_t ACL_ERROR_RT_MODEL_EXECUTE = 507011; // model execute failed | |||||
static const int32_t ACL_ERROR_RT_REPORT_TIMEOUT = 507012; // report timeout | |||||
static const int32_t ACL_ERROR_RT_SYS_DMA = 507013; // sys dma error | |||||
static const int32_t ACL_ERROR_RT_AICORE_TIMEOUT = 507014; // aicore timeout | |||||
static const int32_t ACL_ERROR_RT_AICORE_EXCEPTION = 507015; // aicore exception | |||||
static const int32_t ACL_ERROR_RT_AICORE_TRAP_EXCEPTION = 507016; // aicore trap exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_TIMEOUT = 507017; // aicpu timeout | |||||
static const int32_t ACL_ERROR_RT_AICPU_EXCEPTION = 507018; // aicpu exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR = 507019; // aicpu datadump response error | |||||
static const int32_t ACL_ERROR_RT_AICPU_MODEL_RSP_ERR = 507020; // aicpu model operate response error | |||||
static const int32_t ACL_ERROR_RT_PROFILING_ERROR = 507021; // profiling error | |||||
static const int32_t ACL_ERROR_RT_IPC_ERROR = 507022; // ipc error | |||||
static const int32_t ACL_ERROR_RT_MODEL_ABORT_NORMAL = 507023; // model abort normal | |||||
static const int32_t ACL_ERROR_RT_KERNEL_UNREGISTERING = 507024; // kernel unregistering | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NOT_INIT = 507025; // ringbuffer not init | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NO_DATA = 507026; // ringbuffer no data | |||||
static const int32_t ACL_ERROR_RT_KERNEL_LOOKUP = 507027; // kernel lookup error | |||||
static const int32_t ACL_ERROR_RT_KERNEL_DUPLICATE = 507028; // kernel register duplicate | |||||
static const int32_t ACL_ERROR_RT_DEBUG_REGISTER_FAIL = 507029; // debug register failed | |||||
static const int32_t ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL = 507030; // debug unregister failed | |||||
static const int32_t ACL_ERROR_RT_LABEL_CONTEXT = 507031; // label not in current context | |||||
static const int32_t ACL_ERROR_RT_PROGRAM_USE_OUT = 507032; // program register num use out | |||||
static const int32_t ACL_ERROR_RT_DEV_SETUP_ERROR = 507033; // device setup error | |||||
static const int32_t ACL_ERROR_RT_INTERNAL_ERROR = 507000; // runtime internal error | |||||
static const int32_t ACL_ERROR_RT_TS_ERROR = 507001; // ts internel error | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_FULL = 507002; // task full in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_TASK_EMPTY = 507003; // task empty in stream | |||||
static const int32_t ACL_ERROR_RT_STREAM_NOT_COMPLETE = 507004; // stream not complete | |||||
static const int32_t ACL_ERROR_RT_END_OF_SEQUENCE = 507005; // end of sequence | |||||
static const int32_t ACL_ERROR_RT_EVENT_NOT_COMPLETE = 507006; // event not complete | |||||
static const int32_t ACL_ERROR_RT_CONTEXT_RELEASE_ERROR = 507007; // context release error | |||||
static const int32_t ACL_ERROR_RT_SOC_VERSION = 507008; // soc version error | |||||
static const int32_t ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT = 507009; // task type not support | |||||
static const int32_t ACL_ERROR_RT_LOST_HEARTBEAT = 507010; // ts lost heartbeat | |||||
static const int32_t ACL_ERROR_RT_MODEL_EXECUTE = 507011; // model execute failed | |||||
static const int32_t ACL_ERROR_RT_REPORT_TIMEOUT = 507012; // report timeout | |||||
static const int32_t ACL_ERROR_RT_SYS_DMA = 507013; // sys dma error | |||||
static const int32_t ACL_ERROR_RT_AICORE_TIMEOUT = 507014; // aicore timeout | |||||
static const int32_t ACL_ERROR_RT_AICORE_EXCEPTION = 507015; // aicore exception | |||||
static const int32_t ACL_ERROR_RT_AICORE_TRAP_EXCEPTION = 507016; // aicore trap exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_TIMEOUT = 507017; // aicpu timeout | |||||
static const int32_t ACL_ERROR_RT_AICPU_EXCEPTION = 507018; // aicpu exception | |||||
static const int32_t ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR = 507019; // aicpu datadump response error | |||||
static const int32_t ACL_ERROR_RT_AICPU_MODEL_RSP_ERR = 507020; // aicpu model operate response error | |||||
static const int32_t ACL_ERROR_RT_PROFILING_ERROR = 507021; // profiling error | |||||
static const int32_t ACL_ERROR_RT_IPC_ERROR = 507022; // ipc error | |||||
static const int32_t ACL_ERROR_RT_MODEL_ABORT_NORMAL = 507023; // model abort normal | |||||
static const int32_t ACL_ERROR_RT_KERNEL_UNREGISTERING = 507024; // kernel unregistering | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NOT_INIT = 507025; // ringbuffer not init | |||||
static const int32_t ACL_ERROR_RT_RINGBUFFER_NO_DATA = 507026; // ringbuffer no data | |||||
static const int32_t ACL_ERROR_RT_KERNEL_LOOKUP = 507027; // kernel lookup error | |||||
static const int32_t ACL_ERROR_RT_KERNEL_DUPLICATE = 507028; // kernel register duplicate | |||||
static const int32_t ACL_ERROR_RT_DEBUG_REGISTER_FAIL = 507029; // debug register failed | |||||
static const int32_t ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL = 507030; // debug unregister failed | |||||
static const int32_t ACL_ERROR_RT_LABEL_CONTEXT = 507031; // label not in current context | |||||
static const int32_t ACL_ERROR_RT_PROGRAM_USE_OUT = 507032; // program register num use out | |||||
static const int32_t ACL_ERROR_RT_DEV_SETUP_ERROR = 507033; // device setup error | |||||
static const int32_t ACL_ERROR_RT_DRV_INTERNAL_ERROR = 507899; // drv internal error | |||||
static const int32_t ACL_ERROR_RT_AICPU_INTERNAL_ERROR = 507900; // aicpu internal error | |||||
static const int32_t ACL_ERROR_RT_DRV_INTERNAL_ERROR = 507899; // drv internal error | |||||
static const int32_t ACL_ERROR_RT_AICPU_INTERNAL_ERROR = 507900; // aicpu internal error | |||||
#ifdef __cplusplus | #ifdef __cplusplus | ||||
} | } | ||||
#endif | #endif | ||||
#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ | |||||
#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ |