From c2deef1a976fcb4f727a27926503b7ec4470a6b6 Mon Sep 17 00:00:00 2001 From: Megvii Engine Team Date: Tue, 31 May 2022 20:50:55 +0800 Subject: [PATCH] feat(mge): aad atlas710 support GitOrigin-RevId: 6458c5c23cb65a332782f6445eb5da9656f0092f --- dnn/atlas-stub/include/acl/acl.h | 30 +- dnn/atlas-stub/include/acl/acl_base.h | 435 ++- dnn/atlas-stub/include/acl/acl_mdl.h | 588 ++- dnn/atlas-stub/include/acl/acl_op.h | 210 +- dnn/atlas-stub/include/acl/acl_rt.h | 520 ++- .../include/acl/error_codes/ge_error_codes.h | 76 + .../include/acl/error_codes/rt_error_codes.h | 112 + dnn/atlas-stub/src/libatlas-wrap.cpp | 19 +- dnn/atlas-stub/src/libatlas-wrap_1.1.0.h | 3214 +++++++++++++++++ .../atlas/megcore/public_api/computing.cpp | 135 +- imperative/src/impl/transformations/trace.cpp | 16 +- src/core/include/megbrain/comp_node_env.h | 3 +- src/opr/impl/atlas_runtime_op.cpp | 4 +- 13 files changed, 5037 insertions(+), 325 deletions(-) create mode 100644 dnn/atlas-stub/include/acl/error_codes/ge_error_codes.h create mode 100644 dnn/atlas-stub/include/acl/error_codes/rt_error_codes.h create mode 100644 dnn/atlas-stub/src/libatlas-wrap_1.1.0.h diff --git a/dnn/atlas-stub/include/acl/acl.h b/dnn/atlas-stub/include/acl/acl.h index 22fbc9205..cc32cc1f7 100644 --- a/dnn/atlas-stub/include/acl/acl.h +++ b/dnn/atlas-stub/include/acl/acl.h @@ -19,6 +19,11 @@ extern "C" { #endif +// Current version is 1.1.0 +#define ACL_MAJOR_VERSION 1 +#define ACL_MINOR_VERSION 1 +#define ACL_PATCH_VERSION 0 + /** * @ingroup AscendCL * @brief acl initialize @@ -26,7 +31,7 @@ extern "C" { * @par Restriction * The aclInit interface can be called only once in a process * @param configPath [IN] the config path,it can be NULL - * @retval ACL_ERROR_NONE The function is successfully executed. + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclInit(const char *configPath); @@ -38,11 +43,32 @@ ACL_FUNC_VISIBILITY aclError aclInit(const char *configPath); * @par Restriction * Need to call aclFinalize before the process exits. * After calling aclFinalize,the services cannot continue to be used normally. - * @retval ACL_ERROR_NONE The function is successfully executed. + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclFinalize(); +/** + * @ingroup AscendCL + * @brief query ACL interface version + * + * @param majorVersion[OUT] ACL interface major version + * @param minorVersion[OUT] ACL interface minor version + * @param patchVersion[OUT] ACL interface patch version + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetVersion(int32_t *majorVersion, int32_t *minorVersion, int32_t *patchVersion); + +/** + * @ingroup AscendCL + * @brief get recent error message + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY const char *aclGetRecentErrMsg(); + #ifdef __cplusplus } #endif diff --git a/dnn/atlas-stub/include/acl/acl_base.h b/dnn/atlas-stub/include/acl/acl_base.h index 173aa3f51..f72b55764 100644 --- a/dnn/atlas-stub/include/acl/acl_base.h +++ b/dnn/atlas-stub/include/acl/acl_base.h @@ -13,16 +13,37 @@ #include #include +#include "error_codes/rt_error_codes.h" +#include "error_codes/ge_error_codes.h" #ifdef __cplusplus extern "C" { #endif +#if defined(_MSC_VER) +#ifdef FUNC_VISIBILITY +#define ACL_FUNC_VISIBILITY _declspec(dllexport) +#else +#define ACL_FUNC_VISIBILITY +#endif +#else #ifdef FUNC_VISIBILITY #define ACL_FUNC_VISIBILITY __attribute__((visibility("default"))) #else #define ACL_FUNC_VISIBILITY #endif +#endif + +#ifdef __GNUC__ +#define ACL_DEPRECATED __attribute__((deprecated)) +#define ACL_DEPRECATED_MESSAGE(message) __attribute__((deprecated(message))) +#elif defined(_MSC_VER) +#define ACL_DEPRECATED __declspec(deprecated) +#define ACL_DEPRECATED_MESSAGE(message) __declspec(deprecated(message)) +#else +#define ACL_DEPRECATED +#define ACL_DEPRECATED_MESSAGE(message) +#endif typedef void *aclrtStream; typedef void *aclrtEvent; @@ -32,64 +53,83 @@ typedef uint16_t aclFloat16; typedef struct aclDataBuffer aclDataBuffer; typedef struct aclTensorDesc aclTensorDesc; -const int ACL_ERROR_NONE = 0; - -const int ACL_ERROR_INVALID_PARAM = 100000; -const int ACL_ERROR_UNINITIALIZE = 100001; -const int ACL_ERROR_REPEAT_INITIALIZE = 100002; -const int ACL_ERROR_INVALID_FILE = 100003; -const int ACL_ERROR_WRITE_FILE = 100004; -const int ACL_ERROR_INVALID_FILE_SIZE = 100005; -const int ACL_ERROR_PARSE_FILE = 100006; -const int ACL_ERROR_FILE_MISSING_ATTR = 100007; -const int ACL_ERROR_FILE_ATTR_INVALID = 100008; -const int ACL_ERROR_INVALID_DUMP_CONFIG = 100009; -const int ACL_ERROR_INVALID_PROFILING_CONFIG = 100010; -const int ACL_ERROR_INVALID_MODEL_ID = 100011; -const int ACL_ERROR_DESERIALIZE_MODEL = 100012; -const int ACL_ERROR_PARSE_MODEL = 100013; -const int ACL_ERROR_READ_MODEL_FAILURE = 100014; -const int ACL_ERROR_MODEL_SIZE_INVALID = 100015; -const int ACL_ERROR_MODEL_MISSING_ATTR = 100016; -const int ACL_ERROR_MODEL_INPUT_NOT_MATCH = 100017; -const int ACL_ERROR_MODEL_OUTPUT_NOT_MATCH = 100018; -const int ACL_ERROR_MODEL_NOT_DYNAMIC = 100019; -const int ACL_ERROR_OP_TYPE_NOT_MATCH = 100020; -const int ACL_ERROR_OP_INPUT_NOT_MATCH = 100021; -const int ACL_ERROR_OP_OUTPUT_NOT_MATCH = 100022; -const int ACL_ERROR_OP_ATTR_NOT_MATCH = 100023; -const int ACL_ERROR_OP_NOT_FOUND = 100024; -const int ACL_ERROR_OP_LOAD_FAILED = 100025; -const int ACL_ERROR_UNSUPPORTED_DATA_TYPE = 100026; -const int ACL_ERROR_FORMAT_NOT_MATCH = 100027; -const int ACL_ERROR_BIN_SELECTOR_NOT_REGISTERED = 100028; -const int ACL_ERROR_KERNEL_NOT_FOUND = 100029; -const int ACL_ERROR_BIN_SELECTOR_ALREADY_REGISTERED = 100030; -const int ACL_ERROR_KERNEL_ALREADY_REGISTERED = 100031; -const int ACL_ERROR_INVALID_QUEUE_ID = 100032; -const int ACL_ERROR_REPEAT_SUBSCRIBE = 100033; -const int ACL_ERROR_STREAM_NOT_SUBSCRIBE = 100034; -const int ACL_ERROR_THREAD_NOT_SUBSCRIBE = 100035; -const int ACL_ERROR_WAIT_CALLBACK_TIMEOUT = 100036; -const int ACL_ERROR_REPEAT_FINALIZE = 100037; -const int ACL_ERROR_NOT_STATIC_AIPP = 100038; - -const int ACL_ERROR_BAD_ALLOC = 200000; -const int ACL_ERROR_API_NOT_SUPPORT = 200001; -const int ACL_ERROR_INVALID_DEVICE = 200002; -const int ACL_ERROR_MEMORY_ADDRESS_UNALIGNED = 200003; -const int ACL_ERROR_RESOURCE_NOT_MATCH = 200004; -const int ACL_ERROR_INVALID_RESOURCE_HANDLE = 200005; -const int ACL_ERROR_FEATURE_UNSUPPORTED = 200006; - -const int ACL_ERROR_STORAGE_OVER_LIMIT = 300000; - -const int ACL_ERROR_INTERNAL_ERROR = 500000; -const int ACL_ERROR_FAILURE = 500001; -const int ACL_ERROR_GE_FAILURE = 500002; -const int ACL_ERROR_RT_FAILURE = 500003; -const int ACL_ERROR_DRV_FAILURE = 500004; -const int ACL_ERROR_PROFILING_FAILURE = 500005; +static const int ACL_ERROR_NONE = 0; +static const int ACL_SUCCESS = 0; + +static const int ACL_ERROR_INVALID_PARAM = 100000; +static const int ACL_ERROR_UNINITIALIZE = 100001; +static const int ACL_ERROR_REPEAT_INITIALIZE = 100002; +static const int ACL_ERROR_INVALID_FILE = 100003; +static const int ACL_ERROR_WRITE_FILE = 100004; +static const int ACL_ERROR_INVALID_FILE_SIZE = 100005; +static const int ACL_ERROR_PARSE_FILE = 100006; +static const int ACL_ERROR_FILE_MISSING_ATTR = 100007; +static const int ACL_ERROR_FILE_ATTR_INVALID = 100008; +static const int ACL_ERROR_INVALID_DUMP_CONFIG = 100009; +static const int ACL_ERROR_INVALID_PROFILING_CONFIG = 100010; +static const int ACL_ERROR_INVALID_MODEL_ID = 100011; +static const int ACL_ERROR_DESERIALIZE_MODEL = 100012; +static const int ACL_ERROR_PARSE_MODEL = 100013; +static const int ACL_ERROR_READ_MODEL_FAILURE = 100014; +static const int ACL_ERROR_MODEL_SIZE_INVALID = 100015; +static const int ACL_ERROR_MODEL_MISSING_ATTR = 100016; +static const int ACL_ERROR_MODEL_INPUT_NOT_MATCH = 100017; +static const int ACL_ERROR_MODEL_OUTPUT_NOT_MATCH = 100018; +static const int ACL_ERROR_MODEL_NOT_DYNAMIC = 100019; +static const int ACL_ERROR_OP_TYPE_NOT_MATCH = 100020; +static const int ACL_ERROR_OP_INPUT_NOT_MATCH = 100021; +static const int ACL_ERROR_OP_OUTPUT_NOT_MATCH = 100022; +static const int ACL_ERROR_OP_ATTR_NOT_MATCH = 100023; +static const int ACL_ERROR_OP_NOT_FOUND = 100024; +static const int ACL_ERROR_OP_LOAD_FAILED = 100025; +static const int ACL_ERROR_UNSUPPORTED_DATA_TYPE = 100026; +static const int ACL_ERROR_FORMAT_NOT_MATCH = 100027; +static const int ACL_ERROR_BIN_SELECTOR_NOT_REGISTERED = 100028; +static const int ACL_ERROR_KERNEL_NOT_FOUND = 100029; +static const int ACL_ERROR_BIN_SELECTOR_ALREADY_REGISTERED = 100030; +static const int ACL_ERROR_KERNEL_ALREADY_REGISTERED = 100031; +static const int ACL_ERROR_INVALID_QUEUE_ID = 100032; +static const int ACL_ERROR_REPEAT_SUBSCRIBE = 100033; +static const int ACL_ERROR_STREAM_NOT_SUBSCRIBE = 100034; +static const int ACL_ERROR_THREAD_NOT_SUBSCRIBE = 100035; +static const int ACL_ERROR_WAIT_CALLBACK_TIMEOUT = 100036; +static const int ACL_ERROR_REPEAT_FINALIZE = 100037; +static const int ACL_ERROR_NOT_STATIC_AIPP = 100038; +static const int ACL_ERROR_COMPILING_STUB_MODE = 100039; +static const int ACL_ERROR_GROUP_NOT_SET = 100040; +static const int ACL_ERROR_GROUP_NOT_CREATE = 100041; +static const int ACL_ERROR_PROF_ALREADY_RUN = 100042; +static const int ACL_ERROR_PROF_NOT_RUN = 100043; +static const int ACL_ERROR_DUMP_ALREADY_RUN = 100044; +static const int ACL_ERROR_DUMP_NOT_RUN = 100045; +static const int ACL_ERROR_PROF_REPEAT_SUBSCRIBE = 148046; +static const int ACL_ERROR_PROF_API_CONFLICT = 148047; +static const int ACL_ERROR_INVALID_MAX_OPQUEUE_NUM_CONFIG = 148048; +static const int ACL_ERROR_INVALID_OPP_PATH = 148049; +static const int ACL_ERROR_OP_UNSUPPORTED_DYNAMIC = 148050; +static const int ACL_ERROR_RELATIVE_RESOURCE_NOT_CLEARED = 148051; + +static const int ACL_ERROR_BAD_ALLOC = 200000; +static const int ACL_ERROR_API_NOT_SUPPORT = 200001; +static const int ACL_ERROR_INVALID_DEVICE = 200002; +static const int ACL_ERROR_MEMORY_ADDRESS_UNALIGNED = 200003; +static const int ACL_ERROR_RESOURCE_NOT_MATCH = 200004; +static const int ACL_ERROR_INVALID_RESOURCE_HANDLE = 200005; +static const int ACL_ERROR_FEATURE_UNSUPPORTED = 200006; +static const int ACL_ERROR_PROF_MODULES_UNSUPPORTED = 200007; + +static const int ACL_ERROR_STORAGE_OVER_LIMIT = 300000; + +static const int ACL_ERROR_INTERNAL_ERROR = 500000; +static const int ACL_ERROR_FAILURE = 500001; +static const int ACL_ERROR_GE_FAILURE = 500002; +static const int ACL_ERROR_RT_FAILURE = 500003; +static const int ACL_ERROR_DRV_FAILURE = 500004; +static const int ACL_ERROR_PROFILING_FAILURE = 500005; + +#define ACL_TENSOR_SHAPE_RANGE_NUM 2 +#define ACL_TENSOR_VALUE_RANGE_NUM 2 +#define ACL_UNKNOWN_RANK 0xFFFFFFFFFFFFFFFE typedef enum { ACL_DT_UNDEFINED = -1, @@ -105,6 +145,9 @@ typedef enum { ACL_UINT64 = 10, ACL_DOUBLE = 11, ACL_BOOL = 12, + ACL_STRING = 13, + ACL_COMPLEX64 = 16, + ACL_COMPLEX128 = 17 } aclDataType; typedef enum { @@ -114,7 +157,13 @@ typedef enum { ACL_FORMAT_ND = 2, ACL_FORMAT_NC1HWC0 = 3, ACL_FORMAT_FRACTAL_Z = 4, + ACL_FORMAT_NC1HWC0_C04 = 12, + ACL_FORMAT_HWCN = 16, + ACL_FORMAT_NDHWC = 27, ACL_FORMAT_FRACTAL_NZ = 29, + ACL_FORMAT_NCDHW = 30, + ACL_FORMAT_NDC1HWC0 = 32, + ACL_FRACTAL_Z_3D = 33 } aclFormat; typedef enum { @@ -124,11 +173,19 @@ typedef enum { ACL_ERROR = 3, } aclLogLevel; +typedef enum { + ACL_MEMTYPE_DEVICE = 0, + ACL_MEMTYPE_HOST = 1, + ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT = 2 +} aclMemType; + + /** * @ingroup AscendCL * @brief Converts data of type aclFloat16 to data of type float * * @param value [IN] Data to be converted + * * @retval Transformed data */ ACL_FUNC_VISIBILITY float aclFloat16ToFloat(aclFloat16 value); @@ -138,6 +195,7 @@ ACL_FUNC_VISIBILITY float aclFloat16ToFloat(aclFloat16 value); * @brief Converts data of type float to data of type aclFloat16 * * @param value [IN] Data to be converted + * * @retval Transformed data */ ACL_FUNC_VISIBILITY aclFloat16 aclFloatToFloat16(float value); @@ -150,7 +208,9 @@ ACL_FUNC_VISIBILITY aclFloat16 aclFloatToFloat16(float value); * @li Need to be managed by the user, * call aclrtMalloc interface to apply for memory, * call aclrtFree interface to release memory + * * @param size [IN] size of data in bytes + * * @retval pointer to created instance. nullptr if run out of memory * * @see aclrtMalloc | aclrtFree @@ -165,19 +225,45 @@ ACL_FUNC_VISIBILITY aclDataBuffer *aclCreateDataBuffer(void *data, size_t size); * Only the aclDataBuffer type data is destroyed here. * The memory of the data passed in when the aclDataDataBuffer interface * is called to create aclDataBuffer type data must be released by the user + * * @param dataBuffer [IN] pointer to the aclDataBuffer - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclCreateDataBuffer */ ACL_FUNC_VISIBILITY aclError aclDestroyDataBuffer(const aclDataBuffer *dataBuffer); +/** + * @ingroup AscendCL + * @brief update new data of aclDataBuffer + * + * @param dataBuffer [OUT] pointer to aclDataBuffer + * @li The old data need to be released by the user, otherwise it may occur memory leak leakage + * call aclGetDataBufferAddr interface to get old data address + * call aclrtFree interface to release memory + * + * @param data [IN] pointer to new data + * @li Need to be managed by the user, + * call aclrtMalloc interface to apply for memory, + * call aclrtFree interface to release memory + * + * @param size [IN] size of data in bytes + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtMalloc | aclrtFree | aclGetDataBufferAddr + */ +ACL_FUNC_VISIBILITY aclError aclUpdateDataBuffer(aclDataBuffer *dataBuffer, void *data, size_t size); + /** * @ingroup AscendCL * @brief get data address from aclDataBuffer * * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * * @retval data address */ ACL_FUNC_VISIBILITY void *aclGetDataBufferAddr(const aclDataBuffer *dataBuffer); @@ -187,15 +273,28 @@ ACL_FUNC_VISIBILITY void *aclGetDataBufferAddr(const aclDataBuffer *dataBuffer); * @brief get data size of aclDataBuffer * * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * * @retval data size */ +// ACL_DEPRECATED_MESSAGE("aclGetDataBufferSize is deprecated, use aclGetDataBufferSizeV2 instead") ACL_FUNC_VISIBILITY uint32_t aclGetDataBufferSize(const aclDataBuffer *dataBuffer); +/** + * @ingroup AscendCL + * @brief get data size of aclDataBuffer to replace aclGetDataBufferSize + * + * @param dataBuffer [IN] pointer to the data of aclDataBuffer + * + * @retval data size + */ +ACL_FUNC_VISIBILITY size_t aclGetDataBufferSizeV2(const aclDataBuffer *dataBuffer); + /** * @ingroup AscendCL * @brief get size of aclDataType * * @param dataType [IN] aclDataType data the size to get + * * @retval size of the aclDataType */ ACL_FUNC_VISIBILITY size_t aclDataTypeSize(aclDataType dataType); @@ -209,6 +308,7 @@ ACL_FUNC_VISIBILITY size_t aclDataTypeSize(aclDataType dataType); * @param numDims [IN] the number of dimensions of the shape * @param dims [IN] the size of the specified dimension * @param format [IN] tensor format + * * @retval aclTensorDesc pointer. * @retval nullptr if param is invalid or run out of memory */ @@ -225,11 +325,41 @@ ACL_FUNC_VISIBILITY aclTensorDesc *aclCreateTensorDesc(aclDataType dataType, */ ACL_FUNC_VISIBILITY void aclDestroyTensorDesc(const aclTensorDesc *desc); +/** + * @ingroup AscendCL + * @brief set tensor shape range for aclTensorDesc + * + * @param desc [OUT] pointer to the data of aclTensorDesc + * @param dimsCount [IN] the number of dimensions of the shape + * @param dimsRange [IN] the range of dimensions of the shape + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorShapeRange(aclTensorDesc* desc, + size_t dimsCount, + int64_t dimsRange[][ACL_TENSOR_SHAPE_RANGE_NUM]); + +/** + * @ingroup AscendCL + * @brief set value range for aclTensorDesc + * + * @param desc [OUT] pointer to the data of aclTensorDesc + * @param valueCount [IN] the number of value + * @param valueRange [IN] the range of value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorValueRange(aclTensorDesc* desc, + size_t valueCount, + int64_t valueRange[][ACL_TENSOR_VALUE_RANGE_NUM]); /** * @ingroup AscendCL * @brief get data type specified by the tensor description * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval data type specified by the tensor description. * @retval ACL_DT_UNDEFINED if description is null */ @@ -240,6 +370,7 @@ ACL_FUNC_VISIBILITY aclDataType aclGetTensorDescType(const aclTensorDesc *desc); * @brief get data format specified by the tensor description * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval data format specified by the tensor description. * @retval ACL_FORMAT_UNDEFINED if description is null */ @@ -250,6 +381,7 @@ ACL_FUNC_VISIBILITY aclFormat aclGetTensorDescFormat(const aclTensorDesc *desc); * @brief get tensor size specified by the tensor description * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval data size specified by the tensor description. * @retval 0 if description is null */ @@ -260,6 +392,7 @@ ACL_FUNC_VISIBILITY size_t aclGetTensorDescSize(const aclTensorDesc *desc); * @brief get element count specified by the tensor description * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval element count specified by the tensor description. * @retval 0 if description is null */ @@ -270,8 +403,10 @@ ACL_FUNC_VISIBILITY size_t aclGetTensorDescElementCount(const aclTensorDesc *des * @brief get number of dims specified by the tensor description * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval number of dims specified by the tensor description. * @retval 0 if description is null + * @retval ACL_UNKNOWN_RANK if the tensor dim is -2 */ ACL_FUNC_VISIBILITY size_t aclGetTensorDescNumDims(const aclTensorDesc *desc); @@ -281,16 +416,48 @@ ACL_FUNC_VISIBILITY size_t aclGetTensorDescNumDims(const aclTensorDesc *desc); * * @param desc [IN] pointer to the instance of aclTensorDesc * @param index [IN] index of dims, start from 0. + * * @retval dim specified by the tensor description and index. * @retval -1 if description or index is invalid */ +// ACL_DEPRECATED_MESSAGE("aclGetTensorDescDim is deprecated, use aclGetTensorDescDimV2 instead") ACL_FUNC_VISIBILITY int64_t aclGetTensorDescDim(const aclTensorDesc *desc, size_t index); +/** + * @ingroup AscendCL + * @brief Get the size of the specified dim in the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * @param index [IN] index of dims, start from 0. + * @param dimSize [OUT] size of the specified dim. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimV2(const aclTensorDesc *desc, size_t index, int64_t *dimSize); + +/** + * @ingroup AscendCL + * @brief Get the range of the specified dim in the tensor description + * + * @param desc [IN] pointer to the instance of aclTensorDesc + * @param index [IN] index of dims, start from 0. + * @param dimRangeNum [IN] number of dimRange. + * @param dimRange [OUT] range of the specified dim. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclGetTensorDescDimRange(const aclTensorDesc *desc, + size_t index, + size_t dimRangeNum, + int64_t *dimRange); + /** * @ingroup AscendCL * @brief set tensor description name * - * @param desc [IN] pointer to the instance of aclTensorDesc + * @param desc [OUT] pointer to the instance of aclTensorDesc * @param name [IN] tensor description name */ ACL_FUNC_VISIBILITY void aclSetTensorDescName(aclTensorDesc *desc, const char *name); @@ -300,6 +467,7 @@ ACL_FUNC_VISIBILITY void aclSetTensorDescName(aclTensorDesc *desc, const char *n * @brief get tensor description name * * @param desc [IN] pointer to the instance of aclTensorDesc + * * @retval tensor description name. * @retval empty string if description is null */ @@ -313,8 +481,9 @@ ACL_FUNC_VISIBILITY const char *aclGetTensorDescName(aclTensorDesc *desc); * * @param srcDesc [IN] pointer to the source tensor desc * @param dstFormat [IN] destination format - * @param dstDesc [OUT] pointer to the pointer to the destination tensor desc - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param dstDesc [OUT] pointer to the pointer to the destination tensor desc + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclTransTensorDescFormat(const aclTensorDesc *srcDesc, aclFormat dstFormat, @@ -324,25 +493,140 @@ ACL_FUNC_VISIBILITY aclError aclTransTensorDescFormat(const aclTensorDesc *srcDe * @ingroup AscendCL * @brief Set the storage format specified by the tensor description * - * @param desc [IN|OUT] pointer to the instance of aclTensorDesc - * @param format [IN] the storage format - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ +// ACL_DEPRECATED_MESSAGE("aclSetTensorStorageFormat is deprecated, use aclSetTensorFormat instead") ACL_FUNC_VISIBILITY aclError aclSetTensorStorageFormat(aclTensorDesc *desc, aclFormat format); /** * @ingroup AscendCL * @brief Set the storage shape specified by the tensor description * - * @param desc [IN|OUT] pointer to the instance of aclTensorDesc - * @param numDims [IN] the number of dimensions of the shape - * @param dims [IN] the size of the specified dimension - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ +// ACL_DEPRECATED_MESSAGE("aclSetTensorStorageShape is deprecated, use aclSetTensorShape instead") ACL_FUNC_VISIBILITY aclError aclSetTensorStorageShape(aclTensorDesc *desc, int numDims, const int64_t *dims); +/** + * @ingroup AscendCL + * @brief Set the format specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorFormat(aclTensorDesc *desc, aclFormat format); + +/** + * @ingroup AscendCL + * @brief Set the shape specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorShape(aclTensorDesc *desc, int numDims, const int64_t *dims); + +/** + * @ingroup AscendCL + * @brief Set the original format specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param format [IN] the storage format + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorOriginFormat(aclTensorDesc *desc, aclFormat format); + +/** + * @ingroup AscendCL + * @brief Set the original shape specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param numDims [IN] the number of dimensions of the shape + * @param dims [IN] the size of the specified dimension + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorOriginShape(aclTensorDesc *desc, int numDims, const int64_t *dims); + +/** + * @ingroup AscendCL + * @brief get op description info + * + * @param desc [IN] pointer to tensor description + * @param index [IN] index of tensor + * + * @retval null for failed. + * @retval OtherValues success. +*/ +ACL_FUNC_VISIBILITY aclTensorDesc *aclGetTensorDescByIndex(aclTensorDesc *desc, size_t index); + +/** + * @ingroup AscendCL + * @brief get address of tensor + * + * @param desc [IN] pointer to tensor description + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY void *aclGetTensorDescAddress(const aclTensorDesc *desc); + +/** + * @ingroup AscendCL + * @brief Set the dynamic input name specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param dynamicInputName [IN] pointer to the dynamic input name + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorDynamicInput(aclTensorDesc *desc, const char *dynamicInputName); + +/** + * @ingroup AscendCL + * @brief Set const data specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param dataBuffer [IN] pointer to the const databuffer + * @param length [IN] the length of const databuffer + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorConst(aclTensorDesc *desc, void *dataBuffer, size_t length); + +/** + * @ingroup AscendCL + * @brief Set tensor memory type specified by the tensor description + * + * @param desc [OUT] pointer to the instance of aclTensorDesc + * @param memType [IN] ACL_MEMTYPE_DEVICE means device, ACL_MEMTYPE_HOST or + * ACL_MEMTYPE_HOST_COMPILE_INDEPENDENT means host + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclSetTensorPlaceMent(aclTensorDesc *desc, aclMemType memType); + /** * @ingroup AscendCL * @brief an interface for users to output APP logs @@ -354,8 +638,17 @@ ACL_FUNC_VISIBILITY aclError aclSetTensorStorageShape(aclTensorDesc *desc, int n * @param fmt [IN] the format 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, - const char *fmt, ...); +// ACL_FUNC_VISIBILITY void aclAppLog(aclLogLevel logLevel, const char *func, const char *file, uint32_t line, + // const char *fmt, ...); + +/** + * @ingroup AscendCL + * @brief get soc name + * + * @retval null for failed + * @retval OtherValues success +*/ +ACL_FUNC_VISIBILITY const char *aclrtGetSocName(); #define ACL_APP_LOG(level, fmt, ...) \ aclAppLog(level, __FUNCTION__, __FILE__, __LINE__, fmt, ##__VA_ARGS__) diff --git a/dnn/atlas-stub/include/acl/acl_mdl.h b/dnn/atlas-stub/include/acl/acl_mdl.h index b900d972f..fb1112d5f 100644 --- a/dnn/atlas-stub/include/acl/acl_mdl.h +++ b/dnn/atlas-stub/include/acl/acl_mdl.h @@ -26,14 +26,24 @@ extern "C" { #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_AIPP_NAME "ascend_dynamic_aipp_data" +#define ACL_ATTR_NAME_DATA_DUMP_ORIGIN_OP_NAMES "_datadump_original_op_names" typedef struct aclmdlDataset aclmdlDataset; typedef struct aclmdlDesc aclmdlDesc; typedef struct aclmdlAIPP aclmdlAIPP; typedef struct aclAippExtendInfo aclAippExtendInfo; +typedef struct aclmdlConfigHandle aclmdlConfigHandle; typedef enum { ACL_YUV420SP_U8 = 1, @@ -53,6 +63,29 @@ typedef enum { ACL_AIPP_RESERVED = 0xffff, } aclAippInputFormat; +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 */ +} aclmdlConfigAttr; + +typedef enum { + ACL_DATA_WITHOUT_AIPP = 0, + ACL_DATA_WITH_STATIC_AIPP, + ACL_DATA_WITH_DYNAMIC_AIPP, + ACL_DYNAMIC_AIPP_NODE +} aclmdlInputAippType; + typedef struct aclmdlIODims { char name[ACL_MAX_TENSOR_NAME_LEN]; /**< tensor name */ size_t dimCount; /**< dim array count */ @@ -145,7 +178,8 @@ ACL_FUNC_VISIBILITY aclmdlDesc *aclmdlCreateDesc(); * @brief destroy data of type aclmdlDesc * * @param modelDesc [IN] Pointer to almdldlDesc to be destroyed - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlDestroyDesc(aclmdlDesc *modelDesc); @@ -156,7 +190,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlDestroyDesc(aclmdlDesc *modelDesc); * * @param modelDesc [OUT] aclmdlDesc pointer * @param modelId [IN] model id - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetDesc(aclmdlDesc *modelDesc, uint32_t modelId); @@ -167,6 +202,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetDesc(aclmdlDesc *modelDesc, uint32_t model * the model according to data of aclmdlDesc * * @param modelDesc [IN] aclmdlDesc pointer + * * @retval input size with aclmdlDesc */ ACL_FUNC_VISIBILITY size_t aclmdlGetNumInputs(aclmdlDesc *modelDesc); @@ -177,6 +213,7 @@ ACL_FUNC_VISIBILITY size_t aclmdlGetNumInputs(aclmdlDesc *modelDesc); * the model according to data of aclmdlDesc * * @param modelDesc [IN] aclmdlDesc pointer + * * @retval output size with aclmdlDesc */ ACL_FUNC_VISIBILITY size_t aclmdlGetNumOutputs(aclmdlDesc *modelDesc); @@ -189,6 +226,7 @@ ACL_FUNC_VISIBILITY size_t aclmdlGetNumOutputs(aclmdlDesc *modelDesc); * @param modelDesc [IN] aclmdlDesc pointer * @param index [IN] the size of the number of inputs to be obtained, * the index value starts from 0 + * * @retval Specify the size of the input */ ACL_FUNC_VISIBILITY size_t aclmdlGetInputSizeByIndex(aclmdlDesc *modelDesc, size_t index); @@ -201,6 +239,7 @@ ACL_FUNC_VISIBILITY size_t aclmdlGetInputSizeByIndex(aclmdlDesc *modelDesc, size * @param modelDesc [IN] aclmdlDesc pointer * @param index [IN] the size of the number of outputs to be obtained, * the index value starts from 0 + * * @retval Specify the size of the output */ ACL_FUNC_VISIBILITY size_t aclmdlGetOutputSizeByIndex(aclmdlDesc *modelDesc, size_t index); @@ -218,7 +257,8 @@ ACL_FUNC_VISIBILITY aclmdlDataset *aclmdlCreateDataset(); * @brief destroy data of type aclmdlDataset * * @param dataset [IN] Pointer to aclmdlDataset to be destroyed - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlDestroyDataset(const aclmdlDataset *dataset); @@ -227,19 +267,47 @@ ACL_FUNC_VISIBILITY aclError aclmdlDestroyDataset(const aclmdlDataset *dataset); * @ingroup AscendCL * @brief Add aclDataBuffer to aclmdlDataset * - * @param dataset [IN|OUT] aclmdlDataset address of aclDataBuffer to be added + * @param dataset [OUT] aclmdlDataset address of aclDataBuffer to be added * @param dataBuffer [IN] aclDataBuffer address to be added - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ -ACL_FUNC_VISIBILITY aclError aclmdlAddDatasetBuffer(aclmdlDataset *dataset, - aclDataBuffer *dataBuffer); +ACL_FUNC_VISIBILITY aclError aclmdlAddDatasetBuffer(aclmdlDataset *dataset, aclDataBuffer *dataBuffer); + +/** + * @ingroup AscendCL + * @brief Set aclTensorDesc to aclmdlDataset + * + * @param dataset [OUT] aclmdlDataset address of aclDataBuffer to be added + * @param tensorDesc [IN] aclTensorDesc address to be added + * @param index [IN] index of tensorDesc which to be added + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetDatasetTensorDesc(aclmdlDataset *dataset, + aclTensorDesc *tensorDesc, + size_t index); + +/** + * @ingroup AscendCL + * @brief Get aclTensorDesc from aclmdlDataset + * + * @param dataset [IN] aclmdlDataset pointer; + * @param index [IN] index of tensorDesc + * + * @retval Get address of aclTensorDesc when executed successfully. + * @retval Failure return NULL + */ +ACL_FUNC_VISIBILITY aclTensorDesc *aclmdlGetDatasetTensorDesc(const aclmdlDataset *dataset, size_t index); /** * @ingroup AscendCL * @brief Get the number of aclDataBuffer in aclmdlDataset * - * @param dataset [IN] aclmdlDataset poiter + * @param dataset [IN] aclmdlDataset pointer + * * @retval the number of aclDataBuffer */ ACL_FUNC_VISIBILITY size_t aclmdlGetDatasetNumBuffers(const aclmdlDataset *dataset); @@ -248,13 +316,13 @@ ACL_FUNC_VISIBILITY size_t aclmdlGetDatasetNumBuffers(const aclmdlDataset *datas * @ingroup AscendCL * @brief Get the aclDataBuffer in aclmdlDataset by index * - * @param dataset [IN] aclmdlDataset poiter + * @param dataset [IN] aclmdlDataset pointer * @param index [IN] the index of aclDataBuffer + * * @retval Get successfully, return the address of aclDataBuffer * @retval Failure return NULL */ -ACL_FUNC_VISIBILITY aclDataBuffer *aclmdlGetDatasetBuffer(const aclmdlDataset *dataset, - size_t index); +ACL_FUNC_VISIBILITY aclDataBuffer *aclmdlGetDatasetBuffer(const aclmdlDataset *dataset, size_t index); /** * @ingroup AscendCL @@ -264,11 +332,13 @@ ACL_FUNC_VISIBILITY aclDataBuffer *aclmdlGetDatasetBuffer(const aclmdlDataset *d * @par Function * After the system finishes loading the model, * the model ID returned is used as a mark to identify the model - * during subsequent operations. + * during subsequent operations + * * @param modelPath [IN] Storage path for offline model files - * @param modelId [OUT] Model ID generated after + * @param modelId [OUT] Model ID generated after * the system finishes loading the model - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFile(const char *modelPath, uint32_t *modelId); @@ -282,15 +352,17 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFile(const char *modelPath, uint32_t * After the system finishes loading the model, * the model ID returned is used as a mark to identify the model * during subsequent operations - * @param model [IN] Model data stored in memory + * + * @param model [IN] Model data stored in memory * @param modelSize [IN] model data size - * @param modelId [OUT] Model ID generated after + * @param modelId [OUT] Model ID generated after * the system finishes loading the model - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelSize, - uint32_t *modelId); + uint32_t *modelId); /** * @ingroup AscendCL @@ -302,18 +374,19 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromMem(const void *model, size_t modelS * the model ID returned is used as a mark to identify the model * during subsequent operations. * @param modelPath [IN] Storage path for offline model files - * @param modelId [OUT] Model ID generated after finishes loading the model - * @param workPtr [IN] A pointer to the working memory - * required by the model on the Device,can be null - * @param workSize [IN] The amount of working memory required by the model - * @param weightPtr [IN] Pointer to model weight memory on Device + * @param modelId [OUT] Model ID generated after finishes loading the model + * @param workPtr [IN] A pointer to the working memory + * required by the model on the Device,can be null + * @param workSize [IN] The amount of working memory required by the model + * @param weightPtr [IN] Pointer to model weight memory on Device * @param weightSize [IN] The amount of weight memory required by the model - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, - uint32_t *modelId, void *workPtr, size_t workSize, - void *weightPtr, size_t weightSize); + uint32_t *modelId, void *workPtr, size_t workSize, + void *weightPtr, size_t weightSize); /** * @ingroup AscendCL @@ -324,90 +397,96 @@ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithMem(const char *modelPath, * After the system finishes loading the model, * the model ID returned is used as a mark to identify the model * during subsequent operations - * @param model [IN] Model data stored in memory + * @param model [IN] Model data stored in memory * @param modelSize [IN] model data size - * @param modelId [OUT] Model ID generated after finishes loading the model - * @param workPtr [IN] A pointer to the working memory - * required by the model on the Device,can be null - * @param workSize [IN] work memory size - * @param weightPtr [IN] Pointer to model weight memory on Device,can be null - * @param weightSize [IN] The amount of weight memory required by the model - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param modelId [OUT] Model ID generated after finishes loading the model + * @param workPtr [IN] A pointer to the working memory + * required by the model on the Device,can be null + * @param workSize [IN] work memory size + * @param weightPtr [IN] Pointer to model weight memory on Device,can be null + * @param weightSize [IN] The amount of weight memory required by the model + * + * @retval ACL_SUCCESS The function is successfully executed. * @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); + uint32_t *modelId, void *workPtr, size_t workSize, + void *weightPtr, size_t weightSize); /** * @ingroup AscendCL * @brief load model from file with async queue * - * @param modelPath [IN] model path - * @param modelId [OUT] return model id if load success - * @param inputQ [IN] input queue pointer + * @param modelPath [IN] model path + * @param modelId [OUT] return model id if load success + * @param inputQ [IN] input queue pointer * @param inputQNum [IN] input queue num - * @param outputQ [IN] output queue pointer - * @param outputQNum [IN] output queue num - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param outputQ [IN] output queue pointer + * @param outputQNum [IN] output queue num + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlLoadFromFileWithQ(const char *modelPath, uint32_t *modelId, const uint32_t *inputQ, - size_t inputQNum, const uint32_t *outputQ, size_t outputQNum); + size_t inputQNum, const uint32_t *outputQ, size_t outputQNum); /** * @ingroup AscendCL * @brief load model from memory with async queue * - * @param model [IN] model memory which user manages + * @param model [IN] model memory which user manages * @param modelSize [IN] model size - * @param modelId [OUT] return model id if load success - * @param inputQ [IN] input queue pointer + * @param modelId [OUT] return model id if load success + * @param inputQ [IN] input queue pointer * @param inputQNum [IN] input queue num - * @param outputQ [IN] output queue pointer - * @param outputQNum [IN] output queue num - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param outputQ [IN] output queue pointer + * @param outputQNum [IN] output queue num + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ 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 * @brief Execute model synchronous inference until the inference result is returned * * @param modelId [IN] ID of the model to perform inference - * @param input [IN] Input data for model inference + * @param input [IN] Input data for model inference * @param output [OUT] Output data for model inference - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ -ACL_FUNC_VISIBILITY aclError aclmdlExecute(uint32_t modelId, const aclmdlDataset *input, - aclmdlDataset *output); +ACL_FUNC_VISIBILITY aclError aclmdlExecute(uint32_t modelId, const aclmdlDataset *input, aclmdlDataset *output); /** * @ingroup AscendCL * @brief Execute model asynchronous inference until the inference result is returned * * @param modelId [IN] ID of the model to perform inference - * @param input [IN] Input data for model inference + * @param input [IN] Input data for model inference * @param output [OUT] Output data for model inference - * @param stream [IN] stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * aclmdlLoadFromMemWithMem */ ACL_FUNC_VISIBILITY aclError aclmdlExecuteAsync(uint32_t modelId, const aclmdlDataset *input, - aclmdlDataset *output, aclrtStream stream); + aclmdlDataset *output, aclrtStream stream); /** * @ingroup AscendCL * @brief unload model with model id * * @param modelId [IN] model id to be unloaded - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlUnload(uint32_t modelId); @@ -417,10 +496,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlUnload(uint32_t modelId); * @brief Get the weight memory size and working memory size * required for model execution according to the model file * - * @param fileName [IN] Model path to get memory information - * @param workSize [OUT] The amount of working memory for model executed + * @param fileName [IN] Model path to get memory information + * @param workSize [OUT] The amount of working memory for model executed * @param weightSize [OUT] The amount of weight memory for model executed - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlQuerySize(const char *fileName, size_t *workSize, size_t *weightSize); @@ -433,15 +513,16 @@ ACL_FUNC_VISIBILITY aclError aclmdlQuerySize(const char *fileName, size_t *workS * @par Restriction * The execution and weight memory is Device memory, * and requires user application and release. - * @param model [IN] model memory which user manages + * @param model [IN] model memory which user manages * @param modelSize [IN] model data size * @param workSize [OUT] The amount of working memory for model executed - * @param weightSize [OUT] The amount of weight memory for model executed - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param weightSize [OUT] The amount of weight memory for model executed + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlQuerySizeFromMem(const void *model, size_t modelSize, size_t *workSize, - size_t *weightSize); + size_t *weightSize); /** * @ingroup AscendCL @@ -449,36 +530,56 @@ ACL_FUNC_VISIBILITY aclError aclmdlQuerySizeFromMem(const void *model, size_t mo * it is used to set the number of images processed * at one time during model inference * - * @param modelId [IN] model id - * @param dataset [IN] data for model inference - * @param index [IN] index of dynamic tensor - * @param batchSize [IN] Number of images processed at a time during model - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic tensor + * @param batchSize [IN] Number of images processed at a time during model + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName */ ACL_FUNC_VISIBILITY aclError aclmdlSetDynamicBatchSize(uint32_t modelId, aclmdlDataset *dataset, size_t index, - uint64_t batchSize); + uint64_t batchSize); /** * @ingroup AscendCL * @brief Sets the H and W of the specified input of the model * - * @param modelId [IN] model id - * @param dataset [IN] data for model inference - * @param index [IN] index of dynamic tensor - * @param height [IN] model height - * @param width [IN] model width - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic tensor + * @param height [IN] model height + * @param width [IN] model width + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName */ ACL_FUNC_VISIBILITY aclError aclmdlSetDynamicHWSize(uint32_t modelId, aclmdlDataset *dataset, size_t index, - uint64_t height, uint64_t width); + uint64_t height, uint64_t width); + +/** + * @ingroup AscendCL + * @brief Sets the dynamic dims of the specified input of the model + * + * @param modelId [IN] model id + * @param dataset [IN|OUT] data for model inference + * @param index [IN] index of dynamic dims + * @param dims [IN] value of dynamic dims + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetInputDynamicDims(uint32_t modelId, aclmdlDataset *dataset, size_t index, + const aclmdlIODims *dims); /** * @ingroup AscendCL @@ -487,7 +588,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetDynamicHWSize(uint32_t modelId, aclmdlData * @param modelDesc [IN] model description * @param index [IN] input tensor index * @param dims [OUT] dims info - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlGetInputDimsV2 @@ -499,11 +601,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetInputDims(const aclmdlDesc *modelDesc, siz * @brief get input dims info(version 2), especially for static aipp * it is the same with aclmdlGetInputDims while model without static aipp * - * @param modelDesc [IN] model description - * @param index [IN] input tensor index - * @param dims [OUT] dims info + * @param modelDesc [IN] model description + * @param index [IN] input tensor index + * @param dims [OUT] dims info * - * @retval ACL_ERROR_NONE The function is successfully executed. + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlGetInputDims @@ -514,10 +616,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetInputDimsV2(const aclmdlDesc *modelDesc, s * @ingroup AscendCL * @brief get output dims info * - * @param modelDesc [IN] model description - * @param index [IN] output tensor index - * @param dims [OUT] dims info - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); @@ -534,20 +637,34 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetOutputDims(const aclmdlDesc *modelDesc, si * dynamic shape info is not set * @li Get actual output shape when model is static * - * @param modelDesc [IN] model description - * @param index [IN] output tensor index - * @param dims [OUT] dims info - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param modelDesc [IN] model description + * @param index [IN] output tensor index + * @param dims [OUT] dims info + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetCurOutputDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims); +/** + * @ingroup AscendCL + * @brief get attr value by op name + * + * @param modelDesc [IN] model description + * @param opName [IN] op name + * @param attr [IN] attr name + * + * @retval the attr value + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetOpAttr(aclmdlDesc *modelDesc, const char *opName, const char *attr); + /** * @ingroup AscendCL * @brief get input name by index * * @param modelDesc [IN] model description - * @param index [IN] intput tensor index + * @param index [IN] intput tensor index + * * @retval input tensor name,the same life cycle with modelDesc */ ACL_FUNC_VISIBILITY const char *aclmdlGetInputNameByIndex(const aclmdlDesc *modelDesc, size_t index); @@ -557,7 +674,8 @@ ACL_FUNC_VISIBILITY const char *aclmdlGetInputNameByIndex(const aclmdlDesc *mode * @brief get output name by index * * @param modelDesc [IN] model description - * @param index [IN] output tensor index + * @param index [IN] output tensor index + * * @retval output tensor name,the same life cycle with modelDesc */ ACL_FUNC_VISIBILITY const char *aclmdlGetOutputNameByIndex(const aclmdlDesc *modelDesc, size_t index); @@ -567,7 +685,8 @@ ACL_FUNC_VISIBILITY const char *aclmdlGetOutputNameByIndex(const aclmdlDesc *mod * @brief get input format by index * * @param modelDesc [IN] model description - * @param index [IN] intput tensor index + * @param index [IN] intput tensor index + * * @retval input tensor format */ ACL_FUNC_VISIBILITY aclFormat aclmdlGetInputFormat(const aclmdlDesc *modelDesc, size_t index); @@ -577,7 +696,8 @@ ACL_FUNC_VISIBILITY aclFormat aclmdlGetInputFormat(const aclmdlDesc *modelDesc, * @brief get output format by index * * @param modelDesc [IN] model description - * @param index [IN] output tensor index + * @param index [IN] output tensor index + * * @retval output tensor format */ ACL_FUNC_VISIBILITY aclFormat aclmdlGetOutputFormat(const aclmdlDesc *modelDesc, size_t index); @@ -588,6 +708,7 @@ ACL_FUNC_VISIBILITY aclFormat aclmdlGetOutputFormat(const aclmdlDesc *modelDesc, * * @param modelDesc [IN] model description * @param index [IN] intput tensor index + * * @retval input tensor data type */ ACL_FUNC_VISIBILITY aclDataType aclmdlGetInputDataType(const aclmdlDesc *modelDesc, size_t index); @@ -598,6 +719,7 @@ ACL_FUNC_VISIBILITY aclDataType aclmdlGetInputDataType(const aclmdlDesc *modelDe * * @param modelDesc [IN] model description * @param index [IN] output tensor index + * * @retval output tensor data type */ ACL_FUNC_VISIBILITY aclDataType aclmdlGetOutputDataType(const aclmdlDesc *modelDesc, size_t index); @@ -607,9 +729,10 @@ ACL_FUNC_VISIBILITY aclDataType aclmdlGetOutputDataType(const aclmdlDesc *modelD * @brief get input tensor index by name * * @param modelDesc [IN] model description - * @param name [IN] intput tensor name + * @param name [IN] intput tensor name * @param index [OUT] intput tensor index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetInputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index); @@ -621,7 +744,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetInputIndexByName(const aclmdlDesc *modelDe * @param modelDesc [IN] model description * @param name [IN] output tensor name * @param index [OUT] output tensor index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetOutputIndexByName(const aclmdlDesc *modelDesc, const char *name, size_t *index); @@ -632,7 +756,8 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetOutputIndexByName(const aclmdlDesc *modelD * * @param modelDesc [IN] model description * @param batch [OUT] dynamic batch info - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, aclmdlBatch *batch); @@ -644,16 +769,47 @@ ACL_FUNC_VISIBILITY aclError aclmdlGetDynamicBatch(const aclmdlDesc *modelDesc, * @param modelDesc [IN] model description * @param index [IN] input tensor index * @param hw [OUT] dynamic height&width info - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlGetDynamicHW(const aclmdlDesc *modelDesc, size_t index, aclmdlHW *hw); +/** + * @ingroup AscendCL + * @brief get dynamic gear count + * + * @param modelDesc [IN] model description + * @param index [IN] unused, must be -1 + * @param gearCount [OUT] dynamic gear count + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDynamicGearCount(const aclmdlDesc *modelDesc, size_t index, + size_t *gearCount); + +/** + * @ingroup AscendCL + * @brief get dynamic dims info + * + * @param modelDesc [IN] model description + * @param index [IN] unused, must be -1 + * @param dims [OUT] value of dynamic dims + * @param gearCount [IN] dynamic gear count + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlGetInputDynamicDims(const aclmdlDesc *modelDesc, size_t index, aclmdlIODims *dims, + size_t gearCount); + /** * @ingroup AscendCL * @brief Create data of type aclmdlAIPP * * @param batchSize [IN] batchsizes of model + * * @retval the aclmdlAIPP pointer */ ACL_FUNC_VISIBILITY aclmdlAIPP *aclmdlCreateAIPP(uint64_t batchSize); @@ -663,7 +819,8 @@ ACL_FUNC_VISIBILITY aclmdlAIPP *aclmdlCreateAIPP(uint64_t batchSize); * @brief destroy data of type aclmdlAIPP * * @param aippParmsSet [IN] Pointer for aclmdlAIPP to be destroyed - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclmdlDestroyAIPP(const aclmdlAIPP *aippParmsSet); @@ -672,9 +829,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlDestroyAIPP(const aclmdlAIPP *aippParmsSet); * @ingroup AscendCL * @brief set InputFormat of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param inputFormat [IN] The inputFormat of aipp - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -685,7 +843,7 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPInputFormat(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set cscParms of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param csc_switch [IN] Csc switch * @param cscMatrixR0C0 [IN] Csc_matrix_r0_c0 * @param cscMatrixR0C1 [IN] Csc_matrix_r0_c1 @@ -702,12 +860,13 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPInputFormat(aclmdlAIPP *aippParmsSet, * @param cscInputBiasR0 [IN] Input Bias for YUV to RGB, element of row 0, unsigned number * @param cscInputBiasR1 [IN] Input Bias for YUV to RGB, element of row 1, unsigned number * @param cscInputBiasR2 [IN] Input Bias for YUV to RGB, element of row 2, unsigned number - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP */ -ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t csc_switch, +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, int8_t cscSwitch, 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, @@ -719,9 +878,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCscParams(aclmdlAIPP *aippParmsSet, in * @ingroup AscendCL * @brief set rb/ub swap switch of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param rbuvSwapSwitch [IN] rb/ub swap switch - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -732,9 +892,10 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *aippParmsSe * @ingroup AscendCL * @brief set RGBA->ARGB, YUVA->AYUV swap switch of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param axSwapSwitch [IN] RGBA->ARGB, YUVA->AYUV swap switch - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -745,29 +906,31 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set source image of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param srcImageSizeW [IN] Source image width * @param srcImageSizeH [IN] Source image height - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP */ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPSrcImageSize(aclmdlAIPP *aippParmsSet, int32_t srcImageSizeW, - int32_t srcImageSizeH); + int32_t srcImageSizeH); /** * @ingroup AscendCL * @brief set resize switch of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param scfSwitch [IN] Resize switch * @param scfInputSizeW [IN] Input width of scf * @param scfInputSizeH [IN] Input height of scf * @param scfOutputSizeW [IN] Output width of scf * @param scfOutputSizeH [IN] Output height of scf * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -784,14 +947,15 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPScfParams(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set cropParams of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param cropSwitch [IN] Crop switch * @param cropStartPosW [IN] The start horizontal position of cropping * @param cropStartPosH [IN] The start vertical position of cropping * @param cropSizeW [IN] Crop width * @param cropSizeH [IN] Crop height * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -808,14 +972,15 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPCropParams(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set paddingParams of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param paddingSwitch [IN] Padding switch * @param paddingSizeTop [IN] Top padding size * @param paddingSizeBottom [IN] Bottom padding size * @param paddingSizeLeft [IN] Left padding size * @param paddingSizeRight [IN] Right padding size * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -829,13 +994,14 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPaddingParams(aclmdlAIPP *aippParmsSet * @ingroup AscendCL * @brief set DtcPixelMean of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param dtcPixelMeanChn0 [IN] Mean value of channel 0 * @param dtcPixelMeanChn1 [IN] Mean value of channel 1 * @param dtcPixelMeanChn2 [IN] Mean value of channel 2 * @param dtcPixelMeanChn3 [IN] Mean value of channel 3 * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -851,13 +1017,14 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set DtcPixelMin of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param dtcPixelMinChn0 [IN] Min value of channel 0 * @param dtcPixelMinChn1 [IN] Min value of channel 1 * @param dtcPixelMinChn2 [IN] Min value of channel 2 * @param dtcPixelMinChn3 [IN] Min value of channel 3 * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -873,13 +1040,14 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *aippParmsSet, * @ingroup AscendCL * @brief set PixelVarReci of type aclmdlAIPP * - * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * @param aippParmsSet [OUT] Pointer for aclmdlAIPP * @param dtcPixelVarReciChn0 [IN] sfr_dtc_pixel_variance_reci_ch0 * @param dtcPixelVarReciChn1 [IN] sfr_dtc_pixel_variance_reci_ch1 * @param dtcPixelVarReciChn2 [IN] sfr_dtc_pixel_variance_reci_ch2 * @param dtcPixelVarReciChn3 [IN] sfr_dtc_pixel_variance_reci_ch3 * @param batchIndex [IN] Batch parameter index - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlCreateAIPP @@ -896,10 +1064,11 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPPixelVarReci(aclmdlAIPP *aippParmsSet, * @brief set aipp parameters to model * * @param modelId [IN] model id - * @param dataset [IN] Pointer of dataSize - * @param index [IN] index of dataBuffer + * @param dataset [IN] Pointer of dataset + * @param index [IN] index of input for aipp data(ACL_DYNAMIC_AIPP_NODE) * @param aippParmsSet [IN] Pointer for aclmdlAIPP - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | @@ -910,21 +1079,176 @@ ACL_FUNC_VISIBILITY aclError aclmdlSetInputAIPP(uint32_t modelId, size_t index, const aclmdlAIPP *aippParmsSet); +/** + * @ingroup AscendCL + * @brief set aipp parameters to model + * + * @param modelId [IN] model id + * @param dataset [IN] Pointer of dataset + * @param index [IN] index of input for data which linked dynamic aipp(ACL_DATA_WITH_DYNAMIC_AIPP) + * @param aippParmsSet [IN] Pointer for aclmdlAIPP + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetAIPPByInputIndex(uint32_t modelId, + aclmdlDataset *dataset, + size_t index, + const aclmdlAIPP *aippParmsSet); + +/** + * @ingroup AscendCL + * @brief get input aipp type + * + * @param modelId [IN] model id + * @param index [IN] index of input + * @param type [OUT] aipp type for input.refrer to aclmdlInputAippType(enum) + * @param dynamicAttachedDataIndex [OUT] index for dynamic attached data(ACL_DYNAMIC_AIPP_NODE) + * valid when type is ACL_DATA_WITH_DYNAMIC_AIPP, invalid value is ACL_INVALID_NODE_INDEX + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | + * aclmdlLoadFromMemWithMem | aclmdlGetInputIndexByName | aclmdlCreateAIPP +*/ +ACL_FUNC_VISIBILITY aclError aclmdlGetAippType(uint32_t modelId, + size_t index, + aclmdlInputAippType *type, + size_t *dynamicAttachedDataIndex); + /** * @ingroup AscendCL * @brief get static aipp parameters from model * * @param modelId [IN] model id * @param index [IN] index of tensor - * @param aippinfo [OUT] Pointer for static aipp info - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param aippInfo [OUT] Pointer for static aipp info + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval ACL_ERROR_MODEL_AIPP_NOT_EXIST The tensor of index is not configured with aipp * @retval OtherValues Failure * * @see aclmdlLoadFromFile | aclmdlLoadFromMem | aclmdlLoadFromFileWithMem | * 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); + +/** + * @ingroup AscendCL + * @brief get op description info + * + * @param deviceId [IN] device id + * @param streamId [IN] stream id + * @param taskId [IN] task id + * @param opName [OUT] pointer to op name + * @param opNameLen [IN] the length of op name + * @param inputDesc [OUT] pointer to input description + * @param numInputs [OUT] the number of input tensor + * @param outputDesc [OUT] pointer to output description + * @param numOutputs [OUT] the number of output tensor + * + * @retval ACL_SUCCESS The function is successfully executed + * @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); + +/** + * @ingroup AscendCL + * @brief init dump + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlInitDump(); + +/** + * @ingroup AscendCL + * @brief set param of dump + * + * @param dumpCfgPath [IN] the path of dump config + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlSetDump(const char *dumpCfgPath); + +/** + * @ingroup AscendCL + * @brief finalize dump. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlFinalizeDump(); + +/** + * @ingroup AscendCL + * @brief load model with config + * + * @param handle [IN] pointer to model config handle + * @param modelId [OUT] pointer to model id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclmdlLoadWithConfig(const aclmdlConfigHandle *handle, uint32_t *modelId); + +/** + * @ingroup AscendCL + * @brief create model config handle of type aclmdlConfigHandle + * + * @retval the aclmdlConfigHandle pointer + * + * @see aclmdlDestroyConfigHandle +*/ +ACL_FUNC_VISIBILITY aclmdlConfigHandle *aclmdlCreateConfigHandle(); + +/** + * @ingroup AscendCL + * @brief destroy data of type aclmdlConfigHandle + * + * @param handle [IN] pointer to model config handle + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclmdlCreateConfigHandle + */ +ACL_FUNC_VISIBILITY aclError aclmdlDestroyConfigHandle(aclmdlConfigHandle *handle); + +/** + * @ingroup AscendCL + * @brief set config for model load + * + * @param handle [OUT] pointer to model config handle + * @param attr [IN] config attr in model config handle to be set + * @param attrValue [IN] pointer to model config value + * @param valueSize [IN] memory size of attrValue + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclmdlSetConfigOpt(aclmdlConfigHandle *handle, aclmdlConfigAttr attr, + const void *attrValue, size_t valueSize); + +/** + * @ingroup AscendCL + * @brief get real tensor name from modelDesc + * + * @param modelDesc [IN] pointer to modelDesc + * @param name [IN] tensor name + * + * @retval the pointer of real tensor name + * @retval Failure return NULL + */ +ACL_FUNC_VISIBILITY const char *aclmdlGetTensorRealName(const aclmdlDesc *modelDesc, const char *name); + #ifdef __cplusplus } #endif diff --git a/dnn/atlas-stub/include/acl/acl_op.h b/dnn/atlas-stub/include/acl/acl_op.h index f2d1fb52e..faa9acbf8 100644 --- a/dnn/atlas-stub/include/acl/acl_op.h +++ b/dnn/atlas-stub/include/acl/acl_op.h @@ -23,7 +23,7 @@ typedef struct aclopKernelDesc aclopKernelDesc; typedef void (*aclDataDeallocator)(void *data, size_t length); -const int ACL_COMPILE_FLAG_BIN_SELECTOR = 1; +static const int ACL_COMPILE_FLAG_BIN_SELECTOR = 1; typedef enum aclEngineType { ACL_ENGINE_SYS, @@ -38,7 +38,8 @@ typedef enum aclEngineType { * @par Restriction * The aclopSetModelDir interface can be called only once in a process. * @param modelDir [IN] path of the directory - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetModelDir(const char *modelDir); @@ -51,10 +52,11 @@ ACL_FUNC_VISIBILITY aclError aclopSetModelDir(const char *modelDir); * The aclopLoad interface can be called more than one times in a process. * @param model [IN] address of single op models * @param modelSize [IN] size of single op models - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ -ACL_FUNC_VISIBILITY aclError aclopLoad(const void *model, size_t modelSize); +ACL_FUNC_VISIBILITY aclError aclopLoad(const void *model, size_t modelSize); /** * @ingroup AscendCL @@ -77,11 +79,12 @@ ACL_FUNC_VISIBILITY void aclopDestroyAttr(const aclopAttr *attr); * @ingroup AscendCL * @brief set an attribute. the type of the attribute is bool * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param attrValue [IN] attribute value * false if attrValue is 0, true otherwise. - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrBool(aclopAttr *attr, const char *attrName, uint8_t attrValue); @@ -90,10 +93,11 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrBool(aclopAttr *attr, const char *attrN * @ingroup AscendCL * @brief set an attribute. the type of the attribute is int64_t * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param attrValue [IN] attribute value - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrInt(aclopAttr *attr, const char *attrName, int64_t attrValue); @@ -102,10 +106,11 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrInt(aclopAttr *attr, const char *attrNa * @ingroup AscendCL * @brief set an attribute. the type of the attribute is float * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param attrValue [IN] attribute value - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrFloat(aclopAttr *attr, const char *attrName, float attrValue); @@ -114,23 +119,53 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrFloat(aclopAttr *attr, const char *attr * @ingroup AscendCL * @brief set an attribute. the type of the attribute is string * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param attrValue [IN] attribute value - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrString(aclopAttr *attr, const char *attrName, const char *attrValue); +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is aclDataType + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param attrValue [IN] attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrDataType(aclopAttr *attr, const char *attrName, aclDataType attrValue); + +/** + * @ingroup AscendCL + * @brief set an attribute. the type of the attribute is list of aclDataType + * + * @param attr [OUT] pointer to the instance of aclopAttr + * @param attrName [IN] attribute name + * @param numValues [IN] number of values. false if attrValue is 0, true otherwise. + * @param values [IN] pointer to values + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopSetAttrListDataType(aclopAttr *attr, const char *attrName, int numValues, + const aclDataType values[]); + /** * @ingroup AscendCL * @brief set an attribute. the type of the attribute is list of bools * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param numValues [IN] number of values. false if attrValue is 0, true otherwise. * @param values [IN] pointer to values - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *attrName, int numValues, @@ -140,11 +175,12 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListBool(aclopAttr *attr, const char *a * @ingroup AscendCL * @brief set an attribute. the type of the attribute is list of ints * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param numValues [IN] number of values * @param values [IN] pointer to values - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *attrName, int numValues, @@ -154,11 +190,12 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListInt(aclopAttr *attr, const char *at * @ingroup AscendCL * @brief set an attribute. the type of the attribute is list of floats * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param numValues [IN] number of values * @param values [IN] pointer to values - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char *attrName, int numValues, @@ -168,11 +205,12 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListFloat(aclopAttr *attr, const char * * @ingroup AscendCL * @brief set an attribute. the type of the attribute is list of strings * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param numValues [IN] number of values * @param values [IN] pointer to values - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char *attrName, int numValues, @@ -182,12 +220,13 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListString(aclopAttr *attr, const char * @ingroup AscendCL * @brief set an attribute. the type of the attribute is list of list of ints * - * @param attr [IN] pointer to the instance of aclopAttr + * @param attr [OUT] pointer to the instance of aclopAttr * @param attrName [IN] attribute name * @param numLists [IN] number of lists * @param numValues [IN] pointer to number of values of each list * @param values [IN] pointer to values - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, @@ -208,6 +247,7 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, * the ACL finds the corresponding task according to the optype, * the description of the input tesnsor, * the description of the output tesnsor, and attr, and issues the execution. + * * @param opType [IN] type of op * @param numInputs [IN] number of inputs * @param inputDesc [IN] pointer to array of input tensor descriptions @@ -218,9 +258,11 @@ ACL_FUNC_VISIBILITY aclError aclopSetAttrListListInt(aclopAttr *attr, * @param attr [IN] pointer to instance of aclopAttr. * may pass nullptr if the op has no attribute * @param stream [IN] stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ +// ACL_DEPRECATED_MESSAGE("aclopExecute is deprecated, use aclopExecuteV2 instead") ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, int numInputs, const aclTensorDesc *const inputDesc[], @@ -231,6 +273,44 @@ ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, const aclopAttr *attr, aclrtStream stream); +/** + * @ingroup AscendCL + * @brief Load and execute the specified operator + * The difference with aclopExecute is that aclopExecuteV2 will refresh outputDesc + * + * @par Restriction + * @li The input and output organization of each operator is different, + * and the application needs to organize the operator strictly + * according to the operator input and output parameters when calling. + * @li When the user calls aclopExecuteV2, + * the ACL finds the corresponding task according to the optype, + * the description of the input tesnsor, + * the description of the output tesnsor, and attr, and issues the execution. + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN|OUT] pointer to array of output tensor descriptions + * @param outputs [OUT] pointer to array of output buffers + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * @param stream [IN] stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @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); + /** * @ingroup AscendCL * @brief create a instance of aclopHandle. @@ -243,7 +323,8 @@ ACL_FUNC_VISIBILITY aclError aclopExecute(const char *opType, * @param opAttr [IN] pointer to instance of aclopAttr. * may pass nullptr if the op has no attribute * @param handle [OUT] pointer to the pointer to the handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopCreateHandle(const char *opType, @@ -275,9 +356,10 @@ ACL_FUNC_VISIBILITY void aclopDestroyHandle(aclopHandle *handle); * The aclCreateDataBuffer interface has been called * in advance to create aclDataBuffer type data. * @param numOutputs [IN] number of outputs - * @param outputs [IN] pointer to array of output buffers + * @param outputs [OUT] pointer to array of output buffers * @param stream [IN] stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclopCreateHandle | aclCreateDataBuffer @@ -299,7 +381,8 @@ ACL_FUNC_VISIBILITY aclError aclopExecWithHandle(aclopHandle *handle, * @param dstBuffer [OUT] destination tensor buffer * @param truncate [IN] do not truncate if value is 0, truncate otherwise * @param stream [IN] stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, @@ -313,11 +396,12 @@ ACL_FUNC_VISIBILITY aclError aclopCast(const aclTensorDesc *srcDesc, * @ingroup AscendCL * @brief create a handle for casting datatype * - * @param srcDesc [IN] source tensor desc - * @param dstDesc [IN] destination tensor desc - * @param truncate [IN] do not truncate if value is 0, truncate otherwise - * @param handle [IN] pointer to the pointer to the handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param srcDesc [IN] source tensor desc + * @param dstDesc [IN] destination tensor desc + * @param truncate [IN] do not truncate if value is 0, truncate otherwise + * @param handle [OUT] pointer to the pointer to the handle + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, @@ -338,7 +422,8 @@ ACL_FUNC_VISIBILITY aclError aclopCreateHandleForCast(aclTensorDesc *srcDesc, * @param enginetype [IN] enigne type * @param deallocator [IN] callback function for deallocating bin data, * null if bin data to be deallocated by caller - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclopCompile @@ -362,7 +447,8 @@ ACL_FUNC_VISIBILITY aclError aclopCreateKernel(const char *opType, * @param outputDesc [IN] pointer to array of output tensor descriptions * @param opAttr [IN] pointer to instance of aclopAttr * @param aclopKernelDesc [IN] pointer to instance of aclopKernelDesc - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ typedef aclError (*aclopCompileFunc)(int numInputs, @@ -378,7 +464,8 @@ typedef aclError (*aclopCompileFunc)(int numInputs, * * @param opType [IN] op type * @param func [IN] compile function - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclopUnregisterCompileFunc @@ -390,7 +477,8 @@ ACL_FUNC_VISIBILITY aclError aclopRegisterCompileFunc(const char *opType, aclopC * @brief unregister compile function * * @param opType [IN] op type - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopUnregisterCompileFunc(const char *opType); @@ -404,7 +492,8 @@ ACL_FUNC_VISIBILITY aclError aclopUnregisterCompileFunc(const char *opType); * @param blockDim [IN] block dim * @param args [IN] args * @param argSize [IN] size in bytes of args - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, @@ -420,24 +509,26 @@ ACL_FUNC_VISIBILITY aclError aclopSetKernelArgs(aclopKernelDesc *kernelDesc, * @param kernelDesc [IN] pointer to instance of aclopKernelDesc * @param numWorkspaces [IN] number of workspaces * @param workspaceSizes [IN] pointer to array of sizes of workspaces - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopSetKernelWorkspaceSizes(aclopKernelDesc *kernelDesc, int numWorkspaces, - size_t *workspaceSizes); + size_t *workspaceSizes); /** * @ingroup AscendCL * @brief compile op with dynamic shape * - * @param opType [IN] op type - * @param numInputs [IN] number of inputs - * @param inputDesc [IN] pointer to array of input tensor descriptions - * @param numOutputs [IN] number of outputs - * @param outputDesc [IN] pointer to array of output tensor descriptions - * @param attr [IN] pointer to instance of aclopAttr. - * may pass nullptr if the op has no attribute - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param opType [IN] op type + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param numOutputs [IN] number of outputs + * @param outputDesc [IN] pointer to array of output tensor descriptions + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, @@ -447,6 +538,31 @@ ACL_FUNC_VISIBILITY aclError aclopUpdateParams(const char *opType, const aclTensorDesc *const outputDesc[], const aclopAttr *attr); +/** + * @ingroup AscendCL + * @brief inferShape the specified operator synchronously + * + * @param opType [IN] type of op + * @param numInputs [IN] number of inputs + * @param inputDesc [IN] pointer to array of input tensor descriptions + * @param inputs [IN] pointer to array of input buffers + * @param numOutputs [IN] number of outputs + * @param outputDesc [OUT] pointer to array of output tensor descriptions + * @param attr [IN] pointer to instance of aclopAttr. + * may pass nullptr if the op has no attribute + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclopInferShape(const char *opType, + int numInputs, + aclTensorDesc *inputDesc[], + aclDataBuffer *inputs[], + int numOutputs, + aclTensorDesc *outputDesc[], + aclopAttr *attr); + + #ifdef __cplusplus } #endif diff --git a/dnn/atlas-stub/include/acl/acl_rt.h b/dnn/atlas-stub/include/acl/acl_rt.h index 33326606d..9379899fe 100644 --- a/dnn/atlas-stub/include/acl/acl_rt.h +++ b/dnn/atlas-stub/include/acl/acl_rt.h @@ -19,6 +19,8 @@ extern "C" { #endif +#define ACL_EVENT_TIME_LINE 0x00000008u + typedef enum aclrtRunMode { ACL_DEVICE, ACL_HOST, @@ -36,6 +38,17 @@ typedef enum aclrtEventStatus { ACL_EVENT_STATUS_RESERVED = 2, } aclrtEventStatus; +typedef enum aclrtEventRecordedStatus { + ACL_EVENT_RECORDED_STATUS_NOT_READY = 0, + ACL_EVENT_RECORDED_STATUS_COMPLETE = 1, +} aclrtEventRecordedStatus; + +typedef enum aclrtEventWaitStatus { + ACL_EVENT_WAIT_STATUS_COMPLETE = 0, + ACL_EVENT_WAIT_STATUS_NOT_READY = 1, + ACL_EVENT_WAIT_STATUS_RESERVED = 0xffff, +} aclrtEventWaitStatus; + typedef enum aclrtCallbackBlockType { ACL_CALLBACK_NO_BLOCK, ACL_CALLBACK_BLOCK, @@ -52,8 +65,35 @@ 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, } aclrtMemMallocPolicy; +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, +} aclrtMemAttr; + +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 +} aclrtGroupAttr; + +typedef struct tagRtGroupInfo aclrtGroupInfo; + typedef struct rtExceptionInfo aclrtExceptionInfo; typedef void (*aclrtCallback)(void *userData); @@ -65,7 +105,8 @@ typedef void (*aclrtExceptionInfoCallback)(aclrtExceptionInfo *exceptionInfo); * @brief Set a callback function to handle exception information * * @param callback [IN] callback function to handle exception information - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSetExceptionInfoCallback(aclrtExceptionInfoCallback callback); @@ -75,6 +116,7 @@ ACL_FUNC_VISIBILITY aclError aclrtSetExceptionInfoCallback(aclrtExceptionInfoCal * @brief Get task id from exception information * * @param info [IN] pointer of exception information + * * @retval The task id from exception information * @retval 0xFFFFFFFF if info is null */ @@ -85,6 +127,7 @@ ACL_FUNC_VISIBILITY uint32_t aclrtGetTaskIdFromExceptionInfo(const aclrtExceptio * @brief Get stream id from exception information * * @param info [IN] pointer of exception information + * * @retval The stream id from exception information * @retval 0xFFFFFFFF if info is null */ @@ -95,18 +138,31 @@ ACL_FUNC_VISIBILITY uint32_t aclrtGetStreamIdFromExceptionInfo(const aclrtExcept * @brief Get thread id from exception information * * @param info [IN] pointer of exception information + * * @retval The thread id of fail task * @retval 0xFFFFFFFF if info is null */ ACL_FUNC_VISIBILITY uint32_t aclrtGetThreadIdFromExceptionInfo(const aclrtExceptionInfo *info); +/** + * @ingroup AscendCL + * @brief Get device id from exception information + * + * @param info [IN] pointer of exception information + * + * @retval The thread id of fail task + * @retval 0xFFFFFFFF if info is null + */ +ACL_FUNC_VISIBILITY uint32_t aclrtGetDeviceIdFromExceptionInfo(const aclrtExceptionInfo *info); + /** * @ingroup AscendCL * @brief The thread that handles the callback function on the Stream * - * @param threadId [IN] thread ID + * @param threadId [IN] thread ID * @param stream [IN] stream handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSubscribeReport(uint64_t threadId, aclrtStream stream); @@ -120,13 +176,14 @@ ACL_FUNC_VISIBILITY aclError aclrtSubscribeReport(uint64_t threadId, aclrtStream * The function prototype of the callback function is: * typedef void (*aclrtCallback)(void *userData); * @param userData [IN] User data to be passed to the callback function - * @param blockType [IN] callback block type - * @param stream [IN] stream handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param blockType [IN] callback block type + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtLaunchCallback(aclrtCallback fn, void *userData, aclrtCallbackBlockType blockType, - aclrtStream stream); + aclrtStream stream); /** * @ingroup AscendCL @@ -135,8 +192,10 @@ ACL_FUNC_VISIBILITY aclError aclrtLaunchCallback(aclrtCallback fn, void *userDat * @par Function * The thread processing callback specified by * the aclrtSubscribeReport interface + * * @param timeout [IN] timeout value - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtSubscribeReport @@ -150,8 +209,9 @@ ACL_FUNC_VISIBILITY aclError aclrtProcessReport(int32_t timeout); * is no longer processed by the specified thread * * @param threadId [IN] thread ID - * @param stream [IN] stream handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param stream [IN] stream handle + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtUnSubscribeReport(uint64_t threadId, aclrtStream stream); @@ -172,9 +232,11 @@ ACL_FUNC_VISIBILITY aclError aclrtUnSubscribeReport(uint64_t threadId, aclrtStre * It is recommended to explicitly specify the context of the current thread * through the aclrtSetCurrentContext interface to increase. * the maintainability of the program. - * @param context [OUT] point to the created context + * + * @param context [OUT] point to the created context * @param deviceId [IN] device to create context on - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtSetDevice | aclrtSetCurrentContext @@ -187,8 +249,10 @@ ACL_FUNC_VISIBILITY aclError aclrtCreateContext(aclrtContext *context, int32_t d * * @par Function * Can only destroy context created through aclrtCreateContext interface + * * @param context [IN] the context to destroy - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtCreateContext @@ -221,8 +285,10 @@ ACL_FUNC_VISIBILITY aclError aclrtDestroyContext(aclrtContext context); * and the context is used in thread B, * the user must guarantee the execution order of tasks in the same stream * under the same context in two threads. + * * @param context [IN] the current context of the thread - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtCreateContext | aclrtDestroyContext @@ -237,8 +303,10 @@ ACL_FUNC_VISIBILITY aclError aclrtSetCurrentContext(aclrtContext context); * If the user calls the aclrtSetCurrentContext interface * multiple times to set the context of the current thread, * then the last set context is obtained + * * @param context [OUT] the current context of the thread - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtSetCurrentContext @@ -263,8 +331,10 @@ ACL_FUNC_VISIBILITY aclError aclrtGetCurrentContext(aclrtContext *context); * create a Context (aclrtCreateContext interface). * @li In multi-device scenarios, you can switch to other devices * through the aclrtSetDevice interface in the process. + * * @param deviceId [IN] the device id - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtResetDevice |aclrtCreateContext @@ -290,8 +360,10 @@ ACL_FUNC_VISIBILITY aclError aclrtSetDevice(int32_t deviceId); * call aclrtDestroyStream interface to release explicitly created Stream-> * call aclrtDestroyContext to release explicitly created Context-> * call aclrtResetDevice interface + * * @param deviceId [IN] the device id - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtResetDevice(int32_t deviceId); @@ -301,7 +373,8 @@ ACL_FUNC_VISIBILITY aclError aclrtResetDevice(int32_t deviceId); * @brief get target device of current thread * * @param deviceId [OUT] the device id - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtGetDevice(int32_t *deviceId); @@ -311,7 +384,8 @@ ACL_FUNC_VISIBILITY aclError aclrtGetDevice(int32_t *deviceId); * @brief get target side * * @param runMode [OUT] the run mode - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtGetRunMode(aclrtRunMode *runMode); @@ -320,7 +394,7 @@ ACL_FUNC_VISIBILITY aclError aclrtGetRunMode(aclrtRunMode *runMode); * @ingroup AscendCL * @brief Wait for compute device to finish * - * @retval ACL_ERROR_NONE The function is successfully executed. + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeDevice(void); @@ -330,7 +404,8 @@ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeDevice(void); * @brief Set Scheduling TS * * @param tsId [IN] the ts id - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSetTsDevice(aclrtTsId tsId); @@ -339,8 +414,9 @@ ACL_FUNC_VISIBILITY aclError aclrtSetTsDevice(aclrtTsId tsId); * @ingroup AscendCL * @brief get total device number. * - * @param count [IN|OUT] the device number - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param count [OUT] the device number + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtGetDeviceCount(uint32_t *count); @@ -350,11 +426,24 @@ ACL_FUNC_VISIBILITY aclError aclrtGetDeviceCount(uint32_t *count); * @brief create event instance * * @param event [OUT] created event - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtCreateEvent(aclrtEvent *event); +/** + * @ingroup AscendCL + * @brief create event instance with flag + * + * @param event [OUT] created event + * @param flag [IN] event flag + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtCreateEventWithFlag(aclrtEvent *event, uint32_t flag); + /** * @ingroup AscendCL * @brief destroy event instance @@ -365,8 +454,10 @@ ACL_FUNC_VISIBILITY aclError aclrtCreateEvent(aclrtEvent *event); * the user must ensure that the tasks involved in the aclrtSynchronizeEvent * interface or the aclrtStreamWaitEvent interface are completed before * they are destroyed. + * * @param event [IN] event to destroy - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtCreateEvent | aclrtSynchronizeEvent | aclrtStreamWaitEvent @@ -377,9 +468,10 @@ ACL_FUNC_VISIBILITY aclError aclrtDestroyEvent(aclrtEvent event); * @ingroup AscendCL * @brief Record an Event in the Stream * - * @param event [IN] event to record + * @param event [IN] event to record * @param stream [IN] stream handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stream); @@ -391,9 +483,11 @@ ACL_FUNC_VISIBILITY aclError aclrtRecordEvent(aclrtEvent event, aclrtStream stre * @par Function * Users need to make sure to wait for the tasks in the Stream * to complete before resetting the Event - * @param event [IN] event to reset + * + * @param event [IN] event to reset * @param stream [IN] stream handle - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtResetEvent(aclrtEvent event, aclrtStream stream); @@ -402,19 +496,46 @@ ACL_FUNC_VISIBILITY aclError aclrtResetEvent(aclrtEvent event, aclrtStream strea * @ingroup AscendCL * @brief Queries an event's status * - * @param event [IN] event to query + * @param event [IN] event to query * @param status [OUT] event status - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ +// ACL_DEPRECATED_MESSAGE("aclrtQueryEvent is deprecated, use aclrtQueryEventStatus instead") ACL_FUNC_VISIBILITY aclError aclrtQueryEvent(aclrtEvent event, aclrtEventStatus *status); +/** + * @ingroup AscendCL + * @brief Queries an event's status + * + * @param event [IN] event to query + * @param status [OUT] event recorded status + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtQueryEventStatus(aclrtEvent event, aclrtEventRecordedStatus *status); + +/** +* @ingroup AscendCL +* @brief Queries an event's wait-status +* +* @param event [IN] event to query +* @param status [OUT] event wait-status +* +* @retval ACL_SUCCESS The function is successfully executed. +* @retval OtherValues Failure +*/ +ACL_FUNC_VISIBILITY aclError aclrtQueryEventWaitStatus(aclrtEvent event, aclrtEventWaitStatus *status); + /** * @ingroup AscendCL * @brief Block Host Running, wait event to be complete * * @param event [IN] event to wait - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeEvent(aclrtEvent event); @@ -423,15 +544,16 @@ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeEvent(aclrtEvent event); * @ingroup AscendCL * @brief computes the elapsed time between events. * - * @param ms [OUT] time between start and end in ms - * @param start [IN] starting event + * @param ms [OUT] time between start and end in ms + * @param start [IN] starting event * @param end [IN] ending event - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtCreateEvent | aclrtRecordEvent | aclrtSynchronizeStream */ -ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent start, aclrtEvent end); +ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent startEvent, aclrtEvent endEvent); /** * @ingroup AscendCL @@ -447,26 +569,79 @@ ACL_FUNC_VISIBILITY aclError aclrtEventElapsedTime(float *ms, aclrtEvent start, * @li Before calling the media data processing interface, * if you need to apply memory on the device to store input or output data, * you need to call acldvppMalloc to apply for memory. - * @param devPtr [IN|OUT] pointer to pointer to allocated memory on device - * @param size [IN] alloc memory size + * + * @param devPtr [OUT] pointer to pointer to allocated memory on device + * @param size [IN] alloc memory size * @param policy [IN] memory alloc policy - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * - * @see aclrtFree | acldvppMalloc + * @see aclrtFree | acldvppMalloc | aclrtMallocCached */ ACL_FUNC_VISIBILITY aclError aclrtMalloc(void **devPtr, size_t size, aclrtMemMallocPolicy policy); +/** + * @ingroup AscendCL + * @brief allocate memory on device with cache + * + * @par Function + * alloc for size linear memory on device + * and return a pointer to allocated memory by *devPtr + * + * @par Restriction + * @li The memory requested by the aclrtMallocCached interface needs to be released + * through the aclrtFree interface. + * + * @param devPtr [OUT] pointer to pointer to allocated memory on device + * @param size [IN] alloc memory size + * @param policy [IN] memory alloc policy + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtFree | aclrtMalloc + */ +ACL_FUNC_VISIBILITY aclError aclrtMallocCached(void **devPtr, + size_t size, + aclrtMemMallocPolicy policy); + +/** + * @ingroup AscendCL + * @brief flush cache data to ddr + * + * @param devPtr [IN] the pointer that flush data to ddr + * @param size [IN] flush size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemFlush(void *devPtr, size_t size); + +/** + * @ingroup AscendCL + * @brief invalidate cache data + * + * @param devPtr [IN] pointer to invalidate cache data + * @param size [IN] invalidate size + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemInvalidate(void *devPtr, size_t size); + /** * @ingroup AscendCL * @brief free device memory * * @par Function * can only free memory allocated through the aclrtMalloc interface + * * @param devPtr [IN] Pointer to memory to be freed - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtMalloc @@ -482,9 +657,11 @@ ACL_FUNC_VISIBILITY aclError aclrtFree(void *devPtr); * and needs to be explicitly copied to the Device. * @li The memory requested by the aclrtMallocHost interface * needs to be released through the aclrtFreeHost interface. - * @param hostPtr [IN|OUT] pointer to pointer to allocated memory on the host - * @param size [IN] alloc memory size - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @param hostPtr [OUT] pointer to pointer to allocated memory on the host + * @param size [IN] alloc memory size + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtFreeHost @@ -497,8 +674,10 @@ ACL_FUNC_VISIBILITY aclError aclrtMallocHost(void **hostPtr, size_t size); * * @par Function * can only free memory allocated through the aclrtMallocHost interface + * * @param hostPtr [IN] free memory pointer - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtMallocHost @@ -509,12 +688,13 @@ ACL_FUNC_VISIBILITY aclError aclrtFreeHost(void *hostPtr); * @ingroup AscendCL * @brief synchronous memory replication between host and device * - * @param dst [IN] destination address pointer + * @param dst [IN] destination address pointer * @param destMax [IN] Max length of the destination address memory - * @param src [IN] source address pointer - * @param count [IN] the length of byte to copy - * @param kind [IN] memcpy type - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param src [IN] source address pointer + * @param count [IN] the length of byte to copy + * @param kind [IN] memcpy type + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, @@ -531,11 +711,13 @@ ACL_FUNC_VISIBILITY aclError aclrtMemcpy(void *dst, * The memory to be initialized is on the Host or device side, * and the system determines whether * it is host or device according to the address + * * @param devPtr [IN] Starting address of memory * @param maxCount [IN] Max length of destination address memory * @param value [IN] Set value * @param count [IN] The length of memory - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t value, size_t count); @@ -552,13 +734,15 @@ ACL_FUNC_VISIBILITY aclError aclrtMemset(void *devPtr, size_t maxCount, int32_t * @par Restriction * @li For on-chip Device-to-Device memory copy, * both the source and destination addresses must be 64-byte aligned + * * @param dst [IN] destination address pointer * @param destMax [IN] Max length of destination address memory * @param src [IN] source address pointer * @param count [IN] the number of byte to copy * @param kind [IN] memcpy type - * @param stream [IN] asynchronized task stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * @param stream [IN] asynchronized task stream + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtSynchronizeStream @@ -570,6 +754,54 @@ ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, aclrtMemcpyKind kind, aclrtStream stream); +/** + * @ingroup AscendCL + * @brief synchronous memory replication of two-dimensional matrix between host and device + * + * @param dst [IN] destination address pointer + * @param dpitch [IN] pitch of destination memory + * @param src [IN] source address pointer + * @param spitch [IN] pitch of source memory + * @param width [IN] width of matrix transfer + * @param height [IN] height of matrix transfer + * @param kind [IN] memcpy type + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpy2d(void *dst, + size_t dpitch, + const void *src, + size_t spitch, + size_t width, + size_t height, + aclrtMemcpyKind kind); + +/** + * @ingroup AscendCL + * @brief asynchronous memory replication of two-dimensional matrix between host and device + * + * @param dst [IN] destination address pointer + * @param dpitch [IN] pitch of destination memory + * @param src [IN] source address pointer + * @param spitch [IN] pitch of source memory + * @param width [IN] width of matrix transfer + * @param height [IN] height of matrix transfer + * @param kind [IN] memcpy type + * @param stream [IN] asynchronized task stream + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtMemcpy2dAsync(void *dst, + size_t dpitch, + const void *src, + size_t spitch, + size_t width, + size_t height, + aclrtMemcpyKind kind, + aclrtStream stream); + /** * @ingroup AscendCL * @brief Asynchronous initialize memory @@ -579,12 +811,14 @@ ACL_FUNC_VISIBILITY aclError aclrtMemcpyAsync(void *dst, * The memory to be initialized is on the Host or device side, * and the system determines whether * 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_ERROR_NONE The function is successfully executed. +* @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 @@ -600,7 +834,8 @@ ACL_FUNC_VISIBILITY aclError aclrtMemsetAsync(void *devPtr, * @brief create stream instance * * @param stream [OUT] the created stream - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtCreateStream(aclrtStream *stream); @@ -616,8 +851,10 @@ ACL_FUNC_VISIBILITY aclError aclrtCreateStream(aclrtStream *stream); * Before calling the aclrtDestroyStream interface to destroy * the specified Stream, you need to call the aclrtSynchronizeStream interface * to ensure that the tasks in the Stream have been completed. + * * @param stream [IN] the stream to destroy - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure * * @see aclrtCreateStream | aclrtSynchronizeStream @@ -630,7 +867,8 @@ ACL_FUNC_VISIBILITY aclError aclrtDestroyStream(aclrtStream stream); * in the specified stream have completed * * @param stream [IN] the stream to wait - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeStream(aclrtStream stream); @@ -643,11 +881,171 @@ ACL_FUNC_VISIBILITY aclError aclrtSynchronizeStream(aclrtStream stream); * * @param stream [IN] the wait stream If using thedefault Stream, set NULL * @param event [IN] the event to wait - * @retval ACL_ERROR_NONE The function is successfully executed. + * + * @retval ACL_SUCCESS The function is successfully executed. * @retval OtherValues Failure */ ACL_FUNC_VISIBILITY aclError aclrtStreamWaitEvent(aclrtStream stream, aclrtEvent event); +/** + * @ingroup AscendCL + * @brief set group + * + * @par Function + * set the task to the corresponding group + * + * @param groupId [IN] group id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount | aclrtGetAllGroupInfo | aclrtGetGroupInfoDetail + */ +ACL_FUNC_VISIBILITY aclError aclrtSetGroup(int32_t groupId); + +/** + * @ingroup AscendCL + * @brief get the number of group + * + * @par Function + * get the number of group. if the number of group is zero, + * it means that group is not supported or group is not created. + * + * @param count [OUT] the number of group + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + */ +ACL_FUNC_VISIBILITY aclError aclrtGetGroupCount(uint32_t *count); + +/** + * @ingroup AscendCL + * @brief create group information + * + * @retval null for failed. + * @retval OtherValues success. + * + * @see aclrtDestroyGroupInfo + */ +ACL_FUNC_VISIBILITY aclrtGroupInfo *aclrtCreateGroupInfo(); + +/** + * @ingroup AscendCL + * @brief destroy group information + * + * @param groupInfo [IN] pointer to group information + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtCreateGroupInfo + */ +ACL_FUNC_VISIBILITY aclError aclrtDestroyGroupInfo(aclrtGroupInfo *groupInfo); + +/** + * @ingroup AscendCL + * @brief get all group information + * + * @param groupInfo [OUT] pointer to group information + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount + */ +ACL_FUNC_VISIBILITY aclError aclrtGetAllGroupInfo(aclrtGroupInfo *groupInfo); + +/** + * @ingroup AscendCL + * @brief get detail information of group + * + * @param groupInfo [IN] pointer to group information + * @param groupIndex [IN] group index value + * @param attr [IN] group attribute + * @param attrValue [OUT] pointer to attribute value + * @param valueLen [IN] length of attribute value + * @param paramRetSize [OUT] pointer to real length of attribute value + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtGetGroupCount | aclrtGetAllGroupInfo + */ +ACL_FUNC_VISIBILITY aclError aclrtGetGroupInfoDetail(const aclrtGroupInfo *groupInfo, + int32_t groupIndex, + aclrtGroupAttr attr, + void *attrValue, + size_t valueLen, + size_t *paramRetSize); + +/** + * @ingroup AscendCL + * @brief checking whether current device and peer device support the p2p feature + * + * @param canAccessPeer [OUT] pointer to save the checking result + * @param deviceId [IN] current device id + * @param peerDeviceId [IN] peer device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceEnablePeerAccess | aclrtDeviceDisablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceCanAccessPeer(int32_t *canAccessPeer, int32_t deviceId, int32_t peerDeviceId); + +/** + * @ingroup AscendCL + * @brief enable the peer device to support the p2p feature + * + * @param peerDeviceId [IN] the peer device id + * @param flags [IN] reserved field, now it must be zero + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceCanAccessPeer | aclrtDeviceDisablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceEnablePeerAccess(int32_t peerDeviceId, uint32_t flags); + +/** + * @ingroup AscendCL + * @brief disable the peer device to support the p2p function + * + * @param peerDeviceId [IN] the peer device id + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + * + * @see aclrtDeviceCanAccessPeer | aclrtDeviceEnablePeerAccess + */ +ACL_FUNC_VISIBILITY aclError aclrtDeviceDisablePeerAccess(int32_t peerDeviceId); + +/** + * @ingroup AscendCL + * @brief Obtain the free memory and total memory of specified attribute. + * the specified memory include normal memory and huge memory. + * + * @param attr [IN] the memory attribute of specified device + * @param free [OUT] the free memory of specified device + * @param total [OUT] the total memory of specified device. + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtGetMemInfo(aclrtMemAttr attr, size_t *free, size_t *total); + +/** + * @ingroup AscendCL + * @brief Set the timeout interval for waitting of op + * + * @param timeout [IN] op wait timeout + * + * @retval ACL_SUCCESS The function is successfully executed. + * @retval OtherValues Failure + */ +ACL_FUNC_VISIBILITY aclError aclrtSetOpWaitTimeout(uint32_t timeout); + #ifdef __cplusplus } #endif diff --git a/dnn/atlas-stub/include/acl/error_codes/ge_error_codes.h b/dnn/atlas-stub/include/acl/error_codes/ge_error_codes.h new file mode 100644 index 000000000..c11d6dd31 --- /dev/null +++ b/dnn/atlas-stub/include/acl/error_codes/ge_error_codes.h @@ -0,0 +1,76 @@ +/** + * Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef INC_EXTERNAL_GE_GE_ERROR_CODES_H_ +#define INC_EXTERNAL_GE_GE_ERROR_CODES_H_ + +#if defined(_MSC_VER) +#ifdef FUNC_VISIBILITY +#define GE_FUNC_VISIBILITY _declspec(dllexport) +#else +#define GE_FUNC_VISIBILITY +#endif +#else +#ifdef FUNC_VISIBILITY +#define GE_FUNC_VISIBILITY __attribute__((visibility("default"))) +#else +#define GE_FUNC_VISIBILITY +#endif +#endif + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif +static const uint32_t ACL_ERROR_GE_PARAM_INVALID = 145000U; +static const uint32_t ACL_ERROR_GE_EXEC_NOT_INIT = 145001U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID = 145002U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_ID_INVALID = 145003U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID = 145006U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_ADDR_INVALID = 145007U; +static const uint32_t ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID = 145008U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED = 145009U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_INPUT_ADDR_INVALID = 145011U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_INPUT_LENGTH_INVALID = 145012U; +static const uint32_t ACL_ERROR_GE_DYNAMIC_BATCH_SIZE_INVALID = 145013U; +static const uint32_t ACL_ERROR_GE_AIPP_BATCH_EMPTY = 145014U; +static const uint32_t ACL_ERROR_GE_AIPP_NOT_EXIST = 145015U; +static const uint32_t ACL_ERROR_GE_AIPP_MODE_INVALID = 145016U; +static const uint32_t ACL_ERROR_GE_OP_TASK_TYPE_INVALID = 145017U; +static const uint32_t ACL_ERROR_GE_OP_KERNEL_TYPE_INVALID = 145018U; +static const uint32_t ACL_ERROR_GE_PLGMGR_PATH_INVALID = 145019U; +static const uint32_t ACL_ERROR_GE_FORMAT_INVALID = 145020U; +static const uint32_t ACL_ERROR_GE_SHAPE_INVALID = 145021U; +static const uint32_t ACL_ERROR_GE_DATATYPE_INVALID = 145022U; +static const uint32_t ACL_ERROR_GE_MEMORY_ALLOCATION = 245000U; +static const uint32_t ACL_ERROR_GE_MEMORY_OPERATE_FAILED = 245001U; +static const uint32_t ACL_ERROR_GE_INTERNAL_ERROR = 545000U; +static const uint32_t ACL_ERROR_GE_LOAD_MODEL = 545001U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_MODEL_PARTITION_FAILED = 545002U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_WEIGHT_PARTITION_FAILED = 545003U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_TASK_PARTITION_FAILED = 545004U; +static const uint32_t ACL_ERROR_GE_EXEC_LOAD_KERNEL_PARTITION_FAILED = 545005U; +static const uint32_t ACL_ERROR_GE_EXEC_RELEASE_MODEL_DATA = 545006U; +static const uint32_t ACL_ERROR_GE_COMMAND_HANDLE = 545007U; +static const uint32_t ACL_ERROR_GE_GET_TENSOR_INFO = 545008U; +static const uint32_t ACL_ERROR_GE_UNLOAD_MODEL = 545009U; + +#ifdef __cplusplus +} // namespace ge +#endif +#endif // INC_EXTERNAL_GE_GE_ERROR_CODES_H_ diff --git a/dnn/atlas-stub/include/acl/error_codes/rt_error_codes.h b/dnn/atlas-stub/include/acl/error_codes/rt_error_codes.h new file mode 100644 index 000000000..4945822cc --- /dev/null +++ b/dnn/atlas-stub/include/acl/error_codes/rt_error_codes.h @@ -0,0 +1,112 @@ +/** +* @file rt_error_codes.h +* +* Copyright (C) Huawei Technologies Co., Ltd. 2019-2020. All Rights Reserved. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#ifndef __INC_EXTERNEL_RT_ERROR_CODES_H__ +#define __INC_EXTERNEL_RT_ERROR_CODES_H__ + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +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_WAIT_TIMEOUT = 107019; // wait timeout +static const int32_t ACL_ERROR_RT_TASK_TIMEOUT = 107020; // task timeout + +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_NO_CDQ_RESOURCE = 207011; // no cdq resource +static const int32_t ACL_ERROR_RT_OVER_LIMIT = 207012; // over limit +static const int32_t ACL_ERROR_RT_QUEUE_EMPTY = 207013; // queue is empty +static const int32_t ACL_ERROR_RT_QUEUE_FULL = 207014; // queue is full +static const int32_t ACL_ERROR_RT_REPEATED_INIT = 207015; // repeated init +static const int32_t ACL_ERROR_RT_AIVEC_OVER_FLOW = 207016; // aivec over flow + +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_VECTOR_CORE_TIMEOUT = 507034; // vector core timeout +static const int32_t ACL_ERROR_RT_VECTOR_CORE_EXCEPTION = 507035; // vector core exception +static const int32_t ACL_ERROR_RT_VECTOR_CORE_TRAP_EXCEPTION = 507036; // vector core trap exception +static const int32_t ACL_ERROR_RT_CDQ_BATCH_ABNORMAL = 507037; // cdq alloc batch abnormal +static const int32_t ACL_ERROR_RT_DIE_MODE_CHANGE_ERROR = 507038; // can not change die mode +static const int32_t ACL_ERROR_RT_DIE_SET_ERROR = 507039; // single die mode can not set die +static const int32_t ACL_ERROR_RT_INVALID_DIEID = 507040; // invalid die id +static const int32_t ACL_ERROR_RT_DIE_MODE_NOT_SET = 507041; // die mode not set + +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_SOCKET_CLOSE = 507901; // hdc disconnect + +#ifdef __cplusplus +} +#endif +#endif // __INC_EXTERNEL_RT_ERROR_CODES_H__ diff --git a/dnn/atlas-stub/src/libatlas-wrap.cpp b/dnn/atlas-stub/src/libatlas-wrap.cpp index f566229e8..f483c5800 100644 --- a/dnn/atlas-stub/src/libatlas-wrap.cpp +++ b/dnn/atlas-stub/src/libatlas-wrap.cpp @@ -118,9 +118,25 @@ aclmdlAIPP* on_init_failed(int func_idx) { log_failed_load(func_idx); return nullptr; } +template <> +aclmdlConfigHandle* on_init_failed(int func_idx) { + log_failed_load(func_idx); + return nullptr; +} +template <> +tagRtGroupInfo* on_init_failed(int func_idx) { + log_failed_load(func_idx); + return nullptr; +} } // namespace +//! atlas310 +#if !defined(ACL_MAJOR_VERSION) #include "./libatlas-wrap.h" +//! atlas710 +#elif (ACL_MAJOR_VERSION == 1 && ACL_MINOR_VERSION == 1 && ACL_PATCH_VERSION == 0) +#include "./libatlas-wrap_1.1.0.h" +#endif static const char* default_so_paths[] = { "/usr/local/Ascend/acllib/lib64/libascendcl.so", @@ -153,8 +169,5 @@ static void* resolve_library_func(void* handle, const char* func) { return nullptr; } auto ret = dlsym(handle, func); - if (!ret) { - LOGE("failed to load atlas func: %s", func); - } return ret; } diff --git a/dnn/atlas-stub/src/libatlas-wrap_1.1.0.h b/dnn/atlas-stub/src/libatlas-wrap_1.1.0.h new file mode 100644 index 000000000..a1d8a6f98 --- /dev/null +++ b/dnn/atlas-stub/src/libatlas-wrap_1.1.0.h @@ -0,0 +1,3214 @@ +// generated by wraplib.py +// --- begin functions to be implemented +#ifndef _WRAPLIB_API_CALL +#define _WRAPLIB_API_CALL +#endif +#ifndef _WRAPLIB_CALLBACK +#define _WRAPLIB_CALLBACK +#endif +#ifndef ON_ENTRY +#define ON_ENTRY(x) +#endif +static void* get_library_handle(); +static void* resolve_library_func(void* , const char*); +namespace { +template T on_init_failed(int func_idx); +} +// --- end functions to be implemented +#include +#include +static void load_library(); +static float _WRAPLIB_API_CALL aclFloat16ToFloat_init(aclFloat16 arg0) { + load_library(); + return aclFloat16ToFloat(arg0); +} +static float _WRAPLIB_API_CALL aclFloat16ToFloat_error(aclFloat16) { + return on_init_failed(0); +} +static aclFloat16 _WRAPLIB_API_CALL aclFloatToFloat16_init(float arg0) { + load_library(); + return aclFloatToFloat16(arg0); +} +static aclFloat16 _WRAPLIB_API_CALL aclFloatToFloat16_error(float) { + return on_init_failed(1); +} +static aclDataBuffer _WRAPLIB_API_CALL *aclCreateDataBuffer_init(void *arg0, size_t arg1) { + load_library(); + return aclCreateDataBuffer(arg0, arg1); +} +static aclDataBuffer _WRAPLIB_API_CALL *aclCreateDataBuffer_error(void *, size_t) { + return on_init_failed(2); +} +static aclError _WRAPLIB_API_CALL aclDestroyDataBuffer_init(const aclDataBuffer *arg0) { + load_library(); + return aclDestroyDataBuffer(arg0); +} +static aclError _WRAPLIB_API_CALL aclDestroyDataBuffer_error(const aclDataBuffer *) { + return on_init_failed(3); +} +static aclError _WRAPLIB_API_CALL aclUpdateDataBuffer_init(aclDataBuffer *arg0, void *arg1, size_t arg2) { + load_library(); + return aclUpdateDataBuffer(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclUpdateDataBuffer_error(aclDataBuffer *, void *, size_t) { + return on_init_failed(4); +} +static void _WRAPLIB_API_CALL *aclGetDataBufferAddr_init(const aclDataBuffer *arg0) { + load_library(); + return aclGetDataBufferAddr(arg0); +} +static void _WRAPLIB_API_CALL *aclGetDataBufferAddr_error(const aclDataBuffer *) { + return on_init_failed(5); +} +static uint32_t _WRAPLIB_API_CALL aclGetDataBufferSize_init(const aclDataBuffer *arg0) { + load_library(); + return aclGetDataBufferSize(arg0); +} +static uint32_t _WRAPLIB_API_CALL aclGetDataBufferSize_error(const aclDataBuffer *) { + return on_init_failed(6); +} +static size_t _WRAPLIB_API_CALL aclGetDataBufferSizeV2_init(const aclDataBuffer *arg0) { + load_library(); + return aclGetDataBufferSizeV2(arg0); +} +static size_t _WRAPLIB_API_CALL aclGetDataBufferSizeV2_error(const aclDataBuffer *) { + return on_init_failed(7); +} +static size_t _WRAPLIB_API_CALL aclDataTypeSize_init(aclDataType arg0) { + load_library(); + return aclDataTypeSize(arg0); +} +static size_t _WRAPLIB_API_CALL aclDataTypeSize_error(aclDataType) { + return on_init_failed(8); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclCreateTensorDesc_init(aclDataType arg0, int arg1, const int64_t *arg2, aclFormat arg3) { + load_library(); + return aclCreateTensorDesc(arg0, arg1, arg2, arg3); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclCreateTensorDesc_error(aclDataType, int, const int64_t *, aclFormat) { + return on_init_failed(9); +} +static void _WRAPLIB_API_CALL aclDestroyTensorDesc_init(const aclTensorDesc *arg0) { + load_library(); + return aclDestroyTensorDesc(arg0); +} +static void _WRAPLIB_API_CALL aclDestroyTensorDesc_error(const aclTensorDesc *) { + return on_init_failed(10); +} +static aclError _WRAPLIB_API_CALL aclSetTensorShapeRange_init(aclTensorDesc *arg0, size_t arg1, int64_t arg2[][2]) { + load_library(); + return aclSetTensorShapeRange(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorShapeRange_error(aclTensorDesc *, size_t, int64_t [][2]) { + return on_init_failed(11); +} +static aclError _WRAPLIB_API_CALL aclSetTensorValueRange_init(aclTensorDesc *arg0, size_t arg1, int64_t arg2[][2]) { + load_library(); + return aclSetTensorValueRange(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorValueRange_error(aclTensorDesc *, size_t, int64_t [][2]) { + return on_init_failed(12); +} +static aclDataType _WRAPLIB_API_CALL aclGetTensorDescType_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescType(arg0); +} +static aclDataType _WRAPLIB_API_CALL aclGetTensorDescType_error(const aclTensorDesc *) { + return on_init_failed(13); +} +static aclFormat _WRAPLIB_API_CALL aclGetTensorDescFormat_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescFormat(arg0); +} +static aclFormat _WRAPLIB_API_CALL aclGetTensorDescFormat_error(const aclTensorDesc *) { + return on_init_failed(14); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescSize_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescSize(arg0); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescSize_error(const aclTensorDesc *) { + return on_init_failed(15); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescElementCount_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescElementCount(arg0); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescElementCount_error(const aclTensorDesc *) { + return on_init_failed(16); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescNumDims_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescNumDims(arg0); +} +static size_t _WRAPLIB_API_CALL aclGetTensorDescNumDims_error(const aclTensorDesc *) { + return on_init_failed(17); +} +static int64_t _WRAPLIB_API_CALL aclGetTensorDescDim_init(const aclTensorDesc *arg0, size_t arg1) { + load_library(); + return aclGetTensorDescDim(arg0, arg1); +} +static int64_t _WRAPLIB_API_CALL aclGetTensorDescDim_error(const aclTensorDesc *, size_t) { + return on_init_failed(18); +} +static aclError _WRAPLIB_API_CALL aclGetTensorDescDimV2_init(const aclTensorDesc *arg0, size_t arg1, int64_t *arg2) { + load_library(); + return aclGetTensorDescDimV2(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclGetTensorDescDimV2_error(const aclTensorDesc *, size_t, int64_t *) { + return on_init_failed(19); +} +static aclError _WRAPLIB_API_CALL aclGetTensorDescDimRange_init(const aclTensorDesc *arg0, size_t arg1, size_t arg2, int64_t *arg3) { + load_library(); + return aclGetTensorDescDimRange(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclGetTensorDescDimRange_error(const aclTensorDesc *, size_t, size_t, int64_t *) { + return on_init_failed(20); +} +static void _WRAPLIB_API_CALL aclSetTensorDescName_init(aclTensorDesc *arg0, const char *arg1) { + load_library(); + return aclSetTensorDescName(arg0, arg1); +} +static void _WRAPLIB_API_CALL aclSetTensorDescName_error(aclTensorDesc *, const char *) { + return on_init_failed(21); +} +static const char _WRAPLIB_API_CALL *aclGetTensorDescName_init(aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescName(arg0); +} +static const char _WRAPLIB_API_CALL *aclGetTensorDescName_error(aclTensorDesc *) { + return on_init_failed(22); +} +static aclError _WRAPLIB_API_CALL aclTransTensorDescFormat_init(const aclTensorDesc *arg0, aclFormat arg1, aclTensorDesc **arg2) { + load_library(); + return aclTransTensorDescFormat(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclTransTensorDescFormat_error(const aclTensorDesc *, aclFormat, aclTensorDesc **) { + return on_init_failed(23); +} +static aclError _WRAPLIB_API_CALL aclSetTensorStorageFormat_init(aclTensorDesc *arg0, aclFormat arg1) { + load_library(); + return aclSetTensorStorageFormat(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclSetTensorStorageFormat_error(aclTensorDesc *, aclFormat) { + return on_init_failed(24); +} +static aclError _WRAPLIB_API_CALL aclSetTensorStorageShape_init(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + load_library(); + return aclSetTensorStorageShape(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorStorageShape_error(aclTensorDesc *, int, const int64_t *) { + return on_init_failed(25); +} +static aclError _WRAPLIB_API_CALL aclSetTensorFormat_init(aclTensorDesc *arg0, aclFormat arg1) { + load_library(); + return aclSetTensorFormat(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclSetTensorFormat_error(aclTensorDesc *, aclFormat) { + return on_init_failed(26); +} +static aclError _WRAPLIB_API_CALL aclSetTensorShape_init(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + load_library(); + return aclSetTensorShape(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorShape_error(aclTensorDesc *, int, const int64_t *) { + return on_init_failed(27); +} +static aclError _WRAPLIB_API_CALL aclSetTensorOriginFormat_init(aclTensorDesc *arg0, aclFormat arg1) { + load_library(); + return aclSetTensorOriginFormat(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclSetTensorOriginFormat_error(aclTensorDesc *, aclFormat) { + return on_init_failed(28); +} +static aclError _WRAPLIB_API_CALL aclSetTensorOriginShape_init(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + load_library(); + return aclSetTensorOriginShape(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorOriginShape_error(aclTensorDesc *, int, const int64_t *) { + return on_init_failed(29); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclGetTensorDescByIndex_init(aclTensorDesc *arg0, size_t arg1) { + load_library(); + return aclGetTensorDescByIndex(arg0, arg1); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclGetTensorDescByIndex_error(aclTensorDesc *, size_t) { + return on_init_failed(30); +} +static void _WRAPLIB_API_CALL *aclGetTensorDescAddress_init(const aclTensorDesc *arg0) { + load_library(); + return aclGetTensorDescAddress(arg0); +} +static void _WRAPLIB_API_CALL *aclGetTensorDescAddress_error(const aclTensorDesc *) { + return on_init_failed(31); +} +static aclError _WRAPLIB_API_CALL aclSetTensorDynamicInput_init(aclTensorDesc *arg0, const char *arg1) { + load_library(); + return aclSetTensorDynamicInput(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclSetTensorDynamicInput_error(aclTensorDesc *, const char *) { + return on_init_failed(32); +} +static aclError _WRAPLIB_API_CALL aclSetTensorConst_init(aclTensorDesc *arg0, void *arg1, size_t arg2) { + load_library(); + return aclSetTensorConst(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclSetTensorConst_error(aclTensorDesc *, void *, size_t) { + return on_init_failed(33); +} +static aclError _WRAPLIB_API_CALL aclSetTensorPlaceMent_init(aclTensorDesc *arg0, aclMemType arg1) { + load_library(); + return aclSetTensorPlaceMent(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclSetTensorPlaceMent_error(aclTensorDesc *, aclMemType) { + return on_init_failed(34); +} +static const char _WRAPLIB_API_CALL *aclrtGetSocName_init() { + load_library(); + return aclrtGetSocName(); +} +static const char _WRAPLIB_API_CALL *aclrtGetSocName_error() { + return on_init_failed(35); +} +static aclError _WRAPLIB_API_CALL aclrtSetExceptionInfoCallback_init(aclrtExceptionInfoCallback arg0) { + load_library(); + return aclrtSetExceptionInfoCallback(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetExceptionInfoCallback_error(aclrtExceptionInfoCallback) { + return on_init_failed(36); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetTaskIdFromExceptionInfo_init(const aclrtExceptionInfo *arg0) { + load_library(); + return aclrtGetTaskIdFromExceptionInfo(arg0); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetTaskIdFromExceptionInfo_error(const aclrtExceptionInfo *) { + return on_init_failed(37); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetStreamIdFromExceptionInfo_init(const aclrtExceptionInfo *arg0) { + load_library(); + return aclrtGetStreamIdFromExceptionInfo(arg0); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetStreamIdFromExceptionInfo_error(const aclrtExceptionInfo *) { + return on_init_failed(38); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetThreadIdFromExceptionInfo_init(const aclrtExceptionInfo *arg0) { + load_library(); + return aclrtGetThreadIdFromExceptionInfo(arg0); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetThreadIdFromExceptionInfo_error(const aclrtExceptionInfo *) { + return on_init_failed(39); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetDeviceIdFromExceptionInfo_init(const aclrtExceptionInfo *arg0) { + load_library(); + return aclrtGetDeviceIdFromExceptionInfo(arg0); +} +static uint32_t _WRAPLIB_API_CALL aclrtGetDeviceIdFromExceptionInfo_error(const aclrtExceptionInfo *) { + return on_init_failed(40); +} +static aclError _WRAPLIB_API_CALL aclrtSubscribeReport_init(uint64_t arg0, aclrtStream arg1) { + load_library(); + return aclrtSubscribeReport(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtSubscribeReport_error(uint64_t, aclrtStream) { + return on_init_failed(41); +} +static aclError _WRAPLIB_API_CALL aclrtLaunchCallback_init(aclrtCallback arg0, void *arg1, aclrtCallbackBlockType arg2, aclrtStream arg3) { + load_library(); + return aclrtLaunchCallback(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclrtLaunchCallback_error(aclrtCallback, void *, aclrtCallbackBlockType, aclrtStream) { + return on_init_failed(42); +} +static aclError _WRAPLIB_API_CALL aclrtProcessReport_init(int32_t arg0) { + load_library(); + return aclrtProcessReport(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtProcessReport_error(int32_t) { + return on_init_failed(43); +} +static aclError _WRAPLIB_API_CALL aclrtUnSubscribeReport_init(uint64_t arg0, aclrtStream arg1) { + load_library(); + return aclrtUnSubscribeReport(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtUnSubscribeReport_error(uint64_t, aclrtStream) { + return on_init_failed(44); +} +static aclError _WRAPLIB_API_CALL aclrtCreateContext_init(aclrtContext *arg0, int32_t arg1) { + load_library(); + return aclrtCreateContext(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtCreateContext_error(aclrtContext *, int32_t) { + return on_init_failed(45); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyContext_init(aclrtContext arg0) { + load_library(); + return aclrtDestroyContext(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyContext_error(aclrtContext) { + return on_init_failed(46); +} +static aclError _WRAPLIB_API_CALL aclrtSetCurrentContext_init(aclrtContext arg0) { + load_library(); + return aclrtSetCurrentContext(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetCurrentContext_error(aclrtContext) { + return on_init_failed(47); +} +static aclError _WRAPLIB_API_CALL aclrtGetCurrentContext_init(aclrtContext *arg0) { + load_library(); + return aclrtGetCurrentContext(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetCurrentContext_error(aclrtContext *) { + return on_init_failed(48); +} +static aclError _WRAPLIB_API_CALL aclrtSetDevice_init(int32_t arg0) { + load_library(); + return aclrtSetDevice(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetDevice_error(int32_t) { + return on_init_failed(49); +} +static aclError _WRAPLIB_API_CALL aclrtResetDevice_init(int32_t arg0) { + load_library(); + return aclrtResetDevice(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtResetDevice_error(int32_t) { + return on_init_failed(50); +} +static aclError _WRAPLIB_API_CALL aclrtGetDevice_init(int32_t *arg0) { + load_library(); + return aclrtGetDevice(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetDevice_error(int32_t *) { + return on_init_failed(51); +} +static aclError _WRAPLIB_API_CALL aclrtGetRunMode_init(aclrtRunMode *arg0) { + load_library(); + return aclrtGetRunMode(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetRunMode_error(aclrtRunMode *) { + return on_init_failed(52); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeDevice_init() { + load_library(); + return aclrtSynchronizeDevice(); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeDevice_error() { + return on_init_failed(53); +} +static aclError _WRAPLIB_API_CALL aclrtSetTsDevice_init(aclrtTsId arg0) { + load_library(); + return aclrtSetTsDevice(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetTsDevice_error(aclrtTsId) { + return on_init_failed(54); +} +static aclError _WRAPLIB_API_CALL aclrtGetDeviceCount_init(uint32_t *arg0) { + load_library(); + return aclrtGetDeviceCount(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetDeviceCount_error(uint32_t *) { + return on_init_failed(55); +} +static aclError _WRAPLIB_API_CALL aclrtCreateEvent_init(aclrtEvent *arg0) { + load_library(); + return aclrtCreateEvent(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtCreateEvent_error(aclrtEvent *) { + return on_init_failed(56); +} +static aclError _WRAPLIB_API_CALL aclrtCreateEventWithFlag_init(aclrtEvent *arg0, uint32_t arg1) { + load_library(); + return aclrtCreateEventWithFlag(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtCreateEventWithFlag_error(aclrtEvent *, uint32_t) { + return on_init_failed(57); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyEvent_init(aclrtEvent arg0) { + load_library(); + return aclrtDestroyEvent(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyEvent_error(aclrtEvent) { + return on_init_failed(58); +} +static aclError _WRAPLIB_API_CALL aclrtRecordEvent_init(aclrtEvent arg0, aclrtStream arg1) { + load_library(); + return aclrtRecordEvent(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtRecordEvent_error(aclrtEvent, aclrtStream) { + return on_init_failed(59); +} +static aclError _WRAPLIB_API_CALL aclrtResetEvent_init(aclrtEvent arg0, aclrtStream arg1) { + load_library(); + return aclrtResetEvent(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtResetEvent_error(aclrtEvent, aclrtStream) { + return on_init_failed(60); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEvent_init(aclrtEvent arg0, aclrtEventStatus *arg1) { + load_library(); + return aclrtQueryEvent(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEvent_error(aclrtEvent, aclrtEventStatus *) { + return on_init_failed(61); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEventStatus_init(aclrtEvent arg0, aclrtEventRecordedStatus *arg1) { + load_library(); + return aclrtQueryEventStatus(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEventStatus_error(aclrtEvent, aclrtEventRecordedStatus *) { + return on_init_failed(62); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEventWaitStatus_init(aclrtEvent arg0, aclrtEventWaitStatus *arg1) { + load_library(); + return aclrtQueryEventWaitStatus(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtQueryEventWaitStatus_error(aclrtEvent, aclrtEventWaitStatus *) { + return on_init_failed(63); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeEvent_init(aclrtEvent arg0) { + load_library(); + return aclrtSynchronizeEvent(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeEvent_error(aclrtEvent) { + return on_init_failed(64); +} +static aclError _WRAPLIB_API_CALL aclrtEventElapsedTime_init(float *arg0, aclrtEvent arg1, aclrtEvent arg2) { + load_library(); + return aclrtEventElapsedTime(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtEventElapsedTime_error(float *, aclrtEvent, aclrtEvent) { + return on_init_failed(65); +} +static aclError _WRAPLIB_API_CALL aclrtMalloc_init(void **arg0, size_t arg1, aclrtMemMallocPolicy arg2) { + load_library(); + return aclrtMalloc(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtMalloc_error(void **, size_t, aclrtMemMallocPolicy) { + return on_init_failed(66); +} +static aclError _WRAPLIB_API_CALL aclrtMallocCached_init(void **arg0, size_t arg1, aclrtMemMallocPolicy arg2) { + load_library(); + return aclrtMallocCached(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtMallocCached_error(void **, size_t, aclrtMemMallocPolicy) { + return on_init_failed(67); +} +static aclError _WRAPLIB_API_CALL aclrtMemFlush_init(void *arg0, size_t arg1) { + load_library(); + return aclrtMemFlush(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtMemFlush_error(void *, size_t) { + return on_init_failed(68); +} +static aclError _WRAPLIB_API_CALL aclrtMemInvalidate_init(void *arg0, size_t arg1) { + load_library(); + return aclrtMemInvalidate(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtMemInvalidate_error(void *, size_t) { + return on_init_failed(69); +} +static aclError _WRAPLIB_API_CALL aclrtFree_init(void *arg0) { + load_library(); + return aclrtFree(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtFree_error(void *) { + return on_init_failed(70); +} +static aclError _WRAPLIB_API_CALL aclrtMallocHost_init(void **arg0, size_t arg1) { + load_library(); + return aclrtMallocHost(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtMallocHost_error(void **, size_t) { + return on_init_failed(71); +} +static aclError _WRAPLIB_API_CALL aclrtFreeHost_init(void *arg0) { + load_library(); + return aclrtFreeHost(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtFreeHost_error(void *) { + return on_init_failed(72); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy_init(void *arg0, size_t arg1, const void *arg2, size_t arg3, aclrtMemcpyKind arg4) { + load_library(); + return aclrtMemcpy(arg0, arg1, arg2, arg3, arg4); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy_error(void *, size_t, const void *, size_t, aclrtMemcpyKind) { + return on_init_failed(73); +} +static aclError _WRAPLIB_API_CALL aclrtMemset_init(void *arg0, size_t arg1, int32_t arg2, size_t arg3) { + load_library(); + return aclrtMemset(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclrtMemset_error(void *, size_t, int32_t, size_t) { + return on_init_failed(74); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpyAsync_init(void *arg0, size_t arg1, const void *arg2, size_t arg3, aclrtMemcpyKind arg4, aclrtStream arg5) { + load_library(); + return aclrtMemcpyAsync(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpyAsync_error(void *, size_t, const void *, size_t, aclrtMemcpyKind, aclrtStream) { + return on_init_failed(75); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy2d_init(void *arg0, size_t arg1, const void *arg2, size_t arg3, size_t arg4, size_t arg5, aclrtMemcpyKind arg6) { + load_library(); + return aclrtMemcpy2d(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy2d_error(void *, size_t, const void *, size_t, size_t, size_t, aclrtMemcpyKind) { + return on_init_failed(76); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy2dAsync_init(void *arg0, size_t arg1, const void *arg2, size_t arg3, size_t arg4, size_t arg5, aclrtMemcpyKind arg6, aclrtStream arg7) { + load_library(); + return aclrtMemcpy2dAsync(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +} +static aclError _WRAPLIB_API_CALL aclrtMemcpy2dAsync_error(void *, size_t, const void *, size_t, size_t, size_t, aclrtMemcpyKind, aclrtStream) { + return on_init_failed(77); +} +static aclError _WRAPLIB_API_CALL aclrtMemsetAsync_init(void *arg0, size_t arg1, int32_t arg2, size_t arg3, aclrtStream arg4) { + load_library(); + return aclrtMemsetAsync(arg0, arg1, arg2, arg3, arg4); +} +static aclError _WRAPLIB_API_CALL aclrtMemsetAsync_error(void *, size_t, int32_t, size_t, aclrtStream) { + return on_init_failed(78); +} +static aclError _WRAPLIB_API_CALL aclrtCreateStream_init(aclrtStream *arg0) { + load_library(); + return aclrtCreateStream(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtCreateStream_error(aclrtStream *) { + return on_init_failed(79); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyStream_init(aclrtStream arg0) { + load_library(); + return aclrtDestroyStream(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyStream_error(aclrtStream) { + return on_init_failed(80); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeStream_init(aclrtStream arg0) { + load_library(); + return aclrtSynchronizeStream(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSynchronizeStream_error(aclrtStream) { + return on_init_failed(81); +} +static aclError _WRAPLIB_API_CALL aclrtStreamWaitEvent_init(aclrtStream arg0, aclrtEvent arg1) { + load_library(); + return aclrtStreamWaitEvent(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtStreamWaitEvent_error(aclrtStream, aclrtEvent) { + return on_init_failed(82); +} +static aclError _WRAPLIB_API_CALL aclrtSetGroup_init(int32_t arg0) { + load_library(); + return aclrtSetGroup(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetGroup_error(int32_t) { + return on_init_failed(83); +} +static aclError _WRAPLIB_API_CALL aclrtGetGroupCount_init(uint32_t *arg0) { + load_library(); + return aclrtGetGroupCount(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetGroupCount_error(uint32_t *) { + return on_init_failed(84); +} +static aclrtGroupInfo _WRAPLIB_API_CALL *aclrtCreateGroupInfo_init() { + load_library(); + return aclrtCreateGroupInfo(); +} +static aclrtGroupInfo _WRAPLIB_API_CALL *aclrtCreateGroupInfo_error() { + return on_init_failed(85); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyGroupInfo_init(aclrtGroupInfo *arg0) { + load_library(); + return aclrtDestroyGroupInfo(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtDestroyGroupInfo_error(aclrtGroupInfo *) { + return on_init_failed(86); +} +static aclError _WRAPLIB_API_CALL aclrtGetAllGroupInfo_init(aclrtGroupInfo *arg0) { + load_library(); + return aclrtGetAllGroupInfo(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtGetAllGroupInfo_error(aclrtGroupInfo *) { + return on_init_failed(87); +} +static aclError _WRAPLIB_API_CALL aclrtGetGroupInfoDetail_init(const aclrtGroupInfo *arg0, int32_t arg1, aclrtGroupAttr arg2, void *arg3, size_t arg4, size_t *arg5) { + load_library(); + return aclrtGetGroupInfoDetail(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclrtGetGroupInfoDetail_error(const aclrtGroupInfo *, int32_t, aclrtGroupAttr, void *, size_t, size_t *) { + return on_init_failed(88); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceCanAccessPeer_init(int32_t *arg0, int32_t arg1, int32_t arg2) { + load_library(); + return aclrtDeviceCanAccessPeer(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceCanAccessPeer_error(int32_t *, int32_t, int32_t) { + return on_init_failed(89); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceEnablePeerAccess_init(int32_t arg0, uint32_t arg1) { + load_library(); + return aclrtDeviceEnablePeerAccess(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceEnablePeerAccess_error(int32_t, uint32_t) { + return on_init_failed(90); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceDisablePeerAccess_init(int32_t arg0) { + load_library(); + return aclrtDeviceDisablePeerAccess(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtDeviceDisablePeerAccess_error(int32_t) { + return on_init_failed(91); +} +static aclError _WRAPLIB_API_CALL aclrtGetMemInfo_init(aclrtMemAttr arg0, size_t *arg1, size_t *arg2) { + load_library(); + return aclrtGetMemInfo(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtGetMemInfo_error(aclrtMemAttr, size_t *, size_t *) { + return on_init_failed(92); +} +static aclError _WRAPLIB_API_CALL aclrtSetOpWaitTimeout_init(uint32_t arg0) { + load_library(); + return aclrtSetOpWaitTimeout(arg0); +} +static aclError _WRAPLIB_API_CALL aclrtSetOpWaitTimeout_error(uint32_t) { + return on_init_failed(93); +} +static aclError _WRAPLIB_API_CALL aclopSetModelDir_init(const char *arg0) { + load_library(); + return aclopSetModelDir(arg0); +} +static aclError _WRAPLIB_API_CALL aclopSetModelDir_error(const char *) { + return on_init_failed(94); +} +static aclError _WRAPLIB_API_CALL aclopLoad_init(const void *arg0, size_t arg1) { + load_library(); + return aclopLoad(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclopLoad_error(const void *, size_t) { + return on_init_failed(95); +} +static aclopAttr _WRAPLIB_API_CALL *aclopCreateAttr_init() { + load_library(); + return aclopCreateAttr(); +} +static aclopAttr _WRAPLIB_API_CALL *aclopCreateAttr_error() { + return on_init_failed(96); +} +static void _WRAPLIB_API_CALL aclopDestroyAttr_init(const aclopAttr *arg0) { + load_library(); + return aclopDestroyAttr(arg0); +} +static void _WRAPLIB_API_CALL aclopDestroyAttr_error(const aclopAttr *) { + return on_init_failed(97); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrBool_init(aclopAttr *arg0, const char *arg1, uint8_t arg2) { + load_library(); + return aclopSetAttrBool(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrBool_error(aclopAttr *, const char *, uint8_t) { + return on_init_failed(98); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrInt_init(aclopAttr *arg0, const char *arg1, int64_t arg2) { + load_library(); + return aclopSetAttrInt(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrInt_error(aclopAttr *, const char *, int64_t) { + return on_init_failed(99); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrFloat_init(aclopAttr *arg0, const char *arg1, float arg2) { + load_library(); + return aclopSetAttrFloat(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrFloat_error(aclopAttr *, const char *, float) { + return on_init_failed(100); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrString_init(aclopAttr *arg0, const char *arg1, const char *arg2) { + load_library(); + return aclopSetAttrString(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrString_error(aclopAttr *, const char *, const char *) { + return on_init_failed(101); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrDataType_init(aclopAttr *arg0, const char *arg1, aclDataType arg2) { + load_library(); + return aclopSetAttrDataType(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrDataType_error(aclopAttr *, const char *, aclDataType) { + return on_init_failed(102); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListDataType_init(aclopAttr *arg0, const char *arg1, int arg2, const aclDataType arg3[]) { + load_library(); + return aclopSetAttrListDataType(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListDataType_error(aclopAttr *, const char *, int, const aclDataType []) { + return on_init_failed(103); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListBool_init(aclopAttr *arg0, const char *arg1, int arg2, const uint8_t *arg3) { + load_library(); + return aclopSetAttrListBool(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListBool_error(aclopAttr *, const char *, int, const uint8_t *) { + return on_init_failed(104); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListInt_init(aclopAttr *arg0, const char *arg1, int arg2, const int64_t *arg3) { + load_library(); + return aclopSetAttrListInt(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListInt_error(aclopAttr *, const char *, int, const int64_t *) { + return on_init_failed(105); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListFloat_init(aclopAttr *arg0, const char *arg1, int arg2, const float *arg3) { + load_library(); + return aclopSetAttrListFloat(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListFloat_error(aclopAttr *, const char *, int, const float *) { + return on_init_failed(106); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListString_init(aclopAttr *arg0, const char *arg1, int arg2, const char **arg3) { + load_library(); + return aclopSetAttrListString(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListString_error(aclopAttr *, const char *, int, const char **) { + return on_init_failed(107); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListListInt_init(aclopAttr *arg0, const char *arg1, int arg2, const int *arg3, const int64_t * const arg4[]) { + load_library(); + return aclopSetAttrListListInt(arg0, arg1, arg2, arg3, arg4); +} +static aclError _WRAPLIB_API_CALL aclopSetAttrListListInt_error(aclopAttr *, const char *, int, const int *, const int64_t * const []) { + return on_init_failed(108); +} +static aclError _WRAPLIB_API_CALL aclopExecute_init(const char *arg0, int arg1, const aclTensorDesc * const arg2[], const aclDataBuffer * const arg3[], int arg4, const aclTensorDesc * const arg5[], aclDataBuffer * const arg6[], const aclopAttr *arg7, aclrtStream arg8) { + load_library(); + return aclopExecute(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +static aclError _WRAPLIB_API_CALL aclopExecute_error(const char *, int, const aclTensorDesc * const [], const aclDataBuffer * const [], int, const aclTensorDesc * const [], aclDataBuffer * const [], const aclopAttr *, aclrtStream) { + return on_init_failed(109); +} +static aclError _WRAPLIB_API_CALL aclopExecuteV2_init(const char *arg0, int arg1, aclTensorDesc *arg2[], aclDataBuffer *arg3[], int arg4, aclTensorDesc *arg5[], aclDataBuffer *arg6[], aclopAttr *arg7, aclrtStream arg8) { + load_library(); + return aclopExecuteV2(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +static aclError _WRAPLIB_API_CALL aclopExecuteV2_error(const char *, int, aclTensorDesc *[], aclDataBuffer *[], int, aclTensorDesc *[], aclDataBuffer *[], aclopAttr *, aclrtStream) { + return on_init_failed(110); +} +static aclError _WRAPLIB_API_CALL aclopCreateHandle_init(const char *arg0, int arg1, const aclTensorDesc * const arg2[], int arg3, const aclTensorDesc * const arg4[], const aclopAttr *arg5, aclopHandle **arg6) { + load_library(); + return aclopCreateHandle(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclopCreateHandle_error(const char *, int, const aclTensorDesc * const [], int, const aclTensorDesc * const [], const aclopAttr *, aclopHandle **) { + return on_init_failed(111); +} +static void _WRAPLIB_API_CALL aclopDestroyHandle_init(aclopHandle *arg0) { + load_library(); + return aclopDestroyHandle(arg0); +} +static void _WRAPLIB_API_CALL aclopDestroyHandle_error(aclopHandle *) { + return on_init_failed(112); +} +static aclError _WRAPLIB_API_CALL aclopExecWithHandle_init(aclopHandle *arg0, int arg1, const aclDataBuffer * const arg2[], int arg3, aclDataBuffer * const arg4[], aclrtStream arg5) { + load_library(); + return aclopExecWithHandle(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclopExecWithHandle_error(aclopHandle *, int, const aclDataBuffer * const [], int, aclDataBuffer * const [], aclrtStream) { + return on_init_failed(113); +} +static aclError _WRAPLIB_API_CALL aclopCast_init(const aclTensorDesc *arg0, const aclDataBuffer *arg1, const aclTensorDesc *arg2, aclDataBuffer *arg3, uint8_t arg4, aclrtStream arg5) { + load_library(); + return aclopCast(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclopCast_error(const aclTensorDesc *, const aclDataBuffer *, const aclTensorDesc *, aclDataBuffer *, uint8_t, aclrtStream) { + return on_init_failed(114); +} +static aclError _WRAPLIB_API_CALL aclopCreateHandleForCast_init(aclTensorDesc *arg0, aclTensorDesc *arg1, uint8_t arg2, aclopHandle **arg3) { + load_library(); + return aclopCreateHandleForCast(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclopCreateHandleForCast_error(aclTensorDesc *, aclTensorDesc *, uint8_t, aclopHandle **) { + return on_init_failed(115); +} +static aclError _WRAPLIB_API_CALL aclopCreateKernel_init(const char *arg0, const char *arg1, const char *arg2, void *arg3, int arg4, aclopEngineType arg5, aclDataDeallocator arg6) { + load_library(); + return aclopCreateKernel(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclopCreateKernel_error(const char *, const char *, const char *, void *, int, aclopEngineType, aclDataDeallocator) { + return on_init_failed(116); +} +static aclError _WRAPLIB_API_CALL aclopRegisterCompileFunc_init(const char *arg0, aclopCompileFunc arg1) { + load_library(); + return aclopRegisterCompileFunc(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclopRegisterCompileFunc_error(const char *, aclopCompileFunc) { + return on_init_failed(117); +} +static aclError _WRAPLIB_API_CALL aclopUnregisterCompileFunc_init(const char *arg0) { + load_library(); + return aclopUnregisterCompileFunc(arg0); +} +static aclError _WRAPLIB_API_CALL aclopUnregisterCompileFunc_error(const char *) { + return on_init_failed(118); +} +static aclError _WRAPLIB_API_CALL aclopSetKernelArgs_init(aclopKernelDesc *arg0, const char *arg1, uint32_t arg2, const void *arg3, uint32_t arg4) { + load_library(); + return aclopSetKernelArgs(arg0, arg1, arg2, arg3, arg4); +} +static aclError _WRAPLIB_API_CALL aclopSetKernelArgs_error(aclopKernelDesc *, const char *, uint32_t, const void *, uint32_t) { + return on_init_failed(119); +} +static aclError _WRAPLIB_API_CALL aclopSetKernelWorkspaceSizes_init(aclopKernelDesc *arg0, int arg1, size_t *arg2) { + load_library(); + return aclopSetKernelWorkspaceSizes(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclopSetKernelWorkspaceSizes_error(aclopKernelDesc *, int, size_t *) { + return on_init_failed(120); +} +static aclError _WRAPLIB_API_CALL aclopUpdateParams_init(const char *arg0, int arg1, const aclTensorDesc * const arg2[], int arg3, const aclTensorDesc * const arg4[], const aclopAttr *arg5) { + load_library(); + return aclopUpdateParams(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclopUpdateParams_error(const char *, int, const aclTensorDesc * const [], int, const aclTensorDesc * const [], const aclopAttr *) { + return on_init_failed(121); +} +static aclError _WRAPLIB_API_CALL aclopInferShape_init(const char *arg0, int arg1, aclTensorDesc *arg2[], aclDataBuffer *arg3[], int arg4, aclTensorDesc *arg5[], aclopAttr *arg6) { + load_library(); + return aclopInferShape(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclopInferShape_error(const char *, int, aclTensorDesc *[], aclDataBuffer *[], int, aclTensorDesc *[], aclopAttr *) { + return on_init_failed(122); +} +static aclmdlDesc _WRAPLIB_API_CALL *aclmdlCreateDesc_init() { + load_library(); + return aclmdlCreateDesc(); +} +static aclmdlDesc _WRAPLIB_API_CALL *aclmdlCreateDesc_error() { + return on_init_failed(123); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyDesc_init(aclmdlDesc *arg0) { + load_library(); + return aclmdlDestroyDesc(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyDesc_error(aclmdlDesc *) { + return on_init_failed(124); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDesc_init(aclmdlDesc *arg0, uint32_t arg1) { + load_library(); + return aclmdlGetDesc(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDesc_error(aclmdlDesc *, uint32_t) { + return on_init_failed(125); +} +static size_t _WRAPLIB_API_CALL aclmdlGetNumInputs_init(aclmdlDesc *arg0) { + load_library(); + return aclmdlGetNumInputs(arg0); +} +static size_t _WRAPLIB_API_CALL aclmdlGetNumInputs_error(aclmdlDesc *) { + return on_init_failed(126); +} +static size_t _WRAPLIB_API_CALL aclmdlGetNumOutputs_init(aclmdlDesc *arg0) { + load_library(); + return aclmdlGetNumOutputs(arg0); +} +static size_t _WRAPLIB_API_CALL aclmdlGetNumOutputs_error(aclmdlDesc *) { + return on_init_failed(127); +} +static size_t _WRAPLIB_API_CALL aclmdlGetInputSizeByIndex_init(aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetInputSizeByIndex(arg0, arg1); +} +static size_t _WRAPLIB_API_CALL aclmdlGetInputSizeByIndex_error(aclmdlDesc *, size_t) { + return on_init_failed(128); +} +static size_t _WRAPLIB_API_CALL aclmdlGetOutputSizeByIndex_init(aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetOutputSizeByIndex(arg0, arg1); +} +static size_t _WRAPLIB_API_CALL aclmdlGetOutputSizeByIndex_error(aclmdlDesc *, size_t) { + return on_init_failed(129); +} +static aclmdlDataset _WRAPLIB_API_CALL *aclmdlCreateDataset_init() { + load_library(); + return aclmdlCreateDataset(); +} +static aclmdlDataset _WRAPLIB_API_CALL *aclmdlCreateDataset_error() { + return on_init_failed(130); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyDataset_init(const aclmdlDataset *arg0) { + load_library(); + return aclmdlDestroyDataset(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyDataset_error(const aclmdlDataset *) { + return on_init_failed(131); +} +static aclError _WRAPLIB_API_CALL aclmdlAddDatasetBuffer_init(aclmdlDataset *arg0, aclDataBuffer *arg1) { + load_library(); + return aclmdlAddDatasetBuffer(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlAddDatasetBuffer_error(aclmdlDataset *, aclDataBuffer *) { + return on_init_failed(132); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDatasetTensorDesc_init(aclmdlDataset *arg0, aclTensorDesc *arg1, size_t arg2) { + load_library(); + return aclmdlSetDatasetTensorDesc(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDatasetTensorDesc_error(aclmdlDataset *, aclTensorDesc *, size_t) { + return on_init_failed(133); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclmdlGetDatasetTensorDesc_init(const aclmdlDataset *arg0, size_t arg1) { + load_library(); + return aclmdlGetDatasetTensorDesc(arg0, arg1); +} +static aclTensorDesc _WRAPLIB_API_CALL *aclmdlGetDatasetTensorDesc_error(const aclmdlDataset *, size_t) { + return on_init_failed(134); +} +static size_t _WRAPLIB_API_CALL aclmdlGetDatasetNumBuffers_init(const aclmdlDataset *arg0) { + load_library(); + return aclmdlGetDatasetNumBuffers(arg0); +} +static size_t _WRAPLIB_API_CALL aclmdlGetDatasetNumBuffers_error(const aclmdlDataset *) { + return on_init_failed(135); +} +static aclDataBuffer _WRAPLIB_API_CALL *aclmdlGetDatasetBuffer_init(const aclmdlDataset *arg0, size_t arg1) { + load_library(); + return aclmdlGetDatasetBuffer(arg0, arg1); +} +static aclDataBuffer _WRAPLIB_API_CALL *aclmdlGetDatasetBuffer_error(const aclmdlDataset *, size_t) { + return on_init_failed(136); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFile_init(const char *arg0, uint32_t *arg1) { + load_library(); + return aclmdlLoadFromFile(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFile_error(const char *, uint32_t *) { + return on_init_failed(137); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMem_init(const void *arg0, size_t arg1, uint32_t *arg2) { + load_library(); + return aclmdlLoadFromMem(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMem_error(const void *, size_t, uint32_t *) { + return on_init_failed(138); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithMem_init(const char *arg0, uint32_t *arg1, void *arg2, size_t arg3, void *arg4, size_t arg5) { + load_library(); + return aclmdlLoadFromFileWithMem(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithMem_error(const char *, uint32_t *, void *, size_t, void *, size_t) { + return on_init_failed(139); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithMem_init(const void *arg0, size_t arg1, uint32_t *arg2, void *arg3, size_t arg4, void *arg5, size_t arg6) { + load_library(); + return aclmdlLoadFromMemWithMem(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithMem_error(const void *, size_t, uint32_t *, void *, size_t, void *, size_t) { + return on_init_failed(140); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithQ_init(const char *arg0, uint32_t *arg1, const uint32_t *arg2, size_t arg3, const uint32_t *arg4, size_t arg5) { + load_library(); + return aclmdlLoadFromFileWithQ(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithQ_error(const char *, uint32_t *, const uint32_t *, size_t, const uint32_t *, size_t) { + return on_init_failed(141); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithQ_init(const void *arg0, size_t arg1, uint32_t *arg2, const uint32_t *arg3, size_t arg4, const uint32_t *arg5, size_t arg6) { + load_library(); + return aclmdlLoadFromMemWithQ(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithQ_error(const void *, size_t, uint32_t *, const uint32_t *, size_t, const uint32_t *, size_t) { + return on_init_failed(142); +} +static aclError _WRAPLIB_API_CALL aclmdlExecute_init(uint32_t arg0, const aclmdlDataset *arg1, aclmdlDataset *arg2) { + load_library(); + return aclmdlExecute(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlExecute_error(uint32_t, const aclmdlDataset *, aclmdlDataset *) { + return on_init_failed(143); +} +static aclError _WRAPLIB_API_CALL aclmdlExecuteAsync_init(uint32_t arg0, const aclmdlDataset *arg1, aclmdlDataset *arg2, aclrtStream arg3) { + load_library(); + return aclmdlExecuteAsync(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlExecuteAsync_error(uint32_t, const aclmdlDataset *, aclmdlDataset *, aclrtStream) { + return on_init_failed(144); +} +static aclError _WRAPLIB_API_CALL aclmdlUnload_init(uint32_t arg0) { + load_library(); + return aclmdlUnload(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlUnload_error(uint32_t) { + return on_init_failed(145); +} +static aclError _WRAPLIB_API_CALL aclmdlQuerySize_init(const char *arg0, size_t *arg1, size_t *arg2) { + load_library(); + return aclmdlQuerySize(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlQuerySize_error(const char *, size_t *, size_t *) { + return on_init_failed(146); +} +static aclError _WRAPLIB_API_CALL aclmdlQuerySizeFromMem_init(const void *arg0, size_t arg1, size_t *arg2, size_t *arg3) { + load_library(); + return aclmdlQuerySizeFromMem(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlQuerySizeFromMem_error(const void *, size_t, size_t *, size_t *) { + return on_init_failed(147); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDynamicBatchSize_init(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, uint64_t arg3) { + load_library(); + return aclmdlSetDynamicBatchSize(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDynamicBatchSize_error(uint32_t, aclmdlDataset *, size_t, uint64_t) { + return on_init_failed(148); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDynamicHWSize_init(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, uint64_t arg3, uint64_t arg4) { + load_library(); + return aclmdlSetDynamicHWSize(arg0, arg1, arg2, arg3, arg4); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDynamicHWSize_error(uint32_t, aclmdlDataset *, size_t, uint64_t, uint64_t) { + return on_init_failed(149); +} +static aclError _WRAPLIB_API_CALL aclmdlSetInputDynamicDims_init(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlIODims *arg3) { + load_library(); + return aclmdlSetInputDynamicDims(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlSetInputDynamicDims_error(uint32_t, aclmdlDataset *, size_t, const aclmdlIODims *) { + return on_init_failed(150); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDims_init(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + load_library(); + return aclmdlGetInputDims(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDims_error(const aclmdlDesc *, size_t, aclmdlIODims *) { + return on_init_failed(151); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDimsV2_init(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + load_library(); + return aclmdlGetInputDimsV2(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDimsV2_error(const aclmdlDesc *, size_t, aclmdlIODims *) { + return on_init_failed(152); +} +static aclError _WRAPLIB_API_CALL aclmdlGetOutputDims_init(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + load_library(); + return aclmdlGetOutputDims(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetOutputDims_error(const aclmdlDesc *, size_t, aclmdlIODims *) { + return on_init_failed(153); +} +static aclError _WRAPLIB_API_CALL aclmdlGetCurOutputDims_init(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + load_library(); + return aclmdlGetCurOutputDims(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetCurOutputDims_error(const aclmdlDesc *, size_t, aclmdlIODims *) { + return on_init_failed(154); +} +static const char _WRAPLIB_API_CALL *aclmdlGetOpAttr_init(aclmdlDesc *arg0, const char *arg1, const char *arg2) { + load_library(); + return aclmdlGetOpAttr(arg0, arg1, arg2); +} +static const char _WRAPLIB_API_CALL *aclmdlGetOpAttr_error(aclmdlDesc *, const char *, const char *) { + return on_init_failed(155); +} +static const char _WRAPLIB_API_CALL *aclmdlGetInputNameByIndex_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetInputNameByIndex(arg0, arg1); +} +static const char _WRAPLIB_API_CALL *aclmdlGetInputNameByIndex_error(const aclmdlDesc *, size_t) { + return on_init_failed(156); +} +static const char _WRAPLIB_API_CALL *aclmdlGetOutputNameByIndex_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetOutputNameByIndex(arg0, arg1); +} +static const char _WRAPLIB_API_CALL *aclmdlGetOutputNameByIndex_error(const aclmdlDesc *, size_t) { + return on_init_failed(157); +} +static aclFormat _WRAPLIB_API_CALL aclmdlGetInputFormat_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetInputFormat(arg0, arg1); +} +static aclFormat _WRAPLIB_API_CALL aclmdlGetInputFormat_error(const aclmdlDesc *, size_t) { + return on_init_failed(158); +} +static aclFormat _WRAPLIB_API_CALL aclmdlGetOutputFormat_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetOutputFormat(arg0, arg1); +} +static aclFormat _WRAPLIB_API_CALL aclmdlGetOutputFormat_error(const aclmdlDesc *, size_t) { + return on_init_failed(159); +} +static aclDataType _WRAPLIB_API_CALL aclmdlGetInputDataType_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetInputDataType(arg0, arg1); +} +static aclDataType _WRAPLIB_API_CALL aclmdlGetInputDataType_error(const aclmdlDesc *, size_t) { + return on_init_failed(160); +} +static aclDataType _WRAPLIB_API_CALL aclmdlGetOutputDataType_init(const aclmdlDesc *arg0, size_t arg1) { + load_library(); + return aclmdlGetOutputDataType(arg0, arg1); +} +static aclDataType _WRAPLIB_API_CALL aclmdlGetOutputDataType_error(const aclmdlDesc *, size_t) { + return on_init_failed(161); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputIndexByName_init(const aclmdlDesc *arg0, const char *arg1, size_t *arg2) { + load_library(); + return aclmdlGetInputIndexByName(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputIndexByName_error(const aclmdlDesc *, const char *, size_t *) { + return on_init_failed(162); +} +static aclError _WRAPLIB_API_CALL aclmdlGetOutputIndexByName_init(const aclmdlDesc *arg0, const char *arg1, size_t *arg2) { + load_library(); + return aclmdlGetOutputIndexByName(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetOutputIndexByName_error(const aclmdlDesc *, const char *, size_t *) { + return on_init_failed(163); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDynamicBatch_init(const aclmdlDesc *arg0, aclmdlBatch *arg1) { + load_library(); + return aclmdlGetDynamicBatch(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDynamicBatch_error(const aclmdlDesc *, aclmdlBatch *) { + return on_init_failed(164); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDynamicHW_init(const aclmdlDesc *arg0, size_t arg1, aclmdlHW *arg2) { + load_library(); + return aclmdlGetDynamicHW(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetDynamicHW_error(const aclmdlDesc *, size_t, aclmdlHW *) { + return on_init_failed(165); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicGearCount_init(const aclmdlDesc *arg0, size_t arg1, size_t *arg2) { + load_library(); + return aclmdlGetInputDynamicGearCount(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicGearCount_error(const aclmdlDesc *, size_t, size_t *) { + return on_init_failed(166); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicDims_init(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2, size_t arg3) { + load_library(); + return aclmdlGetInputDynamicDims(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicDims_error(const aclmdlDesc *, size_t, aclmdlIODims *, size_t) { + return on_init_failed(167); +} +static aclmdlAIPP _WRAPLIB_API_CALL *aclmdlCreateAIPP_init(uint64_t arg0) { + load_library(); + return aclmdlCreateAIPP(arg0); +} +static aclmdlAIPP _WRAPLIB_API_CALL *aclmdlCreateAIPP_error(uint64_t) { + return on_init_failed(168); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyAIPP_init(const aclmdlAIPP *arg0) { + load_library(); + return aclmdlDestroyAIPP(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyAIPP_error(const aclmdlAIPP *) { + return on_init_failed(169); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPInputFormat_init(aclmdlAIPP *arg0, aclAippInputFormat arg1) { + load_library(); + return aclmdlSetAIPPInputFormat(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPInputFormat_error(aclmdlAIPP *, aclAippInputFormat) { + return on_init_failed(170); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPCscParams_init(aclmdlAIPP *arg0, int8_t arg1, int16_t arg2, int16_t arg3, int16_t arg4, int16_t arg5, int16_t arg6, int16_t arg7, int16_t arg8, int16_t arg9, int16_t arg10, uint8_t arg11, uint8_t arg12, uint8_t arg13, uint8_t arg14, uint8_t arg15, uint8_t arg16) { + load_library(); + return aclmdlSetAIPPCscParams(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPCscParams_error(aclmdlAIPP *, int8_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t) { + return on_init_failed(171); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPRbuvSwapSwitch_init(aclmdlAIPP *arg0, int8_t arg1) { + load_library(); + return aclmdlSetAIPPRbuvSwapSwitch(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPRbuvSwapSwitch_error(aclmdlAIPP *, int8_t) { + return on_init_failed(172); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPAxSwapSwitch_init(aclmdlAIPP *arg0, int8_t arg1) { + load_library(); + return aclmdlSetAIPPAxSwapSwitch(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPAxSwapSwitch_error(aclmdlAIPP *, int8_t) { + return on_init_failed(173); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPSrcImageSize_init(aclmdlAIPP *arg0, int32_t arg1, int32_t arg2) { + load_library(); + return aclmdlSetAIPPSrcImageSize(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPSrcImageSize_error(aclmdlAIPP *, int32_t, int32_t) { + return on_init_failed(174); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPScfParams_init(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + load_library(); + return aclmdlSetAIPPScfParams(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPScfParams_error(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t) { + return on_init_failed(175); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPCropParams_init(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + load_library(); + return aclmdlSetAIPPCropParams(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPCropParams_error(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t) { + return on_init_failed(176); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPPaddingParams_init(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + load_library(); + return aclmdlSetAIPPPaddingParams(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPPaddingParams_error(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t) { + return on_init_failed(177); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMean_init(aclmdlAIPP *arg0, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4, uint64_t arg5) { + load_library(); + return aclmdlSetAIPPDtcPixelMean(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMean_error(aclmdlAIPP *, int16_t, int16_t, int16_t, int16_t, uint64_t) { + return on_init_failed(178); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMin_init(aclmdlAIPP *arg0, float arg1, float arg2, float arg3, float arg4, uint64_t arg5) { + load_library(); + return aclmdlSetAIPPDtcPixelMin(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMin_error(aclmdlAIPP *, float, float, float, float, uint64_t) { + return on_init_failed(179); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPPixelVarReci_init(aclmdlAIPP *arg0, float arg1, float arg2, float arg3, float arg4, uint64_t arg5) { + load_library(); + return aclmdlSetAIPPPixelVarReci(arg0, arg1, arg2, arg3, arg4, arg5); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPPixelVarReci_error(aclmdlAIPP *, float, float, float, float, uint64_t) { + return on_init_failed(180); +} +static aclError _WRAPLIB_API_CALL aclmdlSetInputAIPP_init(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlAIPP *arg3) { + load_library(); + return aclmdlSetInputAIPP(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlSetInputAIPP_error(uint32_t, aclmdlDataset *, size_t, const aclmdlAIPP *) { + return on_init_failed(181); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPByInputIndex_init(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlAIPP *arg3) { + load_library(); + return aclmdlSetAIPPByInputIndex(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlSetAIPPByInputIndex_error(uint32_t, aclmdlDataset *, size_t, const aclmdlAIPP *) { + return on_init_failed(182); +} +static aclError _WRAPLIB_API_CALL aclmdlGetAippType_init(uint32_t arg0, size_t arg1, aclmdlInputAippType *arg2, size_t *arg3) { + load_library(); + return aclmdlGetAippType(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlGetAippType_error(uint32_t, size_t, aclmdlInputAippType *, size_t *) { + return on_init_failed(183); +} +static aclError _WRAPLIB_API_CALL aclmdlGetFirstAippInfo_init(uint32_t arg0, size_t arg1, aclAippInfo *arg2) { + load_library(); + return aclmdlGetFirstAippInfo(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclmdlGetFirstAippInfo_error(uint32_t, size_t, aclAippInfo *) { + return on_init_failed(184); +} +static aclError _WRAPLIB_API_CALL aclmdlCreateAndGetOpDesc_init(uint32_t arg0, uint32_t arg1, uint32_t arg2, char *arg3, size_t arg4, aclTensorDesc **arg5, size_t *arg6, aclTensorDesc **arg7, size_t *arg8) { + load_library(); + return aclmdlCreateAndGetOpDesc(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +static aclError _WRAPLIB_API_CALL aclmdlCreateAndGetOpDesc_error(uint32_t, uint32_t, uint32_t, char *, size_t, aclTensorDesc **, size_t *, aclTensorDesc **, size_t *) { + return on_init_failed(185); +} +static aclError _WRAPLIB_API_CALL aclmdlInitDump_init() { + load_library(); + return aclmdlInitDump(); +} +static aclError _WRAPLIB_API_CALL aclmdlInitDump_error() { + return on_init_failed(186); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDump_init(const char *arg0) { + load_library(); + return aclmdlSetDump(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlSetDump_error(const char *) { + return on_init_failed(187); +} +static aclError _WRAPLIB_API_CALL aclmdlFinalizeDump_init() { + load_library(); + return aclmdlFinalizeDump(); +} +static aclError _WRAPLIB_API_CALL aclmdlFinalizeDump_error() { + return on_init_failed(188); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadWithConfig_init(const aclmdlConfigHandle *arg0, uint32_t *arg1) { + load_library(); + return aclmdlLoadWithConfig(arg0, arg1); +} +static aclError _WRAPLIB_API_CALL aclmdlLoadWithConfig_error(const aclmdlConfigHandle *, uint32_t *) { + return on_init_failed(189); +} +static aclmdlConfigHandle _WRAPLIB_API_CALL *aclmdlCreateConfigHandle_init() { + load_library(); + return aclmdlCreateConfigHandle(); +} +static aclmdlConfigHandle _WRAPLIB_API_CALL *aclmdlCreateConfigHandle_error() { + return on_init_failed(190); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyConfigHandle_init(aclmdlConfigHandle *arg0) { + load_library(); + return aclmdlDestroyConfigHandle(arg0); +} +static aclError _WRAPLIB_API_CALL aclmdlDestroyConfigHandle_error(aclmdlConfigHandle *) { + return on_init_failed(191); +} +static aclError _WRAPLIB_API_CALL aclmdlSetConfigOpt_init(aclmdlConfigHandle *arg0, aclmdlConfigAttr arg1, const void *arg2, size_t arg3) { + load_library(); + return aclmdlSetConfigOpt(arg0, arg1, arg2, arg3); +} +static aclError _WRAPLIB_API_CALL aclmdlSetConfigOpt_error(aclmdlConfigHandle *, aclmdlConfigAttr, const void *, size_t) { + return on_init_failed(192); +} +static const char _WRAPLIB_API_CALL *aclmdlGetTensorRealName_init(const aclmdlDesc *arg0, const char *arg1) { + load_library(); + return aclmdlGetTensorRealName(arg0, arg1); +} +static const char _WRAPLIB_API_CALL *aclmdlGetTensorRealName_error(const aclmdlDesc *, const char *) { + return on_init_failed(193); +} +static aclError _WRAPLIB_API_CALL aclInit_init(const char *arg0) { + load_library(); + return aclInit(arg0); +} +static aclError _WRAPLIB_API_CALL aclInit_error(const char *) { + return on_init_failed(194); +} +static aclError _WRAPLIB_API_CALL aclFinalize_init() { + load_library(); + return aclFinalize(); +} +static aclError _WRAPLIB_API_CALL aclFinalize_error() { + return on_init_failed(195); +} +static aclError _WRAPLIB_API_CALL aclrtGetVersion_init(int32_t *arg0, int32_t *arg1, int32_t *arg2) { + load_library(); + return aclrtGetVersion(arg0, arg1, arg2); +} +static aclError _WRAPLIB_API_CALL aclrtGetVersion_error(int32_t *, int32_t *, int32_t *) { + return on_init_failed(196); +} +static const char _WRAPLIB_API_CALL *aclGetRecentErrMsg_init() { + load_library(); + return aclGetRecentErrMsg(); +} +static const char _WRAPLIB_API_CALL *aclGetRecentErrMsg_error() { + return on_init_failed(197); +} +static constexpr size_t NR_FUNC = 198; +static void* g_func_table[NR_FUNC] = {(void*)(&aclFloat16ToFloat_init), + (void*)(&aclFloatToFloat16_init), + (void*)(&aclCreateDataBuffer_init), + (void*)(&aclDestroyDataBuffer_init), + (void*)(&aclUpdateDataBuffer_init), + (void*)(&aclGetDataBufferAddr_init), + (void*)(&aclGetDataBufferSize_init), + (void*)(&aclGetDataBufferSizeV2_init), + (void*)(&aclDataTypeSize_init), + (void*)(&aclCreateTensorDesc_init), + (void*)(&aclDestroyTensorDesc_init), + (void*)(&aclSetTensorShapeRange_init), + (void*)(&aclSetTensorValueRange_init), + (void*)(&aclGetTensorDescType_init), + (void*)(&aclGetTensorDescFormat_init), + (void*)(&aclGetTensorDescSize_init), + (void*)(&aclGetTensorDescElementCount_init), + (void*)(&aclGetTensorDescNumDims_init), + (void*)(&aclGetTensorDescDim_init), + (void*)(&aclGetTensorDescDimV2_init), + (void*)(&aclGetTensorDescDimRange_init), + (void*)(&aclSetTensorDescName_init), + (void*)(&aclGetTensorDescName_init), + (void*)(&aclTransTensorDescFormat_init), + (void*)(&aclSetTensorStorageFormat_init), + (void*)(&aclSetTensorStorageShape_init), + (void*)(&aclSetTensorFormat_init), + (void*)(&aclSetTensorShape_init), + (void*)(&aclSetTensorOriginFormat_init), + (void*)(&aclSetTensorOriginShape_init), + (void*)(&aclGetTensorDescByIndex_init), + (void*)(&aclGetTensorDescAddress_init), + (void*)(&aclSetTensorDynamicInput_init), + (void*)(&aclSetTensorConst_init), + (void*)(&aclSetTensorPlaceMent_init), + (void*)(&aclrtGetSocName_init), + (void*)(&aclrtSetExceptionInfoCallback_init), + (void*)(&aclrtGetTaskIdFromExceptionInfo_init), + (void*)(&aclrtGetStreamIdFromExceptionInfo_init), + (void*)(&aclrtGetThreadIdFromExceptionInfo_init), + (void*)(&aclrtGetDeviceIdFromExceptionInfo_init), + (void*)(&aclrtSubscribeReport_init), + (void*)(&aclrtLaunchCallback_init), + (void*)(&aclrtProcessReport_init), + (void*)(&aclrtUnSubscribeReport_init), + (void*)(&aclrtCreateContext_init), + (void*)(&aclrtDestroyContext_init), + (void*)(&aclrtSetCurrentContext_init), + (void*)(&aclrtGetCurrentContext_init), + (void*)(&aclrtSetDevice_init), + (void*)(&aclrtResetDevice_init), + (void*)(&aclrtGetDevice_init), + (void*)(&aclrtGetRunMode_init), + (void*)(&aclrtSynchronizeDevice_init), + (void*)(&aclrtSetTsDevice_init), + (void*)(&aclrtGetDeviceCount_init), + (void*)(&aclrtCreateEvent_init), + (void*)(&aclrtCreateEventWithFlag_init), + (void*)(&aclrtDestroyEvent_init), + (void*)(&aclrtRecordEvent_init), + (void*)(&aclrtResetEvent_init), + (void*)(&aclrtQueryEvent_init), + (void*)(&aclrtQueryEventStatus_init), + (void*)(&aclrtQueryEventWaitStatus_init), + (void*)(&aclrtSynchronizeEvent_init), + (void*)(&aclrtEventElapsedTime_init), + (void*)(&aclrtMalloc_init), + (void*)(&aclrtMallocCached_init), + (void*)(&aclrtMemFlush_init), + (void*)(&aclrtMemInvalidate_init), + (void*)(&aclrtFree_init), + (void*)(&aclrtMallocHost_init), + (void*)(&aclrtFreeHost_init), + (void*)(&aclrtMemcpy_init), + (void*)(&aclrtMemset_init), + (void*)(&aclrtMemcpyAsync_init), + (void*)(&aclrtMemcpy2d_init), + (void*)(&aclrtMemcpy2dAsync_init), + (void*)(&aclrtMemsetAsync_init), + (void*)(&aclrtCreateStream_init), + (void*)(&aclrtDestroyStream_init), + (void*)(&aclrtSynchronizeStream_init), + (void*)(&aclrtStreamWaitEvent_init), + (void*)(&aclrtSetGroup_init), + (void*)(&aclrtGetGroupCount_init), + (void*)(&aclrtCreateGroupInfo_init), + (void*)(&aclrtDestroyGroupInfo_init), + (void*)(&aclrtGetAllGroupInfo_init), + (void*)(&aclrtGetGroupInfoDetail_init), + (void*)(&aclrtDeviceCanAccessPeer_init), + (void*)(&aclrtDeviceEnablePeerAccess_init), + (void*)(&aclrtDeviceDisablePeerAccess_init), + (void*)(&aclrtGetMemInfo_init), + (void*)(&aclrtSetOpWaitTimeout_init), + (void*)(&aclopSetModelDir_init), + (void*)(&aclopLoad_init), + (void*)(&aclopCreateAttr_init), + (void*)(&aclopDestroyAttr_init), + (void*)(&aclopSetAttrBool_init), + (void*)(&aclopSetAttrInt_init), + (void*)(&aclopSetAttrFloat_init), + (void*)(&aclopSetAttrString_init), + (void*)(&aclopSetAttrDataType_init), + (void*)(&aclopSetAttrListDataType_init), + (void*)(&aclopSetAttrListBool_init), + (void*)(&aclopSetAttrListInt_init), + (void*)(&aclopSetAttrListFloat_init), + (void*)(&aclopSetAttrListString_init), + (void*)(&aclopSetAttrListListInt_init), + (void*)(&aclopExecute_init), + (void*)(&aclopExecuteV2_init), + (void*)(&aclopCreateHandle_init), + (void*)(&aclopDestroyHandle_init), + (void*)(&aclopExecWithHandle_init), + (void*)(&aclopCast_init), + (void*)(&aclopCreateHandleForCast_init), + (void*)(&aclopCreateKernel_init), + (void*)(&aclopRegisterCompileFunc_init), + (void*)(&aclopUnregisterCompileFunc_init), + (void*)(&aclopSetKernelArgs_init), + (void*)(&aclopSetKernelWorkspaceSizes_init), + (void*)(&aclopUpdateParams_init), + (void*)(&aclopInferShape_init), + (void*)(&aclmdlCreateDesc_init), + (void*)(&aclmdlDestroyDesc_init), + (void*)(&aclmdlGetDesc_init), + (void*)(&aclmdlGetNumInputs_init), + (void*)(&aclmdlGetNumOutputs_init), + (void*)(&aclmdlGetInputSizeByIndex_init), + (void*)(&aclmdlGetOutputSizeByIndex_init), + (void*)(&aclmdlCreateDataset_init), + (void*)(&aclmdlDestroyDataset_init), + (void*)(&aclmdlAddDatasetBuffer_init), + (void*)(&aclmdlSetDatasetTensorDesc_init), + (void*)(&aclmdlGetDatasetTensorDesc_init), + (void*)(&aclmdlGetDatasetNumBuffers_init), + (void*)(&aclmdlGetDatasetBuffer_init), + (void*)(&aclmdlLoadFromFile_init), + (void*)(&aclmdlLoadFromMem_init), + (void*)(&aclmdlLoadFromFileWithMem_init), + (void*)(&aclmdlLoadFromMemWithMem_init), + (void*)(&aclmdlLoadFromFileWithQ_init), + (void*)(&aclmdlLoadFromMemWithQ_init), + (void*)(&aclmdlExecute_init), + (void*)(&aclmdlExecuteAsync_init), + (void*)(&aclmdlUnload_init), + (void*)(&aclmdlQuerySize_init), + (void*)(&aclmdlQuerySizeFromMem_init), + (void*)(&aclmdlSetDynamicBatchSize_init), + (void*)(&aclmdlSetDynamicHWSize_init), + (void*)(&aclmdlSetInputDynamicDims_init), + (void*)(&aclmdlGetInputDims_init), + (void*)(&aclmdlGetInputDimsV2_init), + (void*)(&aclmdlGetOutputDims_init), + (void*)(&aclmdlGetCurOutputDims_init), + (void*)(&aclmdlGetOpAttr_init), + (void*)(&aclmdlGetInputNameByIndex_init), + (void*)(&aclmdlGetOutputNameByIndex_init), + (void*)(&aclmdlGetInputFormat_init), + (void*)(&aclmdlGetOutputFormat_init), + (void*)(&aclmdlGetInputDataType_init), + (void*)(&aclmdlGetOutputDataType_init), + (void*)(&aclmdlGetInputIndexByName_init), + (void*)(&aclmdlGetOutputIndexByName_init), + (void*)(&aclmdlGetDynamicBatch_init), + (void*)(&aclmdlGetDynamicHW_init), + (void*)(&aclmdlGetInputDynamicGearCount_init), + (void*)(&aclmdlGetInputDynamicDims_init), + (void*)(&aclmdlCreateAIPP_init), + (void*)(&aclmdlDestroyAIPP_init), + (void*)(&aclmdlSetAIPPInputFormat_init), + (void*)(&aclmdlSetAIPPCscParams_init), + (void*)(&aclmdlSetAIPPRbuvSwapSwitch_init), + (void*)(&aclmdlSetAIPPAxSwapSwitch_init), + (void*)(&aclmdlSetAIPPSrcImageSize_init), + (void*)(&aclmdlSetAIPPScfParams_init), + (void*)(&aclmdlSetAIPPCropParams_init), + (void*)(&aclmdlSetAIPPPaddingParams_init), + (void*)(&aclmdlSetAIPPDtcPixelMean_init), + (void*)(&aclmdlSetAIPPDtcPixelMin_init), + (void*)(&aclmdlSetAIPPPixelVarReci_init), + (void*)(&aclmdlSetInputAIPP_init), + (void*)(&aclmdlSetAIPPByInputIndex_init), + (void*)(&aclmdlGetAippType_init), + (void*)(&aclmdlGetFirstAippInfo_init), + (void*)(&aclmdlCreateAndGetOpDesc_init), + (void*)(&aclmdlInitDump_init), + (void*)(&aclmdlSetDump_init), + (void*)(&aclmdlFinalizeDump_init), + (void*)(&aclmdlLoadWithConfig_init), + (void*)(&aclmdlCreateConfigHandle_init), + (void*)(&aclmdlDestroyConfigHandle_init), + (void*)(&aclmdlSetConfigOpt_init), + (void*)(&aclmdlGetTensorRealName_init), + (void*)(&aclInit_init), + (void*)(&aclFinalize_init), + (void*)(&aclrtGetVersion_init), + (void*)(&aclGetRecentErrMsg_init)}; +static void* g_func_table_error[NR_FUNC] = {(void*)(&aclFloat16ToFloat_error), + (void*)(&aclFloatToFloat16_error), + (void*)(&aclCreateDataBuffer_error), + (void*)(&aclDestroyDataBuffer_error), + (void*)(&aclUpdateDataBuffer_error), + (void*)(&aclGetDataBufferAddr_error), + (void*)(&aclGetDataBufferSize_error), + (void*)(&aclGetDataBufferSizeV2_error), + (void*)(&aclDataTypeSize_error), + (void*)(&aclCreateTensorDesc_error), + (void*)(&aclDestroyTensorDesc_error), + (void*)(&aclSetTensorShapeRange_error), + (void*)(&aclSetTensorValueRange_error), + (void*)(&aclGetTensorDescType_error), + (void*)(&aclGetTensorDescFormat_error), + (void*)(&aclGetTensorDescSize_error), + (void*)(&aclGetTensorDescElementCount_error), + (void*)(&aclGetTensorDescNumDims_error), + (void*)(&aclGetTensorDescDim_error), + (void*)(&aclGetTensorDescDimV2_error), + (void*)(&aclGetTensorDescDimRange_error), + (void*)(&aclSetTensorDescName_error), + (void*)(&aclGetTensorDescName_error), + (void*)(&aclTransTensorDescFormat_error), + (void*)(&aclSetTensorStorageFormat_error), + (void*)(&aclSetTensorStorageShape_error), + (void*)(&aclSetTensorFormat_error), + (void*)(&aclSetTensorShape_error), + (void*)(&aclSetTensorOriginFormat_error), + (void*)(&aclSetTensorOriginShape_error), + (void*)(&aclGetTensorDescByIndex_error), + (void*)(&aclGetTensorDescAddress_error), + (void*)(&aclSetTensorDynamicInput_error), + (void*)(&aclSetTensorConst_error), + (void*)(&aclSetTensorPlaceMent_error), + (void*)(&aclrtGetSocName_error), + (void*)(&aclrtSetExceptionInfoCallback_error), + (void*)(&aclrtGetTaskIdFromExceptionInfo_error), + (void*)(&aclrtGetStreamIdFromExceptionInfo_error), + (void*)(&aclrtGetThreadIdFromExceptionInfo_error), + (void*)(&aclrtGetDeviceIdFromExceptionInfo_error), + (void*)(&aclrtSubscribeReport_error), + (void*)(&aclrtLaunchCallback_error), + (void*)(&aclrtProcessReport_error), + (void*)(&aclrtUnSubscribeReport_error), + (void*)(&aclrtCreateContext_error), + (void*)(&aclrtDestroyContext_error), + (void*)(&aclrtSetCurrentContext_error), + (void*)(&aclrtGetCurrentContext_error), + (void*)(&aclrtSetDevice_error), + (void*)(&aclrtResetDevice_error), + (void*)(&aclrtGetDevice_error), + (void*)(&aclrtGetRunMode_error), + (void*)(&aclrtSynchronizeDevice_error), + (void*)(&aclrtSetTsDevice_error), + (void*)(&aclrtGetDeviceCount_error), + (void*)(&aclrtCreateEvent_error), + (void*)(&aclrtCreateEventWithFlag_error), + (void*)(&aclrtDestroyEvent_error), + (void*)(&aclrtRecordEvent_error), + (void*)(&aclrtResetEvent_error), + (void*)(&aclrtQueryEvent_error), + (void*)(&aclrtQueryEventStatus_error), + (void*)(&aclrtQueryEventWaitStatus_error), + (void*)(&aclrtSynchronizeEvent_error), + (void*)(&aclrtEventElapsedTime_error), + (void*)(&aclrtMalloc_error), + (void*)(&aclrtMallocCached_error), + (void*)(&aclrtMemFlush_error), + (void*)(&aclrtMemInvalidate_error), + (void*)(&aclrtFree_error), + (void*)(&aclrtMallocHost_error), + (void*)(&aclrtFreeHost_error), + (void*)(&aclrtMemcpy_error), + (void*)(&aclrtMemset_error), + (void*)(&aclrtMemcpyAsync_error), + (void*)(&aclrtMemcpy2d_error), + (void*)(&aclrtMemcpy2dAsync_error), + (void*)(&aclrtMemsetAsync_error), + (void*)(&aclrtCreateStream_error), + (void*)(&aclrtDestroyStream_error), + (void*)(&aclrtSynchronizeStream_error), + (void*)(&aclrtStreamWaitEvent_error), + (void*)(&aclrtSetGroup_error), + (void*)(&aclrtGetGroupCount_error), + (void*)(&aclrtCreateGroupInfo_error), + (void*)(&aclrtDestroyGroupInfo_error), + (void*)(&aclrtGetAllGroupInfo_error), + (void*)(&aclrtGetGroupInfoDetail_error), + (void*)(&aclrtDeviceCanAccessPeer_error), + (void*)(&aclrtDeviceEnablePeerAccess_error), + (void*)(&aclrtDeviceDisablePeerAccess_error), + (void*)(&aclrtGetMemInfo_error), + (void*)(&aclrtSetOpWaitTimeout_error), + (void*)(&aclopSetModelDir_error), + (void*)(&aclopLoad_error), + (void*)(&aclopCreateAttr_error), + (void*)(&aclopDestroyAttr_error), + (void*)(&aclopSetAttrBool_error), + (void*)(&aclopSetAttrInt_error), + (void*)(&aclopSetAttrFloat_error), + (void*)(&aclopSetAttrString_error), + (void*)(&aclopSetAttrDataType_error), + (void*)(&aclopSetAttrListDataType_error), + (void*)(&aclopSetAttrListBool_error), + (void*)(&aclopSetAttrListInt_error), + (void*)(&aclopSetAttrListFloat_error), + (void*)(&aclopSetAttrListString_error), + (void*)(&aclopSetAttrListListInt_error), + (void*)(&aclopExecute_error), + (void*)(&aclopExecuteV2_error), + (void*)(&aclopCreateHandle_error), + (void*)(&aclopDestroyHandle_error), + (void*)(&aclopExecWithHandle_error), + (void*)(&aclopCast_error), + (void*)(&aclopCreateHandleForCast_error), + (void*)(&aclopCreateKernel_error), + (void*)(&aclopRegisterCompileFunc_error), + (void*)(&aclopUnregisterCompileFunc_error), + (void*)(&aclopSetKernelArgs_error), + (void*)(&aclopSetKernelWorkspaceSizes_error), + (void*)(&aclopUpdateParams_error), + (void*)(&aclopInferShape_error), + (void*)(&aclmdlCreateDesc_error), + (void*)(&aclmdlDestroyDesc_error), + (void*)(&aclmdlGetDesc_error), + (void*)(&aclmdlGetNumInputs_error), + (void*)(&aclmdlGetNumOutputs_error), + (void*)(&aclmdlGetInputSizeByIndex_error), + (void*)(&aclmdlGetOutputSizeByIndex_error), + (void*)(&aclmdlCreateDataset_error), + (void*)(&aclmdlDestroyDataset_error), + (void*)(&aclmdlAddDatasetBuffer_error), + (void*)(&aclmdlSetDatasetTensorDesc_error), + (void*)(&aclmdlGetDatasetTensorDesc_error), + (void*)(&aclmdlGetDatasetNumBuffers_error), + (void*)(&aclmdlGetDatasetBuffer_error), + (void*)(&aclmdlLoadFromFile_error), + (void*)(&aclmdlLoadFromMem_error), + (void*)(&aclmdlLoadFromFileWithMem_error), + (void*)(&aclmdlLoadFromMemWithMem_error), + (void*)(&aclmdlLoadFromFileWithQ_error), + (void*)(&aclmdlLoadFromMemWithQ_error), + (void*)(&aclmdlExecute_error), + (void*)(&aclmdlExecuteAsync_error), + (void*)(&aclmdlUnload_error), + (void*)(&aclmdlQuerySize_error), + (void*)(&aclmdlQuerySizeFromMem_error), + (void*)(&aclmdlSetDynamicBatchSize_error), + (void*)(&aclmdlSetDynamicHWSize_error), + (void*)(&aclmdlSetInputDynamicDims_error), + (void*)(&aclmdlGetInputDims_error), + (void*)(&aclmdlGetInputDimsV2_error), + (void*)(&aclmdlGetOutputDims_error), + (void*)(&aclmdlGetCurOutputDims_error), + (void*)(&aclmdlGetOpAttr_error), + (void*)(&aclmdlGetInputNameByIndex_error), + (void*)(&aclmdlGetOutputNameByIndex_error), + (void*)(&aclmdlGetInputFormat_error), + (void*)(&aclmdlGetOutputFormat_error), + (void*)(&aclmdlGetInputDataType_error), + (void*)(&aclmdlGetOutputDataType_error), + (void*)(&aclmdlGetInputIndexByName_error), + (void*)(&aclmdlGetOutputIndexByName_error), + (void*)(&aclmdlGetDynamicBatch_error), + (void*)(&aclmdlGetDynamicHW_error), + (void*)(&aclmdlGetInputDynamicGearCount_error), + (void*)(&aclmdlGetInputDynamicDims_error), + (void*)(&aclmdlCreateAIPP_error), + (void*)(&aclmdlDestroyAIPP_error), + (void*)(&aclmdlSetAIPPInputFormat_error), + (void*)(&aclmdlSetAIPPCscParams_error), + (void*)(&aclmdlSetAIPPRbuvSwapSwitch_error), + (void*)(&aclmdlSetAIPPAxSwapSwitch_error), + (void*)(&aclmdlSetAIPPSrcImageSize_error), + (void*)(&aclmdlSetAIPPScfParams_error), + (void*)(&aclmdlSetAIPPCropParams_error), + (void*)(&aclmdlSetAIPPPaddingParams_error), + (void*)(&aclmdlSetAIPPDtcPixelMean_error), + (void*)(&aclmdlSetAIPPDtcPixelMin_error), + (void*)(&aclmdlSetAIPPPixelVarReci_error), + (void*)(&aclmdlSetInputAIPP_error), + (void*)(&aclmdlSetAIPPByInputIndex_error), + (void*)(&aclmdlGetAippType_error), + (void*)(&aclmdlGetFirstAippInfo_error), + (void*)(&aclmdlCreateAndGetOpDesc_error), + (void*)(&aclmdlInitDump_error), + (void*)(&aclmdlSetDump_error), + (void*)(&aclmdlFinalizeDump_error), + (void*)(&aclmdlLoadWithConfig_error), + (void*)(&aclmdlCreateConfigHandle_error), + (void*)(&aclmdlDestroyConfigHandle_error), + (void*)(&aclmdlSetConfigOpt_error), + (void*)(&aclmdlGetTensorRealName_error), + (void*)(&aclInit_error), + (void*)(&aclFinalize_error), + (void*)(&aclrtGetVersion_error), + (void*)(&aclGetRecentErrMsg_error)}; +static const char* const g_func_name[NR_FUNC] = {"aclFloat16ToFloat", + "aclFloatToFloat16", + "aclCreateDataBuffer", + "aclDestroyDataBuffer", + "aclUpdateDataBuffer", + "aclGetDataBufferAddr", + "aclGetDataBufferSize", + "aclGetDataBufferSizeV2", + "aclDataTypeSize", + "aclCreateTensorDesc", + "aclDestroyTensorDesc", + "aclSetTensorShapeRange", + "aclSetTensorValueRange", + "aclGetTensorDescType", + "aclGetTensorDescFormat", + "aclGetTensorDescSize", + "aclGetTensorDescElementCount", + "aclGetTensorDescNumDims", + "aclGetTensorDescDim", + "aclGetTensorDescDimV2", + "aclGetTensorDescDimRange", + "aclSetTensorDescName", + "aclGetTensorDescName", + "aclTransTensorDescFormat", + "aclSetTensorStorageFormat", + "aclSetTensorStorageShape", + "aclSetTensorFormat", + "aclSetTensorShape", + "aclSetTensorOriginFormat", + "aclSetTensorOriginShape", + "aclGetTensorDescByIndex", + "aclGetTensorDescAddress", + "aclSetTensorDynamicInput", + "aclSetTensorConst", + "aclSetTensorPlaceMent", + "aclrtGetSocName", + "aclrtSetExceptionInfoCallback", + "aclrtGetTaskIdFromExceptionInfo", + "aclrtGetStreamIdFromExceptionInfo", + "aclrtGetThreadIdFromExceptionInfo", + "aclrtGetDeviceIdFromExceptionInfo", + "aclrtSubscribeReport", + "aclrtLaunchCallback", + "aclrtProcessReport", + "aclrtUnSubscribeReport", + "aclrtCreateContext", + "aclrtDestroyContext", + "aclrtSetCurrentContext", + "aclrtGetCurrentContext", + "aclrtSetDevice", + "aclrtResetDevice", + "aclrtGetDevice", + "aclrtGetRunMode", + "aclrtSynchronizeDevice", + "aclrtSetTsDevice", + "aclrtGetDeviceCount", + "aclrtCreateEvent", + "aclrtCreateEventWithFlag", + "aclrtDestroyEvent", + "aclrtRecordEvent", + "aclrtResetEvent", + "aclrtQueryEvent", + "aclrtQueryEventStatus", + "aclrtQueryEventWaitStatus", + "aclrtSynchronizeEvent", + "aclrtEventElapsedTime", + "aclrtMalloc", + "aclrtMallocCached", + "aclrtMemFlush", + "aclrtMemInvalidate", + "aclrtFree", + "aclrtMallocHost", + "aclrtFreeHost", + "aclrtMemcpy", + "aclrtMemset", + "aclrtMemcpyAsync", + "aclrtMemcpy2d", + "aclrtMemcpy2dAsync", + "aclrtMemsetAsync", + "aclrtCreateStream", + "aclrtDestroyStream", + "aclrtSynchronizeStream", + "aclrtStreamWaitEvent", + "aclrtSetGroup", + "aclrtGetGroupCount", + "aclrtCreateGroupInfo", + "aclrtDestroyGroupInfo", + "aclrtGetAllGroupInfo", + "aclrtGetGroupInfoDetail", + "aclrtDeviceCanAccessPeer", + "aclrtDeviceEnablePeerAccess", + "aclrtDeviceDisablePeerAccess", + "aclrtGetMemInfo", + "aclrtSetOpWaitTimeout", + "aclopSetModelDir", + "aclopLoad", + "aclopCreateAttr", + "aclopDestroyAttr", + "aclopSetAttrBool", + "aclopSetAttrInt", + "aclopSetAttrFloat", + "aclopSetAttrString", + "aclopSetAttrDataType", + "aclopSetAttrListDataType", + "aclopSetAttrListBool", + "aclopSetAttrListInt", + "aclopSetAttrListFloat", + "aclopSetAttrListString", + "aclopSetAttrListListInt", + "aclopExecute", + "aclopExecuteV2", + "aclopCreateHandle", + "aclopDestroyHandle", + "aclopExecWithHandle", + "aclopCast", + "aclopCreateHandleForCast", + "aclopCreateKernel", + "aclopRegisterCompileFunc", + "aclopUnregisterCompileFunc", + "aclopSetKernelArgs", + "aclopSetKernelWorkspaceSizes", + "aclopUpdateParams", + "aclopInferShape", + "aclmdlCreateDesc", + "aclmdlDestroyDesc", + "aclmdlGetDesc", + "aclmdlGetNumInputs", + "aclmdlGetNumOutputs", + "aclmdlGetInputSizeByIndex", + "aclmdlGetOutputSizeByIndex", + "aclmdlCreateDataset", + "aclmdlDestroyDataset", + "aclmdlAddDatasetBuffer", + "aclmdlSetDatasetTensorDesc", + "aclmdlGetDatasetTensorDesc", + "aclmdlGetDatasetNumBuffers", + "aclmdlGetDatasetBuffer", + "aclmdlLoadFromFile", + "aclmdlLoadFromMem", + "aclmdlLoadFromFileWithMem", + "aclmdlLoadFromMemWithMem", + "aclmdlLoadFromFileWithQ", + "aclmdlLoadFromMemWithQ", + "aclmdlExecute", + "aclmdlExecuteAsync", + "aclmdlUnload", + "aclmdlQuerySize", + "aclmdlQuerySizeFromMem", + "aclmdlSetDynamicBatchSize", + "aclmdlSetDynamicHWSize", + "aclmdlSetInputDynamicDims", + "aclmdlGetInputDims", + "aclmdlGetInputDimsV2", + "aclmdlGetOutputDims", + "aclmdlGetCurOutputDims", + "aclmdlGetOpAttr", + "aclmdlGetInputNameByIndex", + "aclmdlGetOutputNameByIndex", + "aclmdlGetInputFormat", + "aclmdlGetOutputFormat", + "aclmdlGetInputDataType", + "aclmdlGetOutputDataType", + "aclmdlGetInputIndexByName", + "aclmdlGetOutputIndexByName", + "aclmdlGetDynamicBatch", + "aclmdlGetDynamicHW", + "aclmdlGetInputDynamicGearCount", + "aclmdlGetInputDynamicDims", + "aclmdlCreateAIPP", + "aclmdlDestroyAIPP", + "aclmdlSetAIPPInputFormat", + "aclmdlSetAIPPCscParams", + "aclmdlSetAIPPRbuvSwapSwitch", + "aclmdlSetAIPPAxSwapSwitch", + "aclmdlSetAIPPSrcImageSize", + "aclmdlSetAIPPScfParams", + "aclmdlSetAIPPCropParams", + "aclmdlSetAIPPPaddingParams", + "aclmdlSetAIPPDtcPixelMean", + "aclmdlSetAIPPDtcPixelMin", + "aclmdlSetAIPPPixelVarReci", + "aclmdlSetInputAIPP", + "aclmdlSetAIPPByInputIndex", + "aclmdlGetAippType", + "aclmdlGetFirstAippInfo", + "aclmdlCreateAndGetOpDesc", + "aclmdlInitDump", + "aclmdlSetDump", + "aclmdlFinalizeDump", + "aclmdlLoadWithConfig", + "aclmdlCreateConfigHandle", + "aclmdlDestroyConfigHandle", + "aclmdlSetConfigOpt", + "aclmdlGetTensorRealName", + "aclInit", + "aclFinalize", + "aclrtGetVersion", + "aclGetRecentErrMsg"}; + +static void load_library() { + static bool done = false; + static std::mutex mtx; + std::lock_guard lg{mtx}; + + if (done) + return; + + void* handle = get_library_handle(); + for (size_t i = 0; i < NR_FUNC; ++i) { + void* func; + if (!handle) { + func = nullptr; + } else { + func = resolve_library_func(handle, g_func_name[i]); + } + if (!func) { + func = g_func_table_error[i]; + } + __atomic_store_n(g_func_table + i, func, __ATOMIC_RELAXED); + } + done = true; +} + +float _WRAPLIB_API_CALL aclFloat16ToFloat(aclFloat16 arg0) { + typedef float (_WRAPLIB_API_CALL *f_ptr_t)(aclFloat16); + ON_ENTRY(aclFloat16ToFloat); + f_ptr_t f = (f_ptr_t)(g_func_table[0]); + return f(arg0); +} +aclFloat16 _WRAPLIB_API_CALL aclFloatToFloat16(float arg0) { + typedef aclFloat16 (_WRAPLIB_API_CALL *f_ptr_t)(float); + ON_ENTRY(aclFloatToFloat16); + f_ptr_t f = (f_ptr_t)(g_func_table[1]); + return f(arg0); +} +aclDataBuffer _WRAPLIB_API_CALL *aclCreateDataBuffer(void *arg0, size_t arg1) { + typedef aclDataBuffer *(_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t); + ON_ENTRY(aclCreateDataBuffer); + f_ptr_t f = (f_ptr_t)(g_func_table[2]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclDestroyDataBuffer(const aclDataBuffer *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclDataBuffer *); + ON_ENTRY(aclDestroyDataBuffer); + f_ptr_t f = (f_ptr_t)(g_func_table[3]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclUpdateDataBuffer(aclDataBuffer *arg0, void *arg1, size_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclDataBuffer *, void *, size_t); + ON_ENTRY(aclUpdateDataBuffer); + f_ptr_t f = (f_ptr_t)(g_func_table[4]); + return f(arg0, arg1, arg2); +} +void _WRAPLIB_API_CALL *aclGetDataBufferAddr(const aclDataBuffer *arg0) { + typedef void *(_WRAPLIB_API_CALL *f_ptr_t)(const aclDataBuffer *); + ON_ENTRY(aclGetDataBufferAddr); + f_ptr_t f = (f_ptr_t)(g_func_table[5]); + return f(arg0); +} +uint32_t _WRAPLIB_API_CALL aclGetDataBufferSize(const aclDataBuffer *arg0) { + typedef uint32_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclDataBuffer *); + ON_ENTRY(aclGetDataBufferSize); + f_ptr_t f = (f_ptr_t)(g_func_table[6]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclGetDataBufferSizeV2(const aclDataBuffer *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclDataBuffer *); + ON_ENTRY(aclGetDataBufferSizeV2); + f_ptr_t f = (f_ptr_t)(g_func_table[7]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclDataTypeSize(aclDataType arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(aclDataType); + ON_ENTRY(aclDataTypeSize); + f_ptr_t f = (f_ptr_t)(g_func_table[8]); + return f(arg0); +} +aclTensorDesc _WRAPLIB_API_CALL *aclCreateTensorDesc(aclDataType arg0, int arg1, const int64_t *arg2, aclFormat arg3) { + typedef aclTensorDesc *(_WRAPLIB_API_CALL *f_ptr_t)(aclDataType, int, const int64_t *, aclFormat); + ON_ENTRY(aclCreateTensorDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[9]); + return f(arg0, arg1, arg2, arg3); +} +void _WRAPLIB_API_CALL aclDestroyTensorDesc(const aclTensorDesc *arg0) { + typedef void (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclDestroyTensorDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[10]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclSetTensorShapeRange(aclTensorDesc *arg0, size_t arg1, int64_t arg2[][2]) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, size_t, int64_t [][2]); + ON_ENTRY(aclSetTensorShapeRange); + f_ptr_t f = (f_ptr_t)(g_func_table[11]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclSetTensorValueRange(aclTensorDesc *arg0, size_t arg1, int64_t arg2[][2]) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, size_t, int64_t [][2]); + ON_ENTRY(aclSetTensorValueRange); + f_ptr_t f = (f_ptr_t)(g_func_table[12]); + return f(arg0, arg1, arg2); +} +aclDataType _WRAPLIB_API_CALL aclGetTensorDescType(const aclTensorDesc *arg0) { + typedef aclDataType (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescType); + f_ptr_t f = (f_ptr_t)(g_func_table[13]); + return f(arg0); +} +aclFormat _WRAPLIB_API_CALL aclGetTensorDescFormat(const aclTensorDesc *arg0) { + typedef aclFormat (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[14]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclGetTensorDescSize(const aclTensorDesc *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescSize); + f_ptr_t f = (f_ptr_t)(g_func_table[15]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclGetTensorDescElementCount(const aclTensorDesc *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescElementCount); + f_ptr_t f = (f_ptr_t)(g_func_table[16]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclGetTensorDescNumDims(const aclTensorDesc *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescNumDims); + f_ptr_t f = (f_ptr_t)(g_func_table[17]); + return f(arg0); +} +int64_t _WRAPLIB_API_CALL aclGetTensorDescDim(const aclTensorDesc *arg0, size_t arg1) { + typedef int64_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *, size_t); + ON_ENTRY(aclGetTensorDescDim); + f_ptr_t f = (f_ptr_t)(g_func_table[18]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclGetTensorDescDimV2(const aclTensorDesc *arg0, size_t arg1, int64_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *, size_t, int64_t *); + ON_ENTRY(aclGetTensorDescDimV2); + f_ptr_t f = (f_ptr_t)(g_func_table[19]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclGetTensorDescDimRange(const aclTensorDesc *arg0, size_t arg1, size_t arg2, int64_t *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *, size_t, size_t, int64_t *); + ON_ENTRY(aclGetTensorDescDimRange); + f_ptr_t f = (f_ptr_t)(g_func_table[20]); + return f(arg0, arg1, arg2, arg3); +} +void _WRAPLIB_API_CALL aclSetTensorDescName(aclTensorDesc *arg0, const char *arg1) { + typedef void (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, const char *); + ON_ENTRY(aclSetTensorDescName); + f_ptr_t f = (f_ptr_t)(g_func_table[21]); + return f(arg0, arg1); +} +const char _WRAPLIB_API_CALL *aclGetTensorDescName(aclTensorDesc *arg0) { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *); + ON_ENTRY(aclGetTensorDescName); + f_ptr_t f = (f_ptr_t)(g_func_table[22]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclTransTensorDescFormat(const aclTensorDesc *arg0, aclFormat arg1, aclTensorDesc **arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *, aclFormat, aclTensorDesc **); + ON_ENTRY(aclTransTensorDescFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[23]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclSetTensorStorageFormat(aclTensorDesc *arg0, aclFormat arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, aclFormat); + ON_ENTRY(aclSetTensorStorageFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[24]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclSetTensorStorageShape(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, int, const int64_t *); + ON_ENTRY(aclSetTensorStorageShape); + f_ptr_t f = (f_ptr_t)(g_func_table[25]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclSetTensorFormat(aclTensorDesc *arg0, aclFormat arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, aclFormat); + ON_ENTRY(aclSetTensorFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[26]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclSetTensorShape(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, int, const int64_t *); + ON_ENTRY(aclSetTensorShape); + f_ptr_t f = (f_ptr_t)(g_func_table[27]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclSetTensorOriginFormat(aclTensorDesc *arg0, aclFormat arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, aclFormat); + ON_ENTRY(aclSetTensorOriginFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[28]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclSetTensorOriginShape(aclTensorDesc *arg0, int arg1, const int64_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, int, const int64_t *); + ON_ENTRY(aclSetTensorOriginShape); + f_ptr_t f = (f_ptr_t)(g_func_table[29]); + return f(arg0, arg1, arg2); +} +aclTensorDesc _WRAPLIB_API_CALL *aclGetTensorDescByIndex(aclTensorDesc *arg0, size_t arg1) { + typedef aclTensorDesc *(_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, size_t); + ON_ENTRY(aclGetTensorDescByIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[30]); + return f(arg0, arg1); +} +void _WRAPLIB_API_CALL *aclGetTensorDescAddress(const aclTensorDesc *arg0) { + typedef void *(_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *); + ON_ENTRY(aclGetTensorDescAddress); + f_ptr_t f = (f_ptr_t)(g_func_table[31]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclSetTensorDynamicInput(aclTensorDesc *arg0, const char *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, const char *); + ON_ENTRY(aclSetTensorDynamicInput); + f_ptr_t f = (f_ptr_t)(g_func_table[32]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclSetTensorConst(aclTensorDesc *arg0, void *arg1, size_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, void *, size_t); + ON_ENTRY(aclSetTensorConst); + f_ptr_t f = (f_ptr_t)(g_func_table[33]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclSetTensorPlaceMent(aclTensorDesc *arg0, aclMemType arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, aclMemType); + ON_ENTRY(aclSetTensorPlaceMent); + f_ptr_t f = (f_ptr_t)(g_func_table[34]); + return f(arg0, arg1); +} +const char _WRAPLIB_API_CALL *aclrtGetSocName() { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclrtGetSocName); + f_ptr_t f = (f_ptr_t)(g_func_table[35]); + return f(); +} +aclError _WRAPLIB_API_CALL aclrtSetExceptionInfoCallback(aclrtExceptionInfoCallback arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtExceptionInfoCallback); + ON_ENTRY(aclrtSetExceptionInfoCallback); + f_ptr_t f = (f_ptr_t)(g_func_table[36]); + return f(arg0); +} +uint32_t _WRAPLIB_API_CALL aclrtGetTaskIdFromExceptionInfo(const aclrtExceptionInfo *arg0) { + typedef uint32_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclrtExceptionInfo *); + ON_ENTRY(aclrtGetTaskIdFromExceptionInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[37]); + return f(arg0); +} +uint32_t _WRAPLIB_API_CALL aclrtGetStreamIdFromExceptionInfo(const aclrtExceptionInfo *arg0) { + typedef uint32_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclrtExceptionInfo *); + ON_ENTRY(aclrtGetStreamIdFromExceptionInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[38]); + return f(arg0); +} +uint32_t _WRAPLIB_API_CALL aclrtGetThreadIdFromExceptionInfo(const aclrtExceptionInfo *arg0) { + typedef uint32_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclrtExceptionInfo *); + ON_ENTRY(aclrtGetThreadIdFromExceptionInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[39]); + return f(arg0); +} +uint32_t _WRAPLIB_API_CALL aclrtGetDeviceIdFromExceptionInfo(const aclrtExceptionInfo *arg0) { + typedef uint32_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclrtExceptionInfo *); + ON_ENTRY(aclrtGetDeviceIdFromExceptionInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[40]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtSubscribeReport(uint64_t arg0, aclrtStream arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint64_t, aclrtStream); + ON_ENTRY(aclrtSubscribeReport); + f_ptr_t f = (f_ptr_t)(g_func_table[41]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtLaunchCallback(aclrtCallback arg0, void *arg1, aclrtCallbackBlockType arg2, aclrtStream arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtCallback, void *, aclrtCallbackBlockType, aclrtStream); + ON_ENTRY(aclrtLaunchCallback); + f_ptr_t f = (f_ptr_t)(g_func_table[42]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclrtProcessReport(int32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t); + ON_ENTRY(aclrtProcessReport); + f_ptr_t f = (f_ptr_t)(g_func_table[43]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtUnSubscribeReport(uint64_t arg0, aclrtStream arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint64_t, aclrtStream); + ON_ENTRY(aclrtUnSubscribeReport); + f_ptr_t f = (f_ptr_t)(g_func_table[44]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtCreateContext(aclrtContext *arg0, int32_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtContext *, int32_t); + ON_ENTRY(aclrtCreateContext); + f_ptr_t f = (f_ptr_t)(g_func_table[45]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtDestroyContext(aclrtContext arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtContext); + ON_ENTRY(aclrtDestroyContext); + f_ptr_t f = (f_ptr_t)(g_func_table[46]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtSetCurrentContext(aclrtContext arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtContext); + ON_ENTRY(aclrtSetCurrentContext); + f_ptr_t f = (f_ptr_t)(g_func_table[47]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetCurrentContext(aclrtContext *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtContext *); + ON_ENTRY(aclrtGetCurrentContext); + f_ptr_t f = (f_ptr_t)(g_func_table[48]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtSetDevice(int32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t); + ON_ENTRY(aclrtSetDevice); + f_ptr_t f = (f_ptr_t)(g_func_table[49]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtResetDevice(int32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t); + ON_ENTRY(aclrtResetDevice); + f_ptr_t f = (f_ptr_t)(g_func_table[50]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetDevice(int32_t *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t *); + ON_ENTRY(aclrtGetDevice); + f_ptr_t f = (f_ptr_t)(g_func_table[51]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetRunMode(aclrtRunMode *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtRunMode *); + ON_ENTRY(aclrtGetRunMode); + f_ptr_t f = (f_ptr_t)(g_func_table[52]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtSynchronizeDevice() { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclrtSynchronizeDevice); + f_ptr_t f = (f_ptr_t)(g_func_table[53]); + return f(); +} +aclError _WRAPLIB_API_CALL aclrtSetTsDevice(aclrtTsId arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtTsId); + ON_ENTRY(aclrtSetTsDevice); + f_ptr_t f = (f_ptr_t)(g_func_table[54]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetDeviceCount(uint32_t *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t *); + ON_ENTRY(aclrtGetDeviceCount); + f_ptr_t f = (f_ptr_t)(g_func_table[55]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtCreateEvent(aclrtEvent *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent *); + ON_ENTRY(aclrtCreateEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[56]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtCreateEventWithFlag(aclrtEvent *arg0, uint32_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent *, uint32_t); + ON_ENTRY(aclrtCreateEventWithFlag); + f_ptr_t f = (f_ptr_t)(g_func_table[57]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtDestroyEvent(aclrtEvent arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent); + ON_ENTRY(aclrtDestroyEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[58]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtRecordEvent(aclrtEvent arg0, aclrtStream arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent, aclrtStream); + ON_ENTRY(aclrtRecordEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[59]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtResetEvent(aclrtEvent arg0, aclrtStream arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent, aclrtStream); + ON_ENTRY(aclrtResetEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[60]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtQueryEvent(aclrtEvent arg0, aclrtEventStatus *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent, aclrtEventStatus *); + ON_ENTRY(aclrtQueryEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[61]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtQueryEventStatus(aclrtEvent arg0, aclrtEventRecordedStatus *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent, aclrtEventRecordedStatus *); + ON_ENTRY(aclrtQueryEventStatus); + f_ptr_t f = (f_ptr_t)(g_func_table[62]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtQueryEventWaitStatus(aclrtEvent arg0, aclrtEventWaitStatus *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent, aclrtEventWaitStatus *); + ON_ENTRY(aclrtQueryEventWaitStatus); + f_ptr_t f = (f_ptr_t)(g_func_table[63]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtSynchronizeEvent(aclrtEvent arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtEvent); + ON_ENTRY(aclrtSynchronizeEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[64]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtEventElapsedTime(float *arg0, aclrtEvent arg1, aclrtEvent arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(float *, aclrtEvent, aclrtEvent); + ON_ENTRY(aclrtEventElapsedTime); + f_ptr_t f = (f_ptr_t)(g_func_table[65]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclrtMalloc(void **arg0, size_t arg1, aclrtMemMallocPolicy arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void **, size_t, aclrtMemMallocPolicy); + ON_ENTRY(aclrtMalloc); + f_ptr_t f = (f_ptr_t)(g_func_table[66]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclrtMallocCached(void **arg0, size_t arg1, aclrtMemMallocPolicy arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void **, size_t, aclrtMemMallocPolicy); + ON_ENTRY(aclrtMallocCached); + f_ptr_t f = (f_ptr_t)(g_func_table[67]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclrtMemFlush(void *arg0, size_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t); + ON_ENTRY(aclrtMemFlush); + f_ptr_t f = (f_ptr_t)(g_func_table[68]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtMemInvalidate(void *arg0, size_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t); + ON_ENTRY(aclrtMemInvalidate); + f_ptr_t f = (f_ptr_t)(g_func_table[69]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtFree(void *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *); + ON_ENTRY(aclrtFree); + f_ptr_t f = (f_ptr_t)(g_func_table[70]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtMallocHost(void **arg0, size_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void **, size_t); + ON_ENTRY(aclrtMallocHost); + f_ptr_t f = (f_ptr_t)(g_func_table[71]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtFreeHost(void *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *); + ON_ENTRY(aclrtFreeHost); + f_ptr_t f = (f_ptr_t)(g_func_table[72]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtMemcpy(void *arg0, size_t arg1, const void *arg2, size_t arg3, aclrtMemcpyKind arg4) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, const void *, size_t, aclrtMemcpyKind); + ON_ENTRY(aclrtMemcpy); + f_ptr_t f = (f_ptr_t)(g_func_table[73]); + return f(arg0, arg1, arg2, arg3, arg4); +} +aclError _WRAPLIB_API_CALL aclrtMemset(void *arg0, size_t arg1, int32_t arg2, size_t arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, int32_t, size_t); + ON_ENTRY(aclrtMemset); + f_ptr_t f = (f_ptr_t)(g_func_table[74]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclrtMemcpyAsync(void *arg0, size_t arg1, const void *arg2, size_t arg3, aclrtMemcpyKind arg4, aclrtStream arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, const void *, size_t, aclrtMemcpyKind, aclrtStream); + ON_ENTRY(aclrtMemcpyAsync); + f_ptr_t f = (f_ptr_t)(g_func_table[75]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclrtMemcpy2d(void *arg0, size_t arg1, const void *arg2, size_t arg3, size_t arg4, size_t arg5, aclrtMemcpyKind arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, const void *, size_t, size_t, size_t, aclrtMemcpyKind); + ON_ENTRY(aclrtMemcpy2d); + f_ptr_t f = (f_ptr_t)(g_func_table[76]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclrtMemcpy2dAsync(void *arg0, size_t arg1, const void *arg2, size_t arg3, size_t arg4, size_t arg5, aclrtMemcpyKind arg6, aclrtStream arg7) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, const void *, size_t, size_t, size_t, aclrtMemcpyKind, aclrtStream); + ON_ENTRY(aclrtMemcpy2dAsync); + f_ptr_t f = (f_ptr_t)(g_func_table[77]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7); +} +aclError _WRAPLIB_API_CALL aclrtMemsetAsync(void *arg0, size_t arg1, int32_t arg2, size_t arg3, aclrtStream arg4) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(void *, size_t, int32_t, size_t, aclrtStream); + ON_ENTRY(aclrtMemsetAsync); + f_ptr_t f = (f_ptr_t)(g_func_table[78]); + return f(arg0, arg1, arg2, arg3, arg4); +} +aclError _WRAPLIB_API_CALL aclrtCreateStream(aclrtStream *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtStream *); + ON_ENTRY(aclrtCreateStream); + f_ptr_t f = (f_ptr_t)(g_func_table[79]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtDestroyStream(aclrtStream arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtStream); + ON_ENTRY(aclrtDestroyStream); + f_ptr_t f = (f_ptr_t)(g_func_table[80]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtSynchronizeStream(aclrtStream arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtStream); + ON_ENTRY(aclrtSynchronizeStream); + f_ptr_t f = (f_ptr_t)(g_func_table[81]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtStreamWaitEvent(aclrtStream arg0, aclrtEvent arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtStream, aclrtEvent); + ON_ENTRY(aclrtStreamWaitEvent); + f_ptr_t f = (f_ptr_t)(g_func_table[82]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtSetGroup(int32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t); + ON_ENTRY(aclrtSetGroup); + f_ptr_t f = (f_ptr_t)(g_func_table[83]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetGroupCount(uint32_t *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t *); + ON_ENTRY(aclrtGetGroupCount); + f_ptr_t f = (f_ptr_t)(g_func_table[84]); + return f(arg0); +} +aclrtGroupInfo _WRAPLIB_API_CALL *aclrtCreateGroupInfo() { + typedef aclrtGroupInfo *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclrtCreateGroupInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[85]); + return f(); +} +aclError _WRAPLIB_API_CALL aclrtDestroyGroupInfo(aclrtGroupInfo *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtGroupInfo *); + ON_ENTRY(aclrtDestroyGroupInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[86]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetAllGroupInfo(aclrtGroupInfo *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtGroupInfo *); + ON_ENTRY(aclrtGetAllGroupInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[87]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetGroupInfoDetail(const aclrtGroupInfo *arg0, int32_t arg1, aclrtGroupAttr arg2, void *arg3, size_t arg4, size_t *arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclrtGroupInfo *, int32_t, aclrtGroupAttr, void *, size_t, size_t *); + ON_ENTRY(aclrtGetGroupInfoDetail); + f_ptr_t f = (f_ptr_t)(g_func_table[88]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclrtDeviceCanAccessPeer(int32_t *arg0, int32_t arg1, int32_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t *, int32_t, int32_t); + ON_ENTRY(aclrtDeviceCanAccessPeer); + f_ptr_t f = (f_ptr_t)(g_func_table[89]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclrtDeviceEnablePeerAccess(int32_t arg0, uint32_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t, uint32_t); + ON_ENTRY(aclrtDeviceEnablePeerAccess); + f_ptr_t f = (f_ptr_t)(g_func_table[90]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclrtDeviceDisablePeerAccess(int32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t); + ON_ENTRY(aclrtDeviceDisablePeerAccess); + f_ptr_t f = (f_ptr_t)(g_func_table[91]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclrtGetMemInfo(aclrtMemAttr arg0, size_t *arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclrtMemAttr, size_t *, size_t *); + ON_ENTRY(aclrtGetMemInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[92]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclrtSetOpWaitTimeout(uint32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t); + ON_ENTRY(aclrtSetOpWaitTimeout); + f_ptr_t f = (f_ptr_t)(g_func_table[93]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclopSetModelDir(const char *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *); + ON_ENTRY(aclopSetModelDir); + f_ptr_t f = (f_ptr_t)(g_func_table[94]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclopLoad(const void *arg0, size_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const void *, size_t); + ON_ENTRY(aclopLoad); + f_ptr_t f = (f_ptr_t)(g_func_table[95]); + return f(arg0, arg1); +} +aclopAttr _WRAPLIB_API_CALL *aclopCreateAttr() { + typedef aclopAttr *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclopCreateAttr); + f_ptr_t f = (f_ptr_t)(g_func_table[96]); + return f(); +} +void _WRAPLIB_API_CALL aclopDestroyAttr(const aclopAttr *arg0) { + typedef void (_WRAPLIB_API_CALL *f_ptr_t)(const aclopAttr *); + ON_ENTRY(aclopDestroyAttr); + f_ptr_t f = (f_ptr_t)(g_func_table[97]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclopSetAttrBool(aclopAttr *arg0, const char *arg1, uint8_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, uint8_t); + ON_ENTRY(aclopSetAttrBool); + f_ptr_t f = (f_ptr_t)(g_func_table[98]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopSetAttrInt(aclopAttr *arg0, const char *arg1, int64_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int64_t); + ON_ENTRY(aclopSetAttrInt); + f_ptr_t f = (f_ptr_t)(g_func_table[99]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopSetAttrFloat(aclopAttr *arg0, const char *arg1, float arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, float); + ON_ENTRY(aclopSetAttrFloat); + f_ptr_t f = (f_ptr_t)(g_func_table[100]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopSetAttrString(aclopAttr *arg0, const char *arg1, const char *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, const char *); + ON_ENTRY(aclopSetAttrString); + f_ptr_t f = (f_ptr_t)(g_func_table[101]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopSetAttrDataType(aclopAttr *arg0, const char *arg1, aclDataType arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, aclDataType); + ON_ENTRY(aclopSetAttrDataType); + f_ptr_t f = (f_ptr_t)(g_func_table[102]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListDataType(aclopAttr *arg0, const char *arg1, int arg2, const aclDataType arg3[]) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const aclDataType []); + ON_ENTRY(aclopSetAttrListDataType); + f_ptr_t f = (f_ptr_t)(g_func_table[103]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListBool(aclopAttr *arg0, const char *arg1, int arg2, const uint8_t *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const uint8_t *); + ON_ENTRY(aclopSetAttrListBool); + f_ptr_t f = (f_ptr_t)(g_func_table[104]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListInt(aclopAttr *arg0, const char *arg1, int arg2, const int64_t *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const int64_t *); + ON_ENTRY(aclopSetAttrListInt); + f_ptr_t f = (f_ptr_t)(g_func_table[105]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListFloat(aclopAttr *arg0, const char *arg1, int arg2, const float *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const float *); + ON_ENTRY(aclopSetAttrListFloat); + f_ptr_t f = (f_ptr_t)(g_func_table[106]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListString(aclopAttr *arg0, const char *arg1, int arg2, const char **arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const char **); + ON_ENTRY(aclopSetAttrListString); + f_ptr_t f = (f_ptr_t)(g_func_table[107]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopSetAttrListListInt(aclopAttr *arg0, const char *arg1, int arg2, const int *arg3, const int64_t * const arg4[]) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopAttr *, const char *, int, const int *, const int64_t * const []); + ON_ENTRY(aclopSetAttrListListInt); + f_ptr_t f = (f_ptr_t)(g_func_table[108]); + return f(arg0, arg1, arg2, arg3, arg4); +} +aclError _WRAPLIB_API_CALL aclopExecute(const char *arg0, int arg1, const aclTensorDesc * const arg2[], const aclDataBuffer * const arg3[], int arg4, const aclTensorDesc * const arg5[], aclDataBuffer * const arg6[], const aclopAttr *arg7, aclrtStream arg8) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, int, const aclTensorDesc * const [], const aclDataBuffer * const [], int, const aclTensorDesc * const [], aclDataBuffer * const [], const aclopAttr *, aclrtStream); + ON_ENTRY(aclopExecute); + f_ptr_t f = (f_ptr_t)(g_func_table[109]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +aclError _WRAPLIB_API_CALL aclopExecuteV2(const char *arg0, int arg1, aclTensorDesc *arg2[], aclDataBuffer *arg3[], int arg4, aclTensorDesc *arg5[], aclDataBuffer *arg6[], aclopAttr *arg7, aclrtStream arg8) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, int, aclTensorDesc *[], aclDataBuffer *[], int, aclTensorDesc *[], aclDataBuffer *[], aclopAttr *, aclrtStream); + ON_ENTRY(aclopExecuteV2); + f_ptr_t f = (f_ptr_t)(g_func_table[110]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +aclError _WRAPLIB_API_CALL aclopCreateHandle(const char *arg0, int arg1, const aclTensorDesc * const arg2[], int arg3, const aclTensorDesc * const arg4[], const aclopAttr *arg5, aclopHandle **arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, int, const aclTensorDesc * const [], int, const aclTensorDesc * const [], const aclopAttr *, aclopHandle **); + ON_ENTRY(aclopCreateHandle); + f_ptr_t f = (f_ptr_t)(g_func_table[111]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +void _WRAPLIB_API_CALL aclopDestroyHandle(aclopHandle *arg0) { + typedef void (_WRAPLIB_API_CALL *f_ptr_t)(aclopHandle *); + ON_ENTRY(aclopDestroyHandle); + f_ptr_t f = (f_ptr_t)(g_func_table[112]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclopExecWithHandle(aclopHandle *arg0, int arg1, const aclDataBuffer * const arg2[], int arg3, aclDataBuffer * const arg4[], aclrtStream arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopHandle *, int, const aclDataBuffer * const [], int, aclDataBuffer * const [], aclrtStream); + ON_ENTRY(aclopExecWithHandle); + f_ptr_t f = (f_ptr_t)(g_func_table[113]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclopCast(const aclTensorDesc *arg0, const aclDataBuffer *arg1, const aclTensorDesc *arg2, aclDataBuffer *arg3, uint8_t arg4, aclrtStream arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclTensorDesc *, const aclDataBuffer *, const aclTensorDesc *, aclDataBuffer *, uint8_t, aclrtStream); + ON_ENTRY(aclopCast); + f_ptr_t f = (f_ptr_t)(g_func_table[114]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclopCreateHandleForCast(aclTensorDesc *arg0, aclTensorDesc *arg1, uint8_t arg2, aclopHandle **arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclTensorDesc *, aclTensorDesc *, uint8_t, aclopHandle **); + ON_ENTRY(aclopCreateHandleForCast); + f_ptr_t f = (f_ptr_t)(g_func_table[115]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclopCreateKernel(const char *arg0, const char *arg1, const char *arg2, void *arg3, int arg4, aclopEngineType arg5, aclDataDeallocator arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, const char *, const char *, void *, int, aclopEngineType, aclDataDeallocator); + ON_ENTRY(aclopCreateKernel); + f_ptr_t f = (f_ptr_t)(g_func_table[116]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclopRegisterCompileFunc(const char *arg0, aclopCompileFunc arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, aclopCompileFunc); + ON_ENTRY(aclopRegisterCompileFunc); + f_ptr_t f = (f_ptr_t)(g_func_table[117]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclopUnregisterCompileFunc(const char *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *); + ON_ENTRY(aclopUnregisterCompileFunc); + f_ptr_t f = (f_ptr_t)(g_func_table[118]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclopSetKernelArgs(aclopKernelDesc *arg0, const char *arg1, uint32_t arg2, const void *arg3, uint32_t arg4) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopKernelDesc *, const char *, uint32_t, const void *, uint32_t); + ON_ENTRY(aclopSetKernelArgs); + f_ptr_t f = (f_ptr_t)(g_func_table[119]); + return f(arg0, arg1, arg2, arg3, arg4); +} +aclError _WRAPLIB_API_CALL aclopSetKernelWorkspaceSizes(aclopKernelDesc *arg0, int arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclopKernelDesc *, int, size_t *); + ON_ENTRY(aclopSetKernelWorkspaceSizes); + f_ptr_t f = (f_ptr_t)(g_func_table[120]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclopUpdateParams(const char *arg0, int arg1, const aclTensorDesc * const arg2[], int arg3, const aclTensorDesc * const arg4[], const aclopAttr *arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, int, const aclTensorDesc * const [], int, const aclTensorDesc * const [], const aclopAttr *); + ON_ENTRY(aclopUpdateParams); + f_ptr_t f = (f_ptr_t)(g_func_table[121]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclopInferShape(const char *arg0, int arg1, aclTensorDesc *arg2[], aclDataBuffer *arg3[], int arg4, aclTensorDesc *arg5[], aclopAttr *arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, int, aclTensorDesc *[], aclDataBuffer *[], int, aclTensorDesc *[], aclopAttr *); + ON_ENTRY(aclopInferShape); + f_ptr_t f = (f_ptr_t)(g_func_table[122]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclmdlDesc _WRAPLIB_API_CALL *aclmdlCreateDesc() { + typedef aclmdlDesc *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclmdlCreateDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[123]); + return f(); +} +aclError _WRAPLIB_API_CALL aclmdlDestroyDesc(aclmdlDesc *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *); + ON_ENTRY(aclmdlDestroyDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[124]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlGetDesc(aclmdlDesc *arg0, uint32_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *, uint32_t); + ON_ENTRY(aclmdlGetDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[125]); + return f(arg0, arg1); +} +size_t _WRAPLIB_API_CALL aclmdlGetNumInputs(aclmdlDesc *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *); + ON_ENTRY(aclmdlGetNumInputs); + f_ptr_t f = (f_ptr_t)(g_func_table[126]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclmdlGetNumOutputs(aclmdlDesc *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *); + ON_ENTRY(aclmdlGetNumOutputs); + f_ptr_t f = (f_ptr_t)(g_func_table[127]); + return f(arg0); +} +size_t _WRAPLIB_API_CALL aclmdlGetInputSizeByIndex(aclmdlDesc *arg0, size_t arg1) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetInputSizeByIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[128]); + return f(arg0, arg1); +} +size_t _WRAPLIB_API_CALL aclmdlGetOutputSizeByIndex(aclmdlDesc *arg0, size_t arg1) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetOutputSizeByIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[129]); + return f(arg0, arg1); +} +aclmdlDataset _WRAPLIB_API_CALL *aclmdlCreateDataset() { + typedef aclmdlDataset *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclmdlCreateDataset); + f_ptr_t f = (f_ptr_t)(g_func_table[130]); + return f(); +} +aclError _WRAPLIB_API_CALL aclmdlDestroyDataset(const aclmdlDataset *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDataset *); + ON_ENTRY(aclmdlDestroyDataset); + f_ptr_t f = (f_ptr_t)(g_func_table[131]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlAddDatasetBuffer(aclmdlDataset *arg0, aclDataBuffer *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDataset *, aclDataBuffer *); + ON_ENTRY(aclmdlAddDatasetBuffer); + f_ptr_t f = (f_ptr_t)(g_func_table[132]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlSetDatasetTensorDesc(aclmdlDataset *arg0, aclTensorDesc *arg1, size_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDataset *, aclTensorDesc *, size_t); + ON_ENTRY(aclmdlSetDatasetTensorDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[133]); + return f(arg0, arg1, arg2); +} +aclTensorDesc _WRAPLIB_API_CALL *aclmdlGetDatasetTensorDesc(const aclmdlDataset *arg0, size_t arg1) { + typedef aclTensorDesc *(_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDataset *, size_t); + ON_ENTRY(aclmdlGetDatasetTensorDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[134]); + return f(arg0, arg1); +} +size_t _WRAPLIB_API_CALL aclmdlGetDatasetNumBuffers(const aclmdlDataset *arg0) { + typedef size_t (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDataset *); + ON_ENTRY(aclmdlGetDatasetNumBuffers); + f_ptr_t f = (f_ptr_t)(g_func_table[135]); + return f(arg0); +} +aclDataBuffer _WRAPLIB_API_CALL *aclmdlGetDatasetBuffer(const aclmdlDataset *arg0, size_t arg1) { + typedef aclDataBuffer *(_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDataset *, size_t); + ON_ENTRY(aclmdlGetDatasetBuffer); + f_ptr_t f = (f_ptr_t)(g_func_table[136]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromFile(const char *arg0, uint32_t *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, uint32_t *); + ON_ENTRY(aclmdlLoadFromFile); + f_ptr_t f = (f_ptr_t)(g_func_table[137]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromMem(const void *arg0, size_t arg1, uint32_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const void *, size_t, uint32_t *); + ON_ENTRY(aclmdlLoadFromMem); + f_ptr_t f = (f_ptr_t)(g_func_table[138]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithMem(const char *arg0, uint32_t *arg1, void *arg2, size_t arg3, void *arg4, size_t arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, uint32_t *, void *, size_t, void *, size_t); + ON_ENTRY(aclmdlLoadFromFileWithMem); + f_ptr_t f = (f_ptr_t)(g_func_table[139]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithMem(const void *arg0, size_t arg1, uint32_t *arg2, void *arg3, size_t arg4, void *arg5, size_t arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const void *, size_t, uint32_t *, void *, size_t, void *, size_t); + ON_ENTRY(aclmdlLoadFromMemWithMem); + f_ptr_t f = (f_ptr_t)(g_func_table[140]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromFileWithQ(const char *arg0, uint32_t *arg1, const uint32_t *arg2, size_t arg3, const uint32_t *arg4, size_t arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, uint32_t *, const uint32_t *, size_t, const uint32_t *, size_t); + ON_ENTRY(aclmdlLoadFromFileWithQ); + f_ptr_t f = (f_ptr_t)(g_func_table[141]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclmdlLoadFromMemWithQ(const void *arg0, size_t arg1, uint32_t *arg2, const uint32_t *arg3, size_t arg4, const uint32_t *arg5, size_t arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const void *, size_t, uint32_t *, const uint32_t *, size_t, const uint32_t *, size_t); + ON_ENTRY(aclmdlLoadFromMemWithQ); + f_ptr_t f = (f_ptr_t)(g_func_table[142]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclmdlExecute(uint32_t arg0, const aclmdlDataset *arg1, aclmdlDataset *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, const aclmdlDataset *, aclmdlDataset *); + ON_ENTRY(aclmdlExecute); + f_ptr_t f = (f_ptr_t)(g_func_table[143]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlExecuteAsync(uint32_t arg0, const aclmdlDataset *arg1, aclmdlDataset *arg2, aclrtStream arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, const aclmdlDataset *, aclmdlDataset *, aclrtStream); + ON_ENTRY(aclmdlExecuteAsync); + f_ptr_t f = (f_ptr_t)(g_func_table[144]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlUnload(uint32_t arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t); + ON_ENTRY(aclmdlUnload); + f_ptr_t f = (f_ptr_t)(g_func_table[145]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlQuerySize(const char *arg0, size_t *arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *, size_t *, size_t *); + ON_ENTRY(aclmdlQuerySize); + f_ptr_t f = (f_ptr_t)(g_func_table[146]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlQuerySizeFromMem(const void *arg0, size_t arg1, size_t *arg2, size_t *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const void *, size_t, size_t *, size_t *); + ON_ENTRY(aclmdlQuerySizeFromMem); + f_ptr_t f = (f_ptr_t)(g_func_table[147]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlSetDynamicBatchSize(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, uint64_t arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, aclmdlDataset *, size_t, uint64_t); + ON_ENTRY(aclmdlSetDynamicBatchSize); + f_ptr_t f = (f_ptr_t)(g_func_table[148]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlSetDynamicHWSize(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, uint64_t arg3, uint64_t arg4) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, aclmdlDataset *, size_t, uint64_t, uint64_t); + ON_ENTRY(aclmdlSetDynamicHWSize); + f_ptr_t f = (f_ptr_t)(g_func_table[149]); + return f(arg0, arg1, arg2, arg3, arg4); +} +aclError _WRAPLIB_API_CALL aclmdlSetInputDynamicDims(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlIODims *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, aclmdlDataset *, size_t, const aclmdlIODims *); + ON_ENTRY(aclmdlSetInputDynamicDims); + f_ptr_t f = (f_ptr_t)(g_func_table[150]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlGetInputDims(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlIODims *); + ON_ENTRY(aclmdlGetInputDims); + f_ptr_t f = (f_ptr_t)(g_func_table[151]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetInputDimsV2(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlIODims *); + ON_ENTRY(aclmdlGetInputDimsV2); + f_ptr_t f = (f_ptr_t)(g_func_table[152]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetOutputDims(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlIODims *); + ON_ENTRY(aclmdlGetOutputDims); + f_ptr_t f = (f_ptr_t)(g_func_table[153]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetCurOutputDims(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlIODims *); + ON_ENTRY(aclmdlGetCurOutputDims); + f_ptr_t f = (f_ptr_t)(g_func_table[154]); + return f(arg0, arg1, arg2); +} +const char _WRAPLIB_API_CALL *aclmdlGetOpAttr(aclmdlDesc *arg0, const char *arg1, const char *arg2) { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(aclmdlDesc *, const char *, const char *); + ON_ENTRY(aclmdlGetOpAttr); + f_ptr_t f = (f_ptr_t)(g_func_table[155]); + return f(arg0, arg1, arg2); +} +const char _WRAPLIB_API_CALL *aclmdlGetInputNameByIndex(const aclmdlDesc *arg0, size_t arg1) { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetInputNameByIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[156]); + return f(arg0, arg1); +} +const char _WRAPLIB_API_CALL *aclmdlGetOutputNameByIndex(const aclmdlDesc *arg0, size_t arg1) { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetOutputNameByIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[157]); + return f(arg0, arg1); +} +aclFormat _WRAPLIB_API_CALL aclmdlGetInputFormat(const aclmdlDesc *arg0, size_t arg1) { + typedef aclFormat (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetInputFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[158]); + return f(arg0, arg1); +} +aclFormat _WRAPLIB_API_CALL aclmdlGetOutputFormat(const aclmdlDesc *arg0, size_t arg1) { + typedef aclFormat (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetOutputFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[159]); + return f(arg0, arg1); +} +aclDataType _WRAPLIB_API_CALL aclmdlGetInputDataType(const aclmdlDesc *arg0, size_t arg1) { + typedef aclDataType (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetInputDataType); + f_ptr_t f = (f_ptr_t)(g_func_table[160]); + return f(arg0, arg1); +} +aclDataType _WRAPLIB_API_CALL aclmdlGetOutputDataType(const aclmdlDesc *arg0, size_t arg1) { + typedef aclDataType (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t); + ON_ENTRY(aclmdlGetOutputDataType); + f_ptr_t f = (f_ptr_t)(g_func_table[161]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlGetInputIndexByName(const aclmdlDesc *arg0, const char *arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, const char *, size_t *); + ON_ENTRY(aclmdlGetInputIndexByName); + f_ptr_t f = (f_ptr_t)(g_func_table[162]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetOutputIndexByName(const aclmdlDesc *arg0, const char *arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, const char *, size_t *); + ON_ENTRY(aclmdlGetOutputIndexByName); + f_ptr_t f = (f_ptr_t)(g_func_table[163]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetDynamicBatch(const aclmdlDesc *arg0, aclmdlBatch *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, aclmdlBatch *); + ON_ENTRY(aclmdlGetDynamicBatch); + f_ptr_t f = (f_ptr_t)(g_func_table[164]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlGetDynamicHW(const aclmdlDesc *arg0, size_t arg1, aclmdlHW *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlHW *); + ON_ENTRY(aclmdlGetDynamicHW); + f_ptr_t f = (f_ptr_t)(g_func_table[165]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicGearCount(const aclmdlDesc *arg0, size_t arg1, size_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, size_t *); + ON_ENTRY(aclmdlGetInputDynamicGearCount); + f_ptr_t f = (f_ptr_t)(g_func_table[166]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlGetInputDynamicDims(const aclmdlDesc *arg0, size_t arg1, aclmdlIODims *arg2, size_t arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, size_t, aclmdlIODims *, size_t); + ON_ENTRY(aclmdlGetInputDynamicDims); + f_ptr_t f = (f_ptr_t)(g_func_table[167]); + return f(arg0, arg1, arg2, arg3); +} +aclmdlAIPP _WRAPLIB_API_CALL *aclmdlCreateAIPP(uint64_t arg0) { + typedef aclmdlAIPP *(_WRAPLIB_API_CALL *f_ptr_t)(uint64_t); + ON_ENTRY(aclmdlCreateAIPP); + f_ptr_t f = (f_ptr_t)(g_func_table[168]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlDestroyAIPP(const aclmdlAIPP *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlAIPP *); + ON_ENTRY(aclmdlDestroyAIPP); + f_ptr_t f = (f_ptr_t)(g_func_table[169]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPInputFormat(aclmdlAIPP *arg0, aclAippInputFormat arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, aclAippInputFormat); + ON_ENTRY(aclmdlSetAIPPInputFormat); + f_ptr_t f = (f_ptr_t)(g_func_table[170]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPCscParams(aclmdlAIPP *arg0, int8_t arg1, int16_t arg2, int16_t arg3, int16_t arg4, int16_t arg5, int16_t arg6, int16_t arg7, int16_t arg8, int16_t arg9, int16_t arg10, uint8_t arg11, uint8_t arg12, uint8_t arg13, uint8_t arg14, uint8_t arg15, uint8_t arg16) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, int16_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t, uint8_t); + ON_ENTRY(aclmdlSetAIPPCscParams); + f_ptr_t f = (f_ptr_t)(g_func_table[171]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPRbuvSwapSwitch(aclmdlAIPP *arg0, int8_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t); + ON_ENTRY(aclmdlSetAIPPRbuvSwapSwitch); + f_ptr_t f = (f_ptr_t)(g_func_table[172]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPAxSwapSwitch(aclmdlAIPP *arg0, int8_t arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t); + ON_ENTRY(aclmdlSetAIPPAxSwapSwitch); + f_ptr_t f = (f_ptr_t)(g_func_table[173]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPSrcImageSize(aclmdlAIPP *arg0, int32_t arg1, int32_t arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int32_t, int32_t); + ON_ENTRY(aclmdlSetAIPPSrcImageSize); + f_ptr_t f = (f_ptr_t)(g_func_table[174]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPScfParams(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t); + ON_ENTRY(aclmdlSetAIPPScfParams); + f_ptr_t f = (f_ptr_t)(g_func_table[175]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPCropParams(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t); + ON_ENTRY(aclmdlSetAIPPCropParams); + f_ptr_t f = (f_ptr_t)(g_func_table[176]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPPaddingParams(aclmdlAIPP *arg0, int8_t arg1, int32_t arg2, int32_t arg3, int32_t arg4, int32_t arg5, uint64_t arg6) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int8_t, int32_t, int32_t, int32_t, int32_t, uint64_t); + ON_ENTRY(aclmdlSetAIPPPaddingParams); + f_ptr_t f = (f_ptr_t)(g_func_table[177]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMean(aclmdlAIPP *arg0, int16_t arg1, int16_t arg2, int16_t arg3, int16_t arg4, uint64_t arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, int16_t, int16_t, int16_t, int16_t, uint64_t); + ON_ENTRY(aclmdlSetAIPPDtcPixelMean); + f_ptr_t f = (f_ptr_t)(g_func_table[178]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPDtcPixelMin(aclmdlAIPP *arg0, float arg1, float arg2, float arg3, float arg4, uint64_t arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, float, float, float, float, uint64_t); + ON_ENTRY(aclmdlSetAIPPDtcPixelMin); + f_ptr_t f = (f_ptr_t)(g_func_table[179]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPPixelVarReci(aclmdlAIPP *arg0, float arg1, float arg2, float arg3, float arg4, uint64_t arg5) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlAIPP *, float, float, float, float, uint64_t); + ON_ENTRY(aclmdlSetAIPPPixelVarReci); + f_ptr_t f = (f_ptr_t)(g_func_table[180]); + return f(arg0, arg1, arg2, arg3, arg4, arg5); +} +aclError _WRAPLIB_API_CALL aclmdlSetInputAIPP(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlAIPP *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, aclmdlDataset *, size_t, const aclmdlAIPP *); + ON_ENTRY(aclmdlSetInputAIPP); + f_ptr_t f = (f_ptr_t)(g_func_table[181]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlSetAIPPByInputIndex(uint32_t arg0, aclmdlDataset *arg1, size_t arg2, const aclmdlAIPP *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, aclmdlDataset *, size_t, const aclmdlAIPP *); + ON_ENTRY(aclmdlSetAIPPByInputIndex); + f_ptr_t f = (f_ptr_t)(g_func_table[182]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlGetAippType(uint32_t arg0, size_t arg1, aclmdlInputAippType *arg2, size_t *arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, size_t, aclmdlInputAippType *, size_t *); + ON_ENTRY(aclmdlGetAippType); + f_ptr_t f = (f_ptr_t)(g_func_table[183]); + return f(arg0, arg1, arg2, arg3); +} +aclError _WRAPLIB_API_CALL aclmdlGetFirstAippInfo(uint32_t arg0, size_t arg1, aclAippInfo *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, size_t, aclAippInfo *); + ON_ENTRY(aclmdlGetFirstAippInfo); + f_ptr_t f = (f_ptr_t)(g_func_table[184]); + return f(arg0, arg1, arg2); +} +aclError _WRAPLIB_API_CALL aclmdlCreateAndGetOpDesc(uint32_t arg0, uint32_t arg1, uint32_t arg2, char *arg3, size_t arg4, aclTensorDesc **arg5, size_t *arg6, aclTensorDesc **arg7, size_t *arg8) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(uint32_t, uint32_t, uint32_t, char *, size_t, aclTensorDesc **, size_t *, aclTensorDesc **, size_t *); + ON_ENTRY(aclmdlCreateAndGetOpDesc); + f_ptr_t f = (f_ptr_t)(g_func_table[185]); + return f(arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8); +} +aclError _WRAPLIB_API_CALL aclmdlInitDump() { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclmdlInitDump); + f_ptr_t f = (f_ptr_t)(g_func_table[186]); + return f(); +} +aclError _WRAPLIB_API_CALL aclmdlSetDump(const char *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *); + ON_ENTRY(aclmdlSetDump); + f_ptr_t f = (f_ptr_t)(g_func_table[187]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlFinalizeDump() { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclmdlFinalizeDump); + f_ptr_t f = (f_ptr_t)(g_func_table[188]); + return f(); +} +aclError _WRAPLIB_API_CALL aclmdlLoadWithConfig(const aclmdlConfigHandle *arg0, uint32_t *arg1) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlConfigHandle *, uint32_t *); + ON_ENTRY(aclmdlLoadWithConfig); + f_ptr_t f = (f_ptr_t)(g_func_table[189]); + return f(arg0, arg1); +} +aclmdlConfigHandle _WRAPLIB_API_CALL *aclmdlCreateConfigHandle() { + typedef aclmdlConfigHandle *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclmdlCreateConfigHandle); + f_ptr_t f = (f_ptr_t)(g_func_table[190]); + return f(); +} +aclError _WRAPLIB_API_CALL aclmdlDestroyConfigHandle(aclmdlConfigHandle *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlConfigHandle *); + ON_ENTRY(aclmdlDestroyConfigHandle); + f_ptr_t f = (f_ptr_t)(g_func_table[191]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclmdlSetConfigOpt(aclmdlConfigHandle *arg0, aclmdlConfigAttr arg1, const void *arg2, size_t arg3) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(aclmdlConfigHandle *, aclmdlConfigAttr, const void *, size_t); + ON_ENTRY(aclmdlSetConfigOpt); + f_ptr_t f = (f_ptr_t)(g_func_table[192]); + return f(arg0, arg1, arg2, arg3); +} +const char _WRAPLIB_API_CALL *aclmdlGetTensorRealName(const aclmdlDesc *arg0, const char *arg1) { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(const aclmdlDesc *, const char *); + ON_ENTRY(aclmdlGetTensorRealName); + f_ptr_t f = (f_ptr_t)(g_func_table[193]); + return f(arg0, arg1); +} +aclError _WRAPLIB_API_CALL aclInit(const char *arg0) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(const char *); + ON_ENTRY(aclInit); + f_ptr_t f = (f_ptr_t)(g_func_table[194]); + return f(arg0); +} +aclError _WRAPLIB_API_CALL aclFinalize() { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclFinalize); + f_ptr_t f = (f_ptr_t)(g_func_table[195]); + return f(); +} +aclError _WRAPLIB_API_CALL aclrtGetVersion(int32_t *arg0, int32_t *arg1, int32_t *arg2) { + typedef aclError (_WRAPLIB_API_CALL *f_ptr_t)(int32_t *, int32_t *, int32_t *); + ON_ENTRY(aclrtGetVersion); + f_ptr_t f = (f_ptr_t)(g_func_table[196]); + return f(arg0, arg1, arg2); +} +const char _WRAPLIB_API_CALL *aclGetRecentErrMsg() { + typedef const char *(_WRAPLIB_API_CALL *f_ptr_t)(); + ON_ENTRY(aclGetRecentErrMsg); + f_ptr_t f = (f_ptr_t)(g_func_table[197]); + return f(); +} diff --git a/dnn/src/atlas/megcore/public_api/computing.cpp b/dnn/src/atlas/megcore/public_api/computing.cpp index 68d8793a8..9e6ec61e1 100644 --- a/dnn/src/atlas/megcore/public_api/computing.cpp +++ b/dnn/src/atlas/megcore/public_api/computing.cpp @@ -53,7 +53,6 @@ const char* megcore::atlas::get_error_str(aclError error) { switch (error) { ERROR(ACL_ERROR_NONE); - ERROR(ACL_ERROR_INVALID_PARAM); ERROR(ACL_ERROR_UNINITIALIZE); ERROR(ACL_ERROR_REPEAT_INITIALIZE); @@ -93,7 +92,19 @@ const char* megcore::atlas::get_error_str(aclError error) { ERROR(ACL_ERROR_WAIT_CALLBACK_TIMEOUT); ERROR(ACL_ERROR_REPEAT_FINALIZE); ERROR(ACL_ERROR_NOT_STATIC_AIPP); - + ERROR(ACL_ERROR_COMPILING_STUB_MODE); + ERROR(ACL_ERROR_GROUP_NOT_SET); + ERROR(ACL_ERROR_GROUP_NOT_CREATE); + ERROR(ACL_ERROR_PROF_ALREADY_RUN); + ERROR(ACL_ERROR_PROF_NOT_RUN); + ERROR(ACL_ERROR_DUMP_ALREADY_RUN); + ERROR(ACL_ERROR_DUMP_NOT_RUN); + ERROR(ACL_ERROR_PROF_REPEAT_SUBSCRIBE); + ERROR(ACL_ERROR_PROF_API_CONFLICT); + ERROR(ACL_ERROR_INVALID_MAX_OPQUEUE_NUM_CONFIG); + ERROR(ACL_ERROR_INVALID_OPP_PATH); + ERROR(ACL_ERROR_OP_UNSUPPORTED_DYNAMIC); + ERROR(ACL_ERROR_RELATIVE_RESOURCE_NOT_CLEARED); ERROR(ACL_ERROR_BAD_ALLOC); ERROR(ACL_ERROR_API_NOT_SUPPORT); ERROR(ACL_ERROR_INVALID_DEVICE); @@ -101,9 +112,8 @@ const char* megcore::atlas::get_error_str(aclError error) { ERROR(ACL_ERROR_RESOURCE_NOT_MATCH); ERROR(ACL_ERROR_INVALID_RESOURCE_HANDLE); ERROR(ACL_ERROR_FEATURE_UNSUPPORTED); - + ERROR(ACL_ERROR_PROF_MODULES_UNSUPPORTED); ERROR(ACL_ERROR_STORAGE_OVER_LIMIT); - ERROR(ACL_ERROR_INTERNAL_ERROR); ERROR(ACL_ERROR_FAILURE); ERROR(ACL_ERROR_GE_FAILURE); @@ -111,6 +121,123 @@ const char* megcore::atlas::get_error_str(aclError error) { ERROR(ACL_ERROR_DRV_FAILURE); ERROR(ACL_ERROR_PROFILING_FAILURE); + ERROR(ACL_ERROR_GE_PARAM_INVALID); + ERROR(ACL_ERROR_GE_EXEC_NOT_INIT); + ERROR(ACL_ERROR_GE_EXEC_MODEL_PATH_INVALID); + ERROR(ACL_ERROR_GE_EXEC_MODEL_ID_INVALID); + ERROR(ACL_ERROR_GE_EXEC_MODEL_DATA_SIZE_INVALID); + ERROR(ACL_ERROR_GE_EXEC_MODEL_ADDR_INVALID); + ERROR(ACL_ERROR_GE_EXEC_MODEL_QUEUE_ID_INVALID); + ERROR(ACL_ERROR_GE_EXEC_LOAD_MODEL_REPEATED); + ERROR(ACL_ERROR_GE_DYNAMIC_INPUT_ADDR_INVALID); + ERROR(ACL_ERROR_GE_DYNAMIC_INPUT_LENGTH_INVALID); + ERROR(ACL_ERROR_GE_DYNAMIC_BATCH_SIZE_INVALID); + ERROR(ACL_ERROR_GE_AIPP_BATCH_EMPTY); + ERROR(ACL_ERROR_GE_AIPP_NOT_EXIST); + ERROR(ACL_ERROR_GE_AIPP_MODE_INVALID); + ERROR(ACL_ERROR_GE_OP_TASK_TYPE_INVALID); + ERROR(ACL_ERROR_GE_OP_KERNEL_TYPE_INVALID); + ERROR(ACL_ERROR_GE_PLGMGR_PATH_INVALID); + ERROR(ACL_ERROR_GE_FORMAT_INVALID); + ERROR(ACL_ERROR_GE_SHAPE_INVALID); + ERROR(ACL_ERROR_GE_DATATYPE_INVALID); + ERROR(ACL_ERROR_GE_MEMORY_ALLOCATION); + ERROR(ACL_ERROR_GE_MEMORY_OPERATE_FAILED); + ERROR(ACL_ERROR_GE_INTERNAL_ERROR); + ERROR(ACL_ERROR_GE_LOAD_MODEL); + ERROR(ACL_ERROR_GE_EXEC_LOAD_MODEL_PARTITION_FAILED); + ERROR(ACL_ERROR_GE_EXEC_LOAD_WEIGHT_PARTITION_FAILED); + ERROR(ACL_ERROR_GE_EXEC_LOAD_TASK_PARTITION_FAILED); + ERROR(ACL_ERROR_GE_EXEC_LOAD_KERNEL_PARTITION_FAILED); + ERROR(ACL_ERROR_GE_EXEC_RELEASE_MODEL_DATA); + ERROR(ACL_ERROR_GE_COMMAND_HANDLE); + ERROR(ACL_ERROR_GE_GET_TENSOR_INFO); + ERROR(ACL_ERROR_GE_UNLOAD_MODEL); + + ERROR(ACL_ERROR_RT_PARAM_INVALID); + ERROR(ACL_ERROR_RT_INVALID_DEVICEID); + ERROR(ACL_ERROR_RT_CONTEXT_NULL); + ERROR(ACL_ERROR_RT_STREAM_CONTEXT); + ERROR(ACL_ERROR_RT_MODEL_CONTEXT); + ERROR(ACL_ERROR_RT_STREAM_MODEL); + ERROR(ACL_ERROR_RT_EVENT_TIMESTAMP_INVALID); + ERROR(ACL_ERROR_RT_EVENT_TIMESTAMP_REVERSAL); + ERROR(ACL_ERROR_RT_ADDR_UNALIGNED); + ERROR(ACL_ERROR_RT_FILE_OPEN); + ERROR(ACL_ERROR_RT_FILE_WRITE); + ERROR(ACL_ERROR_RT_STREAM_SUBSCRIBE); + ERROR(ACL_ERROR_RT_THREAD_SUBSCRIBE); + ERROR(ACL_ERROR_RT_GROUP_NOT_SET); + ERROR(ACL_ERROR_RT_GROUP_NOT_CREATE); + ERROR(ACL_ERROR_RT_STREAM_NO_CB_REG); + ERROR(ACL_ERROR_RT_INVALID_MEMORY_TYPE); + ERROR(ACL_ERROR_RT_INVALID_HANDLE); + ERROR(ACL_ERROR_RT_INVALID_MALLOC_TYPE); + ERROR(ACL_ERROR_RT_WAIT_TIMEOUT); + ERROR(ACL_ERROR_RT_TASK_TIMEOUT); + ERROR(ACL_ERROR_RT_FEATURE_NOT_SUPPORT); + ERROR(ACL_ERROR_RT_MEMORY_ALLOCATION); + ERROR(ACL_ERROR_RT_MEMORY_FREE); + ERROR(ACL_ERROR_RT_AICORE_OVER_FLOW); + ERROR(ACL_ERROR_RT_NO_DEVICE); + ERROR(ACL_ERROR_RT_RESOURCE_ALLOC_FAIL); + ERROR(ACL_ERROR_RT_NO_PERMISSION); + ERROR(ACL_ERROR_RT_NO_EVENT_RESOURCE); + ERROR(ACL_ERROR_RT_NO_STREAM_RESOURCE); + ERROR(ACL_ERROR_RT_NO_NOTIFY_RESOURCE); + ERROR(ACL_ERROR_RT_NO_MODEL_RESOURCE); + ERROR(ACL_ERROR_RT_NO_CDQ_RESOURCE); + ERROR(ACL_ERROR_RT_OVER_LIMIT); + ERROR(ACL_ERROR_RT_QUEUE_EMPTY); + ERROR(ACL_ERROR_RT_QUEUE_FULL); + ERROR(ACL_ERROR_RT_REPEATED_INIT); + ERROR(ACL_ERROR_RT_AIVEC_OVER_FLOW); + ERROR(ACL_ERROR_RT_INTERNAL_ERROR); + ERROR(ACL_ERROR_RT_TS_ERROR); + ERROR(ACL_ERROR_RT_STREAM_TASK_FULL); + ERROR(ACL_ERROR_RT_STREAM_TASK_EMPTY); + ERROR(ACL_ERROR_RT_STREAM_NOT_COMPLETE); + ERROR(ACL_ERROR_RT_END_OF_SEQUENCE); + ERROR(ACL_ERROR_RT_EVENT_NOT_COMPLETE); + ERROR(ACL_ERROR_RT_CONTEXT_RELEASE_ERROR); + ERROR(ACL_ERROR_RT_SOC_VERSION); + ERROR(ACL_ERROR_RT_TASK_TYPE_NOT_SUPPORT); + ERROR(ACL_ERROR_RT_LOST_HEARTBEAT); + ERROR(ACL_ERROR_RT_MODEL_EXECUTE); + ERROR(ACL_ERROR_RT_REPORT_TIMEOUT); + ERROR(ACL_ERROR_RT_SYS_DMA); + ERROR(ACL_ERROR_RT_AICORE_TIMEOUT); + ERROR(ACL_ERROR_RT_AICORE_EXCEPTION); + ERROR(ACL_ERROR_RT_AICORE_TRAP_EXCEPTION); + ERROR(ACL_ERROR_RT_AICPU_TIMEOUT); + ERROR(ACL_ERROR_RT_AICPU_EXCEPTION); + ERROR(ACL_ERROR_RT_AICPU_DATADUMP_RSP_ERR); + ERROR(ACL_ERROR_RT_AICPU_MODEL_RSP_ERR); + ERROR(ACL_ERROR_RT_PROFILING_ERROR); + ERROR(ACL_ERROR_RT_IPC_ERROR); + ERROR(ACL_ERROR_RT_MODEL_ABORT_NORMAL); + ERROR(ACL_ERROR_RT_KERNEL_UNREGISTERING); + ERROR(ACL_ERROR_RT_RINGBUFFER_NOT_INIT); + ERROR(ACL_ERROR_RT_RINGBUFFER_NO_DATA); + ERROR(ACL_ERROR_RT_KERNEL_LOOKUP); + ERROR(ACL_ERROR_RT_KERNEL_DUPLICATE); + ERROR(ACL_ERROR_RT_DEBUG_REGISTER_FAIL); + ERROR(ACL_ERROR_RT_DEBUG_UNREGISTER_FAIL); + ERROR(ACL_ERROR_RT_LABEL_CONTEXT); + ERROR(ACL_ERROR_RT_PROGRAM_USE_OUT); + ERROR(ACL_ERROR_RT_DEV_SETUP_ERROR); + ERROR(ACL_ERROR_RT_VECTOR_CORE_TIMEOUT); + ERROR(ACL_ERROR_RT_VECTOR_CORE_EXCEPTION); + ERROR(ACL_ERROR_RT_VECTOR_CORE_TRAP_EXCEPTION); + ERROR(ACL_ERROR_RT_CDQ_BATCH_ABNORMAL); + ERROR(ACL_ERROR_RT_DIE_MODE_CHANGE_ERROR); + ERROR(ACL_ERROR_RT_DIE_SET_ERROR); + ERROR(ACL_ERROR_RT_INVALID_DIEID); + ERROR(ACL_ERROR_RT_DIE_MODE_NOT_SET); + ERROR(ACL_ERROR_RT_DRV_INTERNAL_ERROR); + ERROR(ACL_ERROR_RT_AICPU_INTERNAL_ERROR); + ERROR(ACL_ERROR_RT_SOCKET_CLOSE); + default: return "unknown error"; } diff --git a/imperative/src/impl/transformations/trace.cpp b/imperative/src/impl/transformations/trace.cpp index b0bdfb57c..7bbf47631 100644 --- a/imperative/src/impl/transformations/trace.cpp +++ b/imperative/src/impl/transformations/trace.cpp @@ -30,13 +30,23 @@ VarNodeArray TraceResult::dump( std::vector> outputs, bool prefer_input_names) { // var -> VarNode std::vector nodes(vars.size(), nullptr); + auto get_compnode = [](const VarInfo& info) -> CompNode { + auto& orig_cn = *(info.device); + std::string device_name_prefix = + orig_cn.locator_logical().to_string().substr(0, 3); + if (device_name_prefix == "cpu" || device_name_prefix == "gpu" || + device_name_prefix == "xpu") { + return CompNode::load("xpux"); + } + return orig_cn; + }; // make h2d node for each input for (auto&& [input, name, shape] : inputs) { auto& var = vars[input]; auto& node = nodes[input]; - // TODO: cambricon CompNode - auto host = std::make_shared( - CompNode::load("xpux"), shape, *var.dtype); + + auto host = + std::make_shared(get_compnode(var), shape, *var.dtype); OperatorNodeConfig config; // if prefer_input_names, prefer names from dump args // else prefer names got from trace procedure diff --git a/src/core/include/megbrain/comp_node_env.h b/src/core/include/megbrain/comp_node_env.h index 02449d067..c56e6512d 100644 --- a/src/core/include/megbrain/comp_node_env.h +++ b/src/core/include/megbrain/comp_node_env.h @@ -390,7 +390,8 @@ public: init(); int32_t device_id = -1; auto err = aclrtGetDevice(&device_id); - if (err == ACL_ERROR_INVALID_DEVICE || device != device_id) { + if (err == ACL_ERROR_INVALID_DEVICE || err == ACL_ERROR_RT_CONTEXT_NULL || + device != device_id) { MGB_ATLAS_CHECK(aclrtSetDevice(device)); } else { MGB_ATLAS_CHECK(err); diff --git a/src/opr/impl/atlas_runtime_op.cpp b/src/opr/impl/atlas_runtime_op.cpp index 919d34807..967bf2cdd 100644 --- a/src/opr/impl/atlas_runtime_op.cpp +++ b/src/opr/impl/atlas_runtime_op.cpp @@ -191,7 +191,9 @@ AtlasRuntimeOpr::AtlasRuntimeOpr( MegBrainError, "Unsupported aclAippInputFormat for input %zu. ", i); } - } else if (ACL_ERROR_NOT_STATIC_AIPP == acl_err) { + } else if ( + ACL_ERROR_NOT_STATIC_AIPP == acl_err || + ACL_ERROR_GE_AIPP_NOT_EXIST == acl_err) { m_aipp_input_format[i] = AippInputFormat::NO_AIPP; } else { MGB_ATLAS_CHECK(acl_err); -- GitLab