From 09fed7e9981f5fe66c48256078c9ca809bcf9d51 Mon Sep 17 00:00:00 2001 From: taoxiangdong Date: Tue, 27 Oct 2020 21:54:55 +0800 Subject: [PATCH] update build.sh and thirdparty include --- CMakeLists.txt | 13 ++- build.sh | 75 +++++++++++- metadef | 2 +- parser | 2 +- third_party/fwkacllib/inc/mmpa/mmpa_api.h | 18 +-- .../fwkacllib/inc/mmpa/sub_inc/mmpa_linux.h | 69 +++++++++++ .../inc/mmpa/sub_inc/mmpa_typedef_linux.h | 3 + .../inc/mmpa/sub_inc/mmpa_typedef_win.h | 6 +- .../fwkacllib/inc/mmpa/sub_inc/mmpa_win.h | 84 +++++++++++++- third_party/fwkacllib/inc/ops/aipp.h | 2 +- third_party/fwkacllib/inc/ops/all_ops.h | 2 +- third_party/fwkacllib/inc/ops/array_ops.h | 2 +- third_party/fwkacllib/inc/ops/audio_ops.h | 2 +- third_party/fwkacllib/inc/ops/batch_ops.h | 2 +- third_party/fwkacllib/inc/ops/bitwise_ops.h | 2 +- .../fwkacllib/inc/ops/boosted_trees_ops.h | 2 +- .../inc/ops/candidate_sampling_ops.h | 2 +- third_party/fwkacllib/inc/ops/condtake_ops.h | 2 +- .../fwkacllib/inc/ops/control_flow_ops.h | 2 +- third_party/fwkacllib/inc/ops/ctc_ops.h | 2 +- third_party/fwkacllib/inc/ops/data_flow_ops.h | 2 +- .../inc/ops/elewise_calculation_ops.h | 2 +- .../fwkacllib/inc/ops/functional_ops.h | 2 +- third_party/fwkacllib/inc/ops/get_data_ops.h | 2 +- third_party/fwkacllib/inc/ops/hcom_ops.h | 2 +- third_party/fwkacllib/inc/ops/hvd_ops.h | 2 +- third_party/fwkacllib/inc/ops/image_ops.h | 2 +- third_party/fwkacllib/inc/ops/internal_ops.h | 2 +- third_party/fwkacllib/inc/ops/linalg_ops.h | 2 +- third_party/fwkacllib/inc/ops/logging_ops.h | 2 +- third_party/fwkacllib/inc/ops/lookup_ops.h | 2 +- third_party/fwkacllib/inc/ops/math_ops.h | 2 +- .../inc/ops/matrix_calculation_ops.h | 2 +- third_party/fwkacllib/inc/ops/max_pool_v3.h | 77 ------------- .../fwkacllib/inc/ops/max_pool_v3_grad.h | 80 ------------- .../fwkacllib/inc/ops/nn_batch_norm_ops.h | 2 +- .../fwkacllib/inc/ops/nn_calculation_ops.h | 2 +- third_party/fwkacllib/inc/ops/nn_detect_ops.h | 2 +- third_party/fwkacllib/inc/ops/nn_norm_ops.h | 2 +- third_party/fwkacllib/inc/ops/nn_ops.h | 2 +- .../fwkacllib/inc/ops/nn_pooling_ops.h | 108 +++++++++++++++++- .../fwkacllib/inc/ops/nn_training_ops.h | 2 +- third_party/fwkacllib/inc/ops/no_op.h | 2 +- .../fwkacllib/inc/ops/nonlinear_fuc_ops.h | 2 +- .../fwkacllib/inc/ops/npu_loss_scale_ops.h | 2 +- third_party/fwkacllib/inc/ops/outfeed_ops.h | 2 +- third_party/fwkacllib/inc/ops/pad_ops.h | 4 +- third_party/fwkacllib/inc/ops/parsing_ops.h | 2 +- third_party/fwkacllib/inc/ops/quantize_ops.h | 2 +- .../fwkacllib/inc/ops/ragged_array_ops.h | 2 +- .../fwkacllib/inc/ops/ragged_conversion_ops.h | 2 +- .../fwkacllib/inc/ops/ragged_math_ops.h | 2 +- third_party/fwkacllib/inc/ops/random_ops.h | 2 +- third_party/fwkacllib/inc/ops/reduce_ops.h | 2 +- .../fwkacllib/inc/ops/resource_variable_ops.h | 2 +- third_party/fwkacllib/inc/ops/rnn.h | 2 +- third_party/fwkacllib/inc/ops/rpn_ops.h | 2 +- third_party/fwkacllib/inc/ops/save_ops.h | 2 +- third_party/fwkacllib/inc/ops/sdca_ops.h | 2 +- third_party/fwkacllib/inc/ops/selection_ops.h | 4 +- third_party/fwkacllib/inc/ops/set_ops.h | 2 +- third_party/fwkacllib/inc/ops/sparse_ops.h | 2 +- third_party/fwkacllib/inc/ops/spectral_ops.h | 2 +- .../fwkacllib/inc/ops/split_combination_ops.h | 2 +- third_party/fwkacllib/inc/ops/state_ops.h | 2 +- .../fwkacllib/inc/ops/stateful_random_ops.h | 2 +- .../fwkacllib/inc/ops/stateless_random_ops.h | 2 +- third_party/fwkacllib/inc/ops/string_ops.h | 2 +- third_party/fwkacllib/inc/ops/swap_co_ops.h | 2 +- .../fwkacllib/inc/ops/transformation_ops.h | 2 +- .../fwkacllib/inc/ops/warp_perspective_ops.h | 2 +- .../inc/register/op_kernel_registry.h | 1 + third_party/fwkacllib/inc/runtime/base.h | 13 ++- third_party/fwkacllib/inc/runtime/config.h | 10 +- third_party/fwkacllib/inc/runtime/context.h | 10 +- third_party/fwkacllib/inc/runtime/dev.h | 10 +- .../fwkacllib/inc/runtime/dvfsprofile.h | 10 +- third_party/fwkacllib/inc/runtime/event.h | 10 +- third_party/fwkacllib/inc/runtime/kernel.h | 10 +- third_party/fwkacllib/inc/runtime/mem.h | 12 +- third_party/fwkacllib/inc/runtime/rt.h | 10 +- third_party/fwkacllib/inc/runtime/rt_model.h | 29 ++++- third_party/fwkacllib/inc/runtime/stream.h | 10 +- third_party/fwkacllib/inc/tdt/status.h | 2 +- .../inc/toolchain/adx_datadump_server.h | 22 ++-- 85 files changed, 505 insertions(+), 313 deletions(-) delete mode 100644 third_party/fwkacllib/inc/ops/max_pool_v3.h delete mode 100644 third_party/fwkacllib/inc/ops/max_pool_v3_grad.h diff --git a/CMakeLists.txt b/CMakeLists.txt index c5f5ef4b..41aad1a9 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -89,14 +89,18 @@ if (ENABLE_OPEN_SRC) find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR}) find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR}) find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) - if(NOT PRODUCT STREQUAL "flr3") + if(PRODUCT STREQUAL "flr3") + find_module(msprof libmsprof.so ${ASCEND_DRIVER_SHARE_DIR}) + elseif(PRODUCT STREQUAL "flr1") + find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) + find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR}) + elseif(PRODUCT STREQUAL "flr2") + # flr2 ascend_hal_stub limsprof ? + else() find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}) find_module(msprof libmsprof.so ${ASCEND_DRIVER_DIR}) - else() - find_module(msprof libmsprof.so ${ASCEND_DRIVER_SHARE_DIR}) endif() elseif(PLATFORM STREQUAL "all") - #mdc没有 dc在driver目录 find_module(msprof libmsprof.so ${ASCEND_DRIVER_COMMON_DIR}) find_module(hccl libhccl.so ${ASCEND_RUNTIME_DIR}) find_module(adump_server libadump_server.a ${ASCEND_ACL_DIR}) @@ -106,7 +110,6 @@ if (ENABLE_OPEN_SRC) find_module(error_manager liberror_manager.so ${ASCEND_ATC_DIR}) find_module(error_manager_static liberror_manager.a ${ASCEND_ACL_DIR}) find_module(msprofiler libmsprofiler.a ${ASCEND_ACL_DIR}) - #mdc没有 dc在driver/lib64/driver find_module(ascend_hal_stub libascend_hal.so ${ASCEND_DRIVER_DIR}/driver) find_module(ascendcl_static libascendcl.a ${ASCEND_ACL_DIR}) else() diff --git a/build.sh b/build.sh index 60ca950c..51c5e999 100644 --- a/build.sh +++ b/build.sh @@ -95,6 +95,9 @@ checkopts() } checkopts "$@" +git submodule update --init metadef +git submodule update --init parser + mk_dir() { local create_dir="$1" # the target to make @@ -134,7 +137,7 @@ build_graphengine() echo "execute command: cmake ${CMAKE_ARGS} .. failed." return 1 fi - COMMON_TARGET="ge_common engine fmk_parser parser_common _caffe_parser fmk_onnx_parser graph register " + COMMON_TARGET="ge_common engine fmk_parser parser_common _caffe_parser fmk_onnx_parser graph register engine_conf.json optimizer_priority.pbtxt " TARGET=${COMMON_TARGET} if [ "x${PLATFORM}" = "xtrain" ] then @@ -211,14 +214,80 @@ generate_package() cd "${BASEPATH}" GRAPHENGINE_LIB_PATH="lib" + ACL_PATH="acllib/lib64" + FWK_PATH="fwkacllib/lib64" + ATC_PATH="atc/lib64" + ATC_BIN_PATH="atc/bin" + NNENGINE_PATH="plugin/nnengine/ge_config" + OPSKERNEL_PATH="plugin/opskernel" + + ATC_LIB=("libc_sec.so" "libge_common.so" "libge_compiler.so" "libgraph.so" "libregister.so") + FWK_LIB=("libge_common.so" "libge_runner.so" "libgraph.so" "libregister.so") + PLUGIN_OPSKERNEL=("libge_local_engine.so" "libge_local_opskernel_builder.so" "libhost_cpu_engine.so" "libhost_cpu_opskernel_builder.so" "optimizer_priority.pbtxt") + PARSER_LIB=("lib_caffe_parser.so" "libfmk_onnx_parser.so" "libfmk_parser.so" "libparser_common.so") + rm -rf ${OUTPUT_PATH:?}/${FWK_PATH}/ + rm -rf ${OUTPUT_PATH:?}/${ACL_PATH}/ + rm -rf ${OUTPUT_PATH:?}/${ATC_PATH}/ + rm -rf ${OUTPUT_PATH:?}/${ATC_BIN_PATH}/ + + mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}" + mk_dir "${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH}" + mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}" + mk_dir "${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH}" + mk_dir "${OUTPUT_PATH}/${ACL_PATH}" + mk_dir "${OUTPUT_PATH}/${ATC_BIN_PATH}" + cd "${OUTPUT_PATH}" find ./ -name graphengine_lib.tar -exec rm {} \; - find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}" \; + cp ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}/engine_conf.json ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH} + cp ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH}/engine_conf.json ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH} + + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${NNENGINE_PATH}/../ \; + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name libengine.so -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${NNENGINE_PATH}/../ \; + + MAX_DEPTH=1 + if [ "x${PLATFORM}" = "xall" ] || [ "x${PLATFORM}" = "xinference" ] + then + MAX_DEPTH=2 + fi + for lib in "${PLUGIN_OPSKERNEL[@]}"; + do + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth ${MAX_DEPTH} -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH}/${OPSKERNEL_PATH} \; + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth ${MAX_DEPTH} -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH}/${OPSKERNEL_PATH} \; + done + + for lib in "${PARSER_LIB[@]}"; + do + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \; + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ACL_PATH} \; + done + + for lib in "${FWK_LIB[@]}"; + do + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \; + done + + for lib in "${ATC_LIB[@]}"; + do + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH} \; + done + + find ./bin -name atc -exec cp {} "${OUTPUT_PATH}/${ATC_BIN_PATH}" \; + find ${OUTPUT_PATH}/${GRAPHENGINE_LIB_PATH} -maxdepth 1 -name "libregister.a" -exec cp -f {} ${OUTPUT_PATH}/${ACL_PATH} \; - tar -cf graphengine_lib.tar "${GRAPHENGINE_LIB_PATH}" + if [ "x${PLATFORM}" = "xtrain" ] + then + tar -cf graphengine_lib.tar fwkacllib + elif [ "x${PLATFORM}" = "xinference" ] + then + tar -cf graphengine_lib.tar acllib atc + elif [ "x${PLATFORM}" = "xall" ] + then + tar -cf graphengine_lib.tar fwkacllib acllib atc + fi } if [[ "X$ENABLE_GE_UT" = "Xoff" ]]; then diff --git a/metadef b/metadef index 5d06bc75..d4d3655d 160000 --- a/metadef +++ b/metadef @@ -1 +1 @@ -Subproject commit 5d06bc7547189f24195b3cedcb0bfc3d787c80a5 +Subproject commit d4d3655d2257c8e3e78b338aa02af47bdcfda21b diff --git a/parser b/parser index 5af5c72f..702254b9 160000 --- a/parser +++ b/parser @@ -1 +1 @@ -Subproject commit 5af5c72fba1315f3d52113a5e88dc618d68e7dbc +Subproject commit 702254b9d482d38ef8eaa9ca894327286b4da118 diff --git a/third_party/fwkacllib/inc/mmpa/mmpa_api.h b/third_party/fwkacllib/inc/mmpa/mmpa_api.h index f1e30538..f5b80269 100644 --- a/third_party/fwkacllib/inc/mmpa/mmpa_api.h +++ b/third_party/fwkacllib/inc/mmpa/mmpa_api.h @@ -17,10 +17,10 @@ #ifndef _MMPA_API_H_ #define _MMPA_API_H_ -#define LINUX 0 -#define WIN 1 +#define LINUX 0 +#define WIN 1 -#if(OS_TYPE == LINUX) +#if(OS_TYPE == LINUX) //lint !e553 #ifndef _GNU_SOURCE #define _GNU_SOURCE @@ -75,6 +75,7 @@ #include #include #include +#include #include "securec.h" @@ -84,7 +85,7 @@ #endif -#if(OS_TYPE == WIN) +#if(OS_TYPE == WIN) //lint !e553 #include #include #include "Windows.h" @@ -103,16 +104,19 @@ #include #include "shlwapi.h" #include -#include "sub_inc/mmpa_typedef_win.h" -#include "sub_inc/mmpa_win.h" #include #include #include #include - +#include #include #include +#include "securec.h" + +#include "sub_inc/mmpa_typedef_win.h" +#include "sub_inc/mmpa_win.h" + #pragma comment(lib, "ws2_32.lib") #pragma comment(lib, "mswsock.lib") #pragma comment(lib, "Kernel32.lib") diff --git a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_linux.h b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_linux.h index 6ac8f8f6..aced4968 100644 --- a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_linux.h +++ b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_linux.h @@ -30,18 +30,26 @@ typedef pthread_t mmThread; typedef pthread_mutex_t mmMutex_t; typedef pthread_cond_t mmCond; typedef pthread_mutex_t mmMutexFC; +typedef pthread_rwlock_t mmRWLock_t; typedef signed int mmProcess; typedef int mmPollHandle; typedef int mmPipeHandle; +typedef int mmFileHandle; typedef int mmComPletionKey; typedef int mmCompletionHandle; +typedef int mmErrorMsg; +typedef int mmFd_t; typedef VOID *mmExitCode; typedef key_t mmKey_t; typedef int mmMsgid; typedef struct dirent mmDirent; +typedef struct shmid_ds mmshmId_ds; typedef int (*mmFilter)(const mmDirent *entry); typedef int (*mmSort)(const mmDirent **a, const mmDirent **b); +typedef size_t mmSize_t; +typedef off_t mmOfft_t; +typedef pid_t mmPid_t; typedef VOID *(*userProcFunc)(VOID *pulArg); @@ -50,6 +58,16 @@ typedef struct { VOID *pulArg; // Callback function parameters } mmUserBlock_t; +typedef struct { + const char *dli_fname; + void *dli_fbase; + const char *dli_sname; + void *dli_saddr; + size_t dli_size; /* ELF only */ + int dli_bind; /* ELF only */ + int dli_type; +} mmDlInfo; + typedef struct { int wSecond; // Seconds. [0-60] (1 leap second) int wMinute; // Minutes. [0-59] @@ -73,6 +91,7 @@ typedef pthread_key_t mmThreadKey; typedef int mmOverLap; typedef ssize_t mmSsize_t; +typedef size_t mmSize; // size typedef struct { UINT32 createFlag; @@ -201,6 +220,17 @@ typedef struct { #define M_RDWR O_RDWR #define M_CREAT O_CREAT #define M_BINARY O_RDONLY +#define M_TRUNC O_TRUNC +#define M_IRWXU S_IRWXU + +#define M_IN_CREATE IN_CREATE +#define M_IN_CLOSE_WRITE IN_CLOSE_WRITE +#define M_IN_IGNORED IN_IGNORED + +#define M_OUT_CREATE IN_CREATE +#define M_OUT_CLOSE_WRITE IN_CLOSE_WRITE +#define M_OUT_IGNORED IN_IGNORED +#define M_OUT_ISDIR IN_ISDIR #define M_IREAD S_IREAD #define M_IRUSR S_IRUSR @@ -236,13 +266,20 @@ typedef struct { #define MMPA_OPTIONAL_ARGUMENT 2 #define MMPA_MAX_PATH PATH_MAX +#define M_NAME_MAX MAX_FNAME #define M_F_OK F_OK #define M_R_OK R_OK #define M_W_OK W_OK +#define MMPA_STDIN STDIN_FILENO +#define MMPA_STDOUT STDOUT_FILENO +#define MMPA_STDERR STDERR_FILENO + #define MMPA_RTLD_NOW RTLD_NOW #define MMPA_RTLD_GLOBAL RTLD_GLOBAL +#define MMPA_RTLD_LAZY RTLD_LAZY +#define MMPA_RTLD_NODELETE RTLD_NODELETE #define MMPA_DL_EXT_NAME ".so" @@ -250,6 +287,7 @@ extern INT32 mmCreateTask(mmThread *threadHandle, mmUserBlock_t *funcBlock); extern INT32 mmJoinTask(mmThread *threadHandle); extern INT32 mmMutexInit(mmMutex_t *mutex); extern INT32 mmMutexLock(mmMutex_t *mutex); +extern INT32 mmMutexTryLock(mmMutex_t *mutex); extern INT32 mmMutexUnLock(mmMutex_t *mutex); extern INT32 mmMutexDestroy(mmMutex_t *mutex); extern INT32 mmCondInit(mmCond *cond); @@ -257,6 +295,14 @@ extern INT32 mmCondLockInit(mmMutexFC *mutex); extern INT32 mmCondLock(mmMutexFC *mutex); extern INT32 mmCondUnLock(mmMutexFC *mutex); extern INT32 mmCondLockDestroy(mmMutexFC *mutex); +extern INT32 mmRWLockInit(mmRWLock_t *rwLock); +extern INT32 mmRWLockRDLock(mmRWLock_t *rwLock); +extern INT32 mmRWLockTryRDLock(mmRWLock_t *rwLock); +extern INT32 mmRWLockWRLock(mmRWLock_t *rwLock); +extern INT32 mmRWLockTryWRLock(mmRWLock_t *rwLock); +extern INT32 mmRDLockUnLock(mmRWLock_t *rwLock); +extern INT32 mmWRLockUnLock(mmRWLock_t *rwLock); +extern INT32 mmRWLockDestroy(mmRWLock_t *rwLock); extern INT32 mmCondWait(mmCond *cond, mmMutexFC *mutex); extern INT32 mmCondTimedWait(mmCond *cond, mmMutexFC *mutex, UINT32 milliSecond); extern INT32 mmCondNotify(mmCond *cond); @@ -266,6 +312,7 @@ extern INT32 mmGetPid(); extern INT32 mmGetTid(); extern INT32 mmGetPidHandle(mmProcess *processHandle); extern INT32 mmGetLocalTime(mmSystemTime_t *sysTime); +extern INT32 mmGetSystemTime(mmSystemTime_t *sysTime); extern INT32 mmSemInit(mmSem_t *sem, UINT32 value); extern INT32 mmSemWait(mmSem_t *sem); @@ -273,7 +320,9 @@ extern INT32 mmSemPost(mmSem_t *sem); extern INT32 mmSemDestroy(mmSem_t *sem); extern INT32 mmOpen(const CHAR *pathName, INT32 flags); extern INT32 mmOpen2(const CHAR *pathName, INT32 flags, MODE mode); +extern FILE *mmPopen(CHAR *command, CHAR *type); extern INT32 mmClose(INT32 fd); +extern INT32 mmPclose(FILE *stream); extern mmSsize_t mmWrite(INT32 fd, VOID *buf, UINT32 bufLen); extern mmSsize_t mmRead(INT32 fd, VOID *buf, UINT32 bufLen); extern mmSockHandle mmSocket(INT32 sockFamily, INT32 type, INT32 protocol); @@ -284,9 +333,22 @@ extern INT32 mmConnect(mmSockHandle sockFd, mmSockAddr *addr, mmSocklen_t addrLe extern INT32 mmCloseSocket(mmSockHandle sockFd); extern mmSsize_t mmSocketSend(mmSockHandle sockFd, VOID *sendBuf, INT32 sendLen, INT32 sendFlag); extern mmSsize_t mmSocketRecv(mmSockHandle sockFd, VOID *recvBuf, INT32 recvLen, INT32 recvFlag); +extern INT32 mmSocketSendTo(mmSockHandle sockFd, + VOID *sendMsg, + INT32 sendLen, + UINT32 sendFlag, + const mmSockAddr* addr, + INT32 tolen); +extern mmSsize_t mmSocketRecvFrom(mmSockHandle sockFd, + VOID *recvBuf, + mmSize recvLen, + UINT32 recvFlag, + mmSockAddr* addr, + mmSocklen_t *FromLen); extern INT32 mmSAStartup(); extern INT32 mmSACleanup(); extern VOID *mmDlopen(const CHAR *fileName, INT32 mode); +extern INT32 mmDladdr(VOID *addr, mmDlInfo *info); extern VOID *mmDlsym(VOID *handle, CHAR *funcName); extern INT32 mmDlclose(VOID *handle); extern CHAR *mmDlerror(); @@ -294,6 +356,7 @@ extern INT32 mmCreateAndSetTimer(mmTimer *timerHandle, mmUserBlock_t *timerBlock extern INT32 mmDeleteTimer(mmTimer timerHandle); extern INT32 mmStatGet(const CHAR *path, mmStat_t *buffer); extern INT32 mmStat64Get(const CHAR *path, mmStat64_t *buffer); +extern INT32 mmFStatGet(INT32 fd, mmStat_t *buffer); extern INT32 mmMkdir(const CHAR *pathName, mmMode_t mode); extern INT32 mmSleep(UINT32 milliSecond); @@ -337,6 +400,7 @@ extern VOID mmCloseCompletionPort(mmCompletionHandle handle); extern INT32 mmPoll(mmPollfd *fds, INT32 fdCount, INT32 timeout, mmCompletionHandle handleIOCP, pmmPollData polledData, mmPollBack pollBack); extern INT32 mmGetErrorCode(); +extern CHAR *mmGetErrorFormatMessage(mmErrorMsg errnum, CHAR *buf, mmSize size); extern INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone); extern mmTimespec mmGetTickCount(); extern INT32 mmGetRealPath(CHAR *path, CHAR *realPath); @@ -382,6 +446,7 @@ extern INT32 mmTlsDelete(mmThreadKey key); extern INT32 mmGetOsType(); extern INT32 mmFsync(mmProcess fd); +extern INT32 mmFsync2(INT32 fd); extern INT32 mmChdir(const CHAR *path); extern INT32 mmUmask(INT32 pmode); extern INT32 mmThreadKill(mmThread id); @@ -439,6 +504,10 @@ extern INT32 mmCreateProcess(const CHAR *fileName, const mmArgvEnv *env, const c extern INT32 mmCreateTaskWithThreadAttr(mmThread *threadHandle, const mmUserBlock_t *funcBlock, const mmThreadAttr *threadAttr); +extern mmFileHandle mmShmOpen(const CHAR *name, INT32 oflag, mmMode_t mode); +extern INT32 mmShmUnlink(const CHAR *name); +extern VOID *mmMmap(mmFd_t fd, mmSize_t size, mmOfft_t offset, mmFd_t *extra, INT32 prot, INT32 flags); +extern INT32 mmMunMap(VOID *data, mmSize_t size, mmFd_t *extra); #define MMPA_DLL_API #ifdef __cplusplus diff --git a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_linux.h b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_linux.h index fc862a72..9df5b9ce 100644 --- a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_linux.h +++ b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_linux.h @@ -79,6 +79,8 @@ typedef long LONG; #define MMPA_THREAD_SCHED_OTHER SCHED_OTHER #define MMPA_THREAD_MIN_STACK_SIZE PTHREAD_STACK_MIN +#define MM_MUTEX_INITIALIZER PTHREAD_MUTEX_INITIALIZER + #define MMPA_MAX_NI 19 #define MMPA_MIN_NI (-20) @@ -86,6 +88,7 @@ typedef long LONG; #define EN_ERR 1 #define EN_ERROR (-1) #define EN_INVALID_PARAM (-2) +#define EN_TIMEOUT (-3) #ifdef __cplusplus #if __cplusplus diff --git a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_win.h b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_win.h index fc1b4858..8200bea6 100644 --- a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_win.h +++ b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_typedef_win.h @@ -1,4 +1,4 @@ -/** +/** * Copyright 2019-2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -35,6 +35,7 @@ extern "C" { #define EN_ERR 1 #define EN_ERROR (-1) #define EN_INVALID_PARAM (-2) +#define EN_TIMEOUT (-3) #define HANDLE_INVALID_VALUE (-1) #define INVALID_SOCKET_HANDLE INVALID_SOCKET @@ -60,6 +61,7 @@ extern "C" { #define MMPA_MIDDLE_NI 5 #define MMPA_LOW_NI (-5) #define MMPA_MIN_NI (-20) +#define MMPA_MAX_FILE 128 #define MMPA_MAX_THREAD_PIO 99 #define MMPA_MIDDLE_THREAD_PIO 66 @@ -71,6 +73,8 @@ extern "C" { #define MMPA_THREAD_SCHED_OTHER 0 #define MMPA_THREAD_MIN_STACK_SIZE 0 +#define MM_MUTEX_INITIALIZER NULL + #ifdef __cplusplus #if __cplusplus } diff --git a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_win.h b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_win.h index 68a70c27..6adc1426 100644 --- a/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_win.h +++ b/third_party/fwkacllib/inc/mmpa/sub_inc/mmpa_win.h @@ -1,4 +1,4 @@ -/** +/** * Copyright 2019-2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -43,8 +43,9 @@ typedef HANDLE mmThread; typedef HANDLE mmProcess; typedef HANDLE mmPollHandle; typedef HANDLE mmPipeHandle; +typedef HANDLE mmFileHandle; typedef HANDLE mmCompletionHandle; - +typedef HANDLE mmFd_t; typedef CRITICAL_SECTION mmMutexFC; typedef CONDITION_VARIABLE mmCond; @@ -59,15 +60,22 @@ typedef SYSTEMTIME mmSystemTime_t; typedef HANDLE mmSem_t; typedef SOCKET mmSockHandle; +typedef SRWLOCK mmRWLock_t; typedef struct sockaddr mmSockAddr; typedef int mmSocklen_t; typedef int mmSemTimeout_t; typedef long mmAtomicType; typedef DWORD mmExitCode; +typedef DWORD mmErrorMsg; typedef int mmKey_t; typedef HANDLE mmMsgid; +typedef long int mmOfft_t; +typedef int mmPid_t; typedef INT32 mmSsize_t; +typedef int mmSize; // size +typedef size_t mmSize_t; +typedef VOID mmshmId_ds; typedef enum { DT_DIR = FILE_ATTRIBUTE_DIRECTORY, @@ -181,6 +189,16 @@ typedef struct { ULONGLONG availSize; } mmDiskSize; +typedef struct { + const char *dli_fname; + void *dli_fbase; + const char *dli_sname; + void *dli_saddr; + size_t dli_size; /* ELF only */ + int dli_bind; /* ELF only */ + int dli_type; +} mmDlInfo; + typedef struct { char addr[MMPA_MACINFO_DEFAULT_SIZE]; // ex:aa-bb-cc-dd-ee-ff\0 } mmMacInfo; @@ -223,8 +241,10 @@ typedef VOID (*mmPf)(VOID); #define M_RDONLY _O_RDONLY #define M_WRONLY _O_WRONLY #define M_RDWR _O_RDWR +#define M_IRWXU _O_RDWR #define M_CREAT _O_CREAT #define M_BINARY _O_BINARY +#define M_TRUNC _O_TRUNC #define M_IREAD _S_IREAD #define M_IRUSR _S_IREAD @@ -232,6 +252,15 @@ typedef VOID (*mmPf)(VOID); #define M_IWUSR _S_IWRITE #define M_IXUSR 0 +#define M_IN_CREATE FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME +#define M_IN_CLOSE_WRITE FILE_NOTIFY_CHANGE_LAST_WRITE +#define M_IN_IGNORED FILE_NOTIFY_CHANGE_FILE_NAME | FILE_NOTIFY_CHANGE_DIR_NAME + +#define M_OUT_CREATE 0x00000100 +#define M_OUT_CLOSE_WRITE 0x00000008 +#define M_OUT_IGNORED 0x00008000 +#define M_OUT_ISDIR 0x40000000 + #define M_MSG_CREAT 1 #define M_MSG_EXCL 2 #define M_MSG_NOWAIT 3 @@ -251,6 +280,16 @@ typedef VOID (*mmPf)(VOID); #define M_UMASK_GRPEXEC 0 #define M_UMASK_OTHEXEC 0 +#define DT_UNKNOWN 0 +#define DT_FIFO 1 +#define DT_CHR 2 +#define DT_DIR 4 +#define DT_BLK 6 +#define DT_REG 8 +#define DT_LNK 10 +#define DT_SOCK 12 +#define DT_WHT 14 + #define mmConstructor(x) __declspec(allocate(".CRT$XCU")) mmPf con = x #define mmDestructor(x) __declspec(allocate(".CRT$XPU")) mmPf de = x @@ -269,13 +308,20 @@ typedef VOID (*mmPf)(VOID); #define MMPA_EMSG "" #define MMPA_MAX_PATH MAX_PATH +#define M_NAME_MAX _MAX_FNAME #define M_F_OK 0 #define M_W_OK 2 #define M_R_OK 4 +#define MMPA_STDIN stdin +#define MMPA_STDOUT stdout +#define MMPA_STDERR stderr + #define MMPA_RTLD_NOW 0 #define MMPA_RTLD_GLOBAL 0 +#define MMPA_RTLD_LAZY 0 +#define MMPA_RTLD_NODELETE 0 #define MMPA_DL_EXT_NAME ".dll" @@ -285,6 +331,7 @@ _declspec(dllexport) INT32 mmCreateTask(mmThread *threadHandle, mmUserBlock_t *f _declspec(dllexport) INT32 mmJoinTask(mmThread *threadHandle); _declspec(dllexport) INT32 mmMutexInit(mmMutex_t *mutex); _declspec(dllexport) INT32 mmMutexLock(mmMutex_t *mutex); +_declspec(dllexport) INT32 mmMutexTryLock(mmMutex_t *mutex); _declspec(dllexport) INT32 mmMutexUnLock(mmMutex_t *mutex); _declspec(dllexport) INT32 mmMutexDestroy(mmMutex_t *mutex); _declspec(dllexport) INT32 mmCondInit(mmCond *cond); @@ -292,6 +339,14 @@ _declspec(dllexport) INT32 mmCondLockInit(mmMutexFC *mutex); _declspec(dllexport) INT32 mmCondLock(mmMutexFC *mutex); _declspec(dllexport) INT32 mmCondUnLock(mmMutexFC *mutex); _declspec(dllexport) INT32 mmCondLockDestroy(mmMutexFC *mutex); +_declspec(dllexport) INT32 mmRWLockInit(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRWLockRDLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRWLockTryRDLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRWLockWRLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRWLockTryWRLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRDLockUnLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmWRLockUnLock(mmRWLock_t *rwLock); +_declspec(dllexport) INT32 mmRWLockDestroy(mmRWLock_t *rwLock); _declspec(dllexport) INT32 mmCondWait(mmCond *cond, mmMutexFC *mutex); _declspec(dllexport) INT32 mmCondTimedWait(mmCond *cond, mmMutexFC *mutex, UINT32 milliSecond); @@ -302,13 +357,16 @@ _declspec(dllexport) INT32 mmGetPid(VOID); _declspec(dllexport) INT32 mmGetTid(VOID); _declspec(dllexport) INT32 mmGetPidHandle(mmProcess *processHandle); _declspec(dllexport) INT32 mmGetLocalTime(mmSystemTime_t *sysTime); +_declspec(dllexport) INT32 mmGetSystemTime(mmSystemTime_t *sysTime); _declspec(dllexport) INT32 mmSemInit(mmSem_t *sem, UINT32 value); _declspec(dllexport) INT32 mmSemWait(mmSem_t *sem); _declspec(dllexport) INT32 mmSemPost(mmSem_t *sem); _declspec(dllexport) INT32 mmSemDestroy(mmSem_t *sem); _declspec(dllexport) INT32 mmOpen(const CHAR *pathName, INT32 flags); _declspec(dllexport) INT32 mmOpen2(const CHAR *pathName, INT32 flags, MODE mode); +_declspec(dllexport) FILE *mmPopen(CHAR *command, CHAR *type); _declspec(dllexport) INT32 mmClose(INT32 fd); +_declspec(dllexport) INT32 mmPclose(FILE *stream); _declspec(dllexport) mmSsize_t mmWrite(INT32 fd, VOID *buf, UINT32 bufLen); _declspec(dllexport) mmSsize_t mmRead(INT32 fd, VOID *buf, UINT32 bufLen); _declspec(dllexport) mmSockHandle mmSocket(INT32 sockFamily, INT32 type, INT32 protocol); @@ -319,9 +377,22 @@ _declspec(dllexport) INT32 mmConnect(mmSockHandle sockFd, mmSockAddr *addr, mmSo _declspec(dllexport) INT32 mmCloseSocket(mmSockHandle sockFd); _declspec(dllexport) mmSsize_t mmSocketRecv(mmSockHandle sockFd, VOID *recvBuf, INT32 recvLen, INT32 recvFlag); _declspec(dllexport) mmSsize_t mmSocketSend(mmSockHandle sockFd, VOID *sendBuf, INT32 sendLen, INT32 sendFlag); +_declspec(dllexport) INT32 mmSocketSendTo(mmSockHandle sockFd, + VOID *sendMsg, + INT32 sendLen, + UINT32 sendFlag, + const mmSockAddr* addr, + INT32 tolen); +_declspec(dllexport) mmSsize_t mmSocketRecvFrom(mmSockHandle sockFd, + VOID *recvBuf, + mmSize recvLen, + UINT32 recvFlag, + mmSockAddr* addr, + mmSocklen_t *FromLen); _declspec(dllexport) INT32 mmSAStartup(VOID); _declspec(dllexport) INT32 mmSACleanup(VOID); _declspec(dllexport) VOID *mmDlopen(const CHAR *fileName, INT mode); +_declspec(dllexport) INT32 mmDladdr(VOID *addr, mmDlInfo *info); _declspec(dllexport) VOID *mmDlsym(VOID *handle, CHAR *fileName); _declspec(dllexport) INT32 mmDlclose(VOID *handle); _declspec(dllexport) CHAR *mmDlerror(VOID); @@ -330,6 +401,7 @@ _declspec(dllexport) INT32 _declspec(dllexport) INT32 mmDeleteTimer(mmTimer timerHandle); _declspec(dllexport) INT32 mmStatGet(const CHAR *path, mmStat_t *buffer); _declspec(dllexport) INT32 mmStat64Get(const CHAR *path, mmStat64_t *buffer); +_declspec(dllexport) INT32 mmFStatGet(INT32 fd, mmStat_t *buffer); _declspec(dllexport) INT32 mmMkdir(const CHAR *pathName, mmMode_t mode); _declspec(dllexport) INT32 mmSleep(UINT32 milliSecond); _declspec(dllexport) INT32 mmCreateTaskWithAttr(mmThread *threadHandle, mmUserBlock_t *funcBlock); @@ -371,6 +443,7 @@ _declspec(dllexport) INT32 mmPoll(mmPollfd *fds, INT32 fdCount, INT32 timeout, m pmmPollData polledData, mmPollBack pollBack); _declspec(dllexport) INT32 mmGetErrorCode(); +_declspec(dllexport) CHAR *mmGetErrorFormatMessage(mmErrorMsg errnum, CHAR *buf, mmSize size); _declspec(dllexport) INT32 mmGetTimeOfDay(mmTimeval *timeVal, mmTimezone *timeZone); _declspec(dllexport) mmTimespec mmGetTickCount(); _declspec(dllexport) INT32 mmGetRealPath(CHAR *path, CHAR *realPath); @@ -407,7 +480,7 @@ _declspec(dllexport) INT32 mmTlsDelete(mmThreadKey key); _declspec(dllexport) INT32 mmGetOsType(); _declspec(dllexport) INT32 mmFsync(mmProcess fd); - +_declspec(dllexport) INT32 mmFsync2(INT32 fd); _declspec(dllexport) INT32 mmChdir(const CHAR *path); _declspec(dllexport) INT32 mmUmask(INT32 pmode); _declspec(dllexport) INT32 mmWaitPid(mmProcess pid, INT32 *status, INT32 options); @@ -455,7 +528,10 @@ _declspec(dllexport) INT32 _declspec(dllexport) INT32 mmCreateTaskWithThreadAttr(mmThread *threadHandle, const mmUserBlock_t *funcBlock, const mmThreadAttr *threadAttr); - +_declspec(dllexport) mmFileHandle mmShmOpen(const CHAR *name, INT32 oflag, mmMode_t mode); +_declspec(dllexport) INT32 mmShmUnlink(const CHAR *name); +_declspec(dllexport) VOID *mmMmap(mmFd_t fd, mmSize_t size, mmOfft_t offset, mmFd_t *extra, INT32 prot, INT32 flags); +_declspec(dllexport) INT32 mmMunMap(VOID *data, mmSize_t size, mmFd_t *extra); #ifdef __cplusplus #if __cplusplus } diff --git a/third_party/fwkacllib/inc/ops/aipp.h b/third_party/fwkacllib/inc/ops/aipp.h index bed984bd..478f6c83 100644 --- a/third_party/fwkacllib/inc/ops/aipp.h +++ b/third_party/fwkacllib/inc/ops/aipp.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/all_ops.h b/third_party/fwkacllib/inc/ops/all_ops.h index 1ac83783..614b06e2 100644 --- a/third_party/fwkacllib/inc/ops/all_ops.h +++ b/third_party/fwkacllib/inc/ops/all_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/array_ops.h b/third_party/fwkacllib/inc/ops/array_ops.h index e1f64421..691b51f6 100644 --- a/third_party/fwkacllib/inc/ops/array_ops.h +++ b/third_party/fwkacllib/inc/ops/array_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/audio_ops.h b/third_party/fwkacllib/inc/ops/audio_ops.h index d9883253..f05135d1 100644 --- a/third_party/fwkacllib/inc/ops/audio_ops.h +++ b/third_party/fwkacllib/inc/ops/audio_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/batch_ops.h b/third_party/fwkacllib/inc/ops/batch_ops.h index 8a1c5a7b..a4786cd3 100644 --- a/third_party/fwkacllib/inc/ops/batch_ops.h +++ b/third_party/fwkacllib/inc/ops/batch_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/bitwise_ops.h b/third_party/fwkacllib/inc/ops/bitwise_ops.h index 5c83e161..39a28cf3 100644 --- a/third_party/fwkacllib/inc/ops/bitwise_ops.h +++ b/third_party/fwkacllib/inc/ops/bitwise_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/boosted_trees_ops.h b/third_party/fwkacllib/inc/ops/boosted_trees_ops.h index 550e8b7d..08e54824 100644 --- a/third_party/fwkacllib/inc/ops/boosted_trees_ops.h +++ b/third_party/fwkacllib/inc/ops/boosted_trees_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/candidate_sampling_ops.h b/third_party/fwkacllib/inc/ops/candidate_sampling_ops.h index e20607bf..890c52ae 100644 --- a/third_party/fwkacllib/inc/ops/candidate_sampling_ops.h +++ b/third_party/fwkacllib/inc/ops/candidate_sampling_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/condtake_ops.h b/third_party/fwkacllib/inc/ops/condtake_ops.h index 5e91eb07..029cffbf 100644 --- a/third_party/fwkacllib/inc/ops/condtake_ops.h +++ b/third_party/fwkacllib/inc/ops/condtake_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/control_flow_ops.h b/third_party/fwkacllib/inc/ops/control_flow_ops.h index 7196b14f..c0b6ad72 100644 --- a/third_party/fwkacllib/inc/ops/control_flow_ops.h +++ b/third_party/fwkacllib/inc/ops/control_flow_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/ctc_ops.h b/third_party/fwkacllib/inc/ops/ctc_ops.h index 2c75fd09..c6a265cc 100644 --- a/third_party/fwkacllib/inc/ops/ctc_ops.h +++ b/third_party/fwkacllib/inc/ops/ctc_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/data_flow_ops.h b/third_party/fwkacllib/inc/ops/data_flow_ops.h index 461b3617..02d2bfdd 100644 --- a/third_party/fwkacllib/inc/ops/data_flow_ops.h +++ b/third_party/fwkacllib/inc/ops/data_flow_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/elewise_calculation_ops.h b/third_party/fwkacllib/inc/ops/elewise_calculation_ops.h index 536dea63..07fab272 100644 --- a/third_party/fwkacllib/inc/ops/elewise_calculation_ops.h +++ b/third_party/fwkacllib/inc/ops/elewise_calculation_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/functional_ops.h b/third_party/fwkacllib/inc/ops/functional_ops.h index 598d3ad3..b09ac058 100644 --- a/third_party/fwkacllib/inc/ops/functional_ops.h +++ b/third_party/fwkacllib/inc/ops/functional_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/get_data_ops.h b/third_party/fwkacllib/inc/ops/get_data_ops.h index 33dc4f14..e5518ef8 100644 --- a/third_party/fwkacllib/inc/ops/get_data_ops.h +++ b/third_party/fwkacllib/inc/ops/get_data_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/hcom_ops.h b/third_party/fwkacllib/inc/ops/hcom_ops.h index 1fe9055c..a8fc1106 100644 --- a/third_party/fwkacllib/inc/ops/hcom_ops.h +++ b/third_party/fwkacllib/inc/ops/hcom_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/hvd_ops.h b/third_party/fwkacllib/inc/ops/hvd_ops.h index a49ec5ed..00299ef7 100644 --- a/third_party/fwkacllib/inc/ops/hvd_ops.h +++ b/third_party/fwkacllib/inc/ops/hvd_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/image_ops.h b/third_party/fwkacllib/inc/ops/image_ops.h index ce3262f9..a29c8553 100644 --- a/third_party/fwkacllib/inc/ops/image_ops.h +++ b/third_party/fwkacllib/inc/ops/image_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/internal_ops.h b/third_party/fwkacllib/inc/ops/internal_ops.h index 9dde14a5..bcc3f1c3 100644 --- a/third_party/fwkacllib/inc/ops/internal_ops.h +++ b/third_party/fwkacllib/inc/ops/internal_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/linalg_ops.h b/third_party/fwkacllib/inc/ops/linalg_ops.h index 7a6fbc59..d8f45c5d 100644 --- a/third_party/fwkacllib/inc/ops/linalg_ops.h +++ b/third_party/fwkacllib/inc/ops/linalg_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/logging_ops.h b/third_party/fwkacllib/inc/ops/logging_ops.h index bc8ae2b8..03be7757 100644 --- a/third_party/fwkacllib/inc/ops/logging_ops.h +++ b/third_party/fwkacllib/inc/ops/logging_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/lookup_ops.h b/third_party/fwkacllib/inc/ops/lookup_ops.h index b37ab048..5d928e5a 100644 --- a/third_party/fwkacllib/inc/ops/lookup_ops.h +++ b/third_party/fwkacllib/inc/ops/lookup_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/math_ops.h b/third_party/fwkacllib/inc/ops/math_ops.h index 2b0783bf..330d85e7 100644 --- a/third_party/fwkacllib/inc/ops/math_ops.h +++ b/third_party/fwkacllib/inc/ops/math_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/matrix_calculation_ops.h b/third_party/fwkacllib/inc/ops/matrix_calculation_ops.h index ed23d3f6..daf0939c 100644 --- a/third_party/fwkacllib/inc/ops/matrix_calculation_ops.h +++ b/third_party/fwkacllib/inc/ops/matrix_calculation_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/max_pool_v3.h b/third_party/fwkacllib/inc/ops/max_pool_v3.h deleted file mode 100644 index 960ea03e..00000000 --- a/third_party/fwkacllib/inc/ops/max_pool_v3.h +++ /dev/null @@ -1,77 +0,0 @@ -/** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * - * 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 OPS_BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_H_ -#define BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_H_ - -#include "graph/operator_reg.h" - -namespace ge { - -/** -* @brief Performs max pooling on the input . \n - -* @par Inputs: -* One input: -* x: An NC1HWC0 Tensor. Supported type:float16, float32, double, int8, int16, -* int32, int64, uint8, uint16, qint8 - -* @par Attributes: -* @li ksize: A required list of int8, int16, int32, or int64 values, -* specifying the size of the window for each dimension of the input tensor. -* No default value. -* @li strides: A required list of int8, int16, int32, or int64 values, -* specifying the stride of the sliding window for each dimension of -* the input tensor. No default value. -* @li padding_mode: A required string. Defaults to "CALCULATED". -* @li pads:A required list of int8, int16, int32, or int64 values, -* a data to caculate when padding_mode is "SAME" and "CALCULATED". -* @li data_format: An optional string. Defaults to "NHWC" . -* @li global_pooling bool, Whether to use the global pooling. -* If global_pooling = true, kernel size and paddings will be ignored. -* Default False -* @li ceil_mode:global_pooling (bool) – (bool) Whether to use the global pooling. -* If global_pooling = true, kernel size and paddings will be ignored. -* Default False \n - -* @par Outputs: -* y: A Tensor. Has the same type and format as input "x" . \n - -* @attention Constraints: -* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, -* ksize[1] * ksize[2] <= 255. -* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, -* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. -* @li "padding" is "SAME" "VALID" or "CACULATE" . - - -* @par Third-party framework compatibility -* Compatible with the TensorFlow operator MaxPool. -*/ -REG_OP(MaxPoolV3) - .INPUT(x,TensorType({DT_FLOAT16, DT_FLOAT32})) - .OUTPUT(y, TensorType({DT_FLOAT16, DT_FLOAT32})) - .REQUIRED_ATTR(ksize, ListInt) - .REQUIRED_ATTR(strides, ListInt) - .ATTR(padding_mode, String, "CALCULATED") - .ATTR(pads, ListInt, {0,0,0,0}) - .ATTR(data_format, String, "NCHW") - .ATTR(global_pooling,Bool,false) - .ATTR(ceil_mode, Bool, false) - .OP_END_FACTORY_REG(MaxPoolV3) -} // namespace ge - -#endif // OPS_BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_H_ diff --git a/third_party/fwkacllib/inc/ops/max_pool_v3_grad.h b/third_party/fwkacllib/inc/ops/max_pool_v3_grad.h deleted file mode 100644 index fbb96bdf..00000000 --- a/third_party/fwkacllib/inc/ops/max_pool_v3_grad.h +++ /dev/null @@ -1,80 +0,0 @@ -/** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * - * 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. - */ - -/*! - *\file max_pool_v3_grad.h - *\brief - */ -#ifndef OPS_BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_GRAD_H_ -#define OPS_BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_GRAD_H_ - -#include "graph/operator_reg.h" - -namespace ge { - -/** -* @brief Computes gradients of the maxpooling function . \n - -* @par Inputs: -* @li orig_input: A mutable NC1HWC0 tensor of type RealNumberType. -* @li orig_output: A mutable NC1HWC0 tensor of type RealNumberTypex. -* @li grad: A mutable NC1HWC0 tensor of type RealNumberType . \n - -* @par Attributes: -* @li ksize: A required list of int8, int16, int32, or int64 values, -* specifying the size of the window for each dimension of the input tensor. -* No default value. -* @li strides: A required list of int8, int16, int32, or int64 values, -* specifying the stride of the sliding window for each dimension of -* the input tensor. No default value. -* @li padding_mode: A required string. Defaults to "CALCULATED". -* @li pads:A required list of int8, int16, int32, or int64 values, -* a data to caculate when padding_mode is "SAME" and "CALCULATED". -* @li data_format: An optional string. Defaults to "NHWC" . -* @li global_pooling bool, Whether to use the global pooling. -* If global_pooling = true, kernel size and paddings will be ignored. -* Default False -* @li ceil_mode:global_pooling (bool) – (bool) Whether to use the global pooling. -* If global_pooling = true, kernel size and paddings will be ignored. -* Default False \n - -* @par Outputs: -* y: A mutable tensor. Has the same shape and type as "x1" . \n - -* @attention Constraints: -* @li Computing gradients of global pooling is not supported, which means -* "ksize < x1". -* @li "ksize" is in the range [1, 255]. "strides" is in the range [1, 63] - -* @par Third-party framework compatibility -* Compatible with the TensorFlow operator MaxPoolGrad. -*/ -REG_OP(MaxPoolV3Grad) - .INPUT(orig_input, TensorType::RealNumberType()) - .INPUT(orig_output, TensorType::RealNumberType()) - .INPUT(grad, TensorType::RealNumberType()) - .OUTPUT(out_grad, TensorType::RealNumberType()) - .REQUIRED_ATTR(ksize, ListInt) - .REQUIRED_ATTR(strides, ListInt) - .ATTR(padding_mod, String, "CALCULATED") - .ATTR(pads, ListInt, {0, 0, 0, 0}) - .ATTR(data_format, String, "NCHW") - .ATTR(global_pooling, Bool, false) - .ATTR(ceil_mode, Bool, false) - .OP_END_FACTORY_REG(MaxPoolV3Grad) -} // namespace ge - -#endif // OPS_BUILT_IN_OP_PROTO_INC_MAX_POOL_V3_GRAD_H_ diff --git a/third_party/fwkacllib/inc/ops/nn_batch_norm_ops.h b/third_party/fwkacllib/inc/ops/nn_batch_norm_ops.h index 0c6a5dff..a35cee03 100644 --- a/third_party/fwkacllib/inc/ops/nn_batch_norm_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_batch_norm_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nn_calculation_ops.h b/third_party/fwkacllib/inc/ops/nn_calculation_ops.h index e2d610c5..bd361f5d 100644 --- a/third_party/fwkacllib/inc/ops/nn_calculation_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_calculation_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nn_detect_ops.h b/third_party/fwkacllib/inc/ops/nn_detect_ops.h index a013fb33..476704e5 100644 --- a/third_party/fwkacllib/inc/ops/nn_detect_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_detect_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nn_norm_ops.h b/third_party/fwkacllib/inc/ops/nn_norm_ops.h index 35c4c7d4..0fdf27e3 100644 --- a/third_party/fwkacllib/inc/ops/nn_norm_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_norm_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nn_ops.h b/third_party/fwkacllib/inc/ops/nn_ops.h index 9edc469a..16552eee 100644 --- a/third_party/fwkacllib/inc/ops/nn_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nn_pooling_ops.h b/third_party/fwkacllib/inc/ops/nn_pooling_ops.h index 6615d2f5..473e94b7 100644 --- a/third_party/fwkacllib/inc/ops/nn_pooling_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_pooling_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -1190,6 +1190,108 @@ REG_OP(MaxPoolGradWithArgmaxV2) .ATTR(dilation, ListInt, {1,1,1,1}) .ATTR(ceil_mode, Bool, false) .OP_END_FACTORY_REG(MaxPoolGradWithArgmaxV2) -} // namespace ge -#endif // OPS_BUILT_IN_OP_PROTO_INC_NN_POOLING_OPS_H_ +/** +* @brief Performs max pooling on the input . \n + +* @par Inputs: +* One input: +* x: An NC1HWC0 Tensor. Supported type:float16, float32, double, int8, int16, +* int32, int64, uint8, uint16, qint8 + +* @par Attributes: +* @li ksize: A required list of int8, int16, int32, or int64 values, +* specifying the size of the window for each dimension of the input tensor. +* No default value. +* @li strides: A required list of int8, int16, int32, or int64 values, +* specifying the stride of the sliding window for each dimension of +* the input tensor. No default value. +* @li padding_mode: A required string. Defaults to "CALCULATED". +* @li pads:A required list of int8, int16, int32, or int64 values, +* a data to caculate when padding_mode is "SAME" and "CALCULATED". +* @li data_format: An optional string. Defaults to "NHWC" . +* @li global_pooling bool, Whether to use the global pooling. +* If global_pooling = true, kernel size and paddings will be ignored. +* Default False +* @li ceil_mode:global_pooling (bool) – (bool) Whether to use the global pooling. +* If global_pooling = true, kernel size and paddings will be ignored. +* Default False \n + +* @par Outputs: +* y: A Tensor. Has the same type and format as input "x" . \n + +* @attention Constraints: +* @li "ksize" is a list that has length 4: ksize[0] = 1 or ksize[3] = 1, +* ksize[1] * ksize[2] <= 255. +* @li "stride is a list that has length 4: strides[0] = 1 or strides[3] = 1, +* strides[1] <= 63, strides[0] >= 1, strides[2] <= 63, strides[2] >= 1. +* @li "padding" is "SAME" "VALID" or "CACULATE" . + + +* @par Third-party framework compatibility +* Compatible with the TensorFlow operator MaxPool. +*/ +REG_OP(MaxPoolV3) + .INPUT(x,TensorType({DT_FLOAT16, DT_FLOAT32})) + .OUTPUT(y, TensorType({DT_FLOAT16, DT_FLOAT32})) + .REQUIRED_ATTR(ksize, ListInt) + .REQUIRED_ATTR(strides, ListInt) + .ATTR(padding_mode, String, "CALCULATED") + .ATTR(pads, ListInt, {0,0,0,0}) + .ATTR(data_format, String, "NCHW") + .ATTR(global_pooling,Bool,false) + .ATTR(ceil_mode, Bool, false) + .OP_END_FACTORY_REG(MaxPoolV3) + +/** +* @brief Computes gradients of the maxpooling function . \n + +* @par Inputs: +* @li orig_input: A mutable NC1HWC0 tensor of type RealNumberType. +* @li orig_output: A mutable NC1HWC0 tensor of type RealNumberTypex. +* @li grad: A mutable NC1HWC0 tensor of type RealNumberType . \n + +* @par Attributes: +* @li ksize: A required list of int8, int16, int32, or int64 values, +* specifying the size of the window for each dimension of the input tensor. +* No default value. +* @li strides: A required list of int8, int16, int32, or int64 values, +* specifying the stride of the sliding window for each dimension of +* the input tensor. No default value. +* @li padding_mode: A required string. Defaults to "CALCULATED". +* @li pads:A required list of int8, int16, int32, or int64 values, +* a data to caculate when padding_mode is "SAME" and "CALCULATED". +* @li data_format: An optional string. Defaults to "NHWC" . +* @li global_pooling bool, Whether to use the global pooling. +* If global_pooling = true, kernel size and paddings will be ignored. +* Default False +* @li ceil_mode:global_pooling (bool) – (bool) Whether to use the global pooling. +* If global_pooling = true, kernel size and paddings will be ignored. +* Default False \n + +* @par Outputs: +* y: A mutable tensor. Has the same shape and type as "x1" . \n + +* @attention Constraints: +* @li Computing gradients of global pooling is not supported, which means +* "ksize < x1". +* @li "ksize" is in the range [1, 255]. "strides" is in the range [1, 63] + +* @par Third-party framework compatibility +* Compatible with the TensorFlow operator MaxPoolGrad. +*/ +REG_OP(MaxPoolV3Grad) + .INPUT(orig_input, TensorType::RealNumberType()) + .INPUT(orig_output, TensorType::RealNumberType()) + .INPUT(grad, TensorType::RealNumberType()) + .OUTPUT(out_grad, TensorType::RealNumberType()) + .REQUIRED_ATTR(ksize, ListInt) + .REQUIRED_ATTR(strides, ListInt) + .ATTR(padding_mode, String, "CALCULATED") + .ATTR(pads, ListInt, {0, 0, 0, 0}) + .ATTR(data_format, String, "NCHW") + .ATTR(global_pooling, Bool, false) + .ATTR(ceil_mode, Bool, false) + .OP_END_FACTORY_REG(MaxPoolV3Grad) +} // namespace ge +#endif // OPS_BUILT_IN_OP_PROTO_INC_NN_POOLING_OPS_H \ No newline at end of file diff --git a/third_party/fwkacllib/inc/ops/nn_training_ops.h b/third_party/fwkacllib/inc/ops/nn_training_ops.h index 047fd6da..92074872 100644 --- a/third_party/fwkacllib/inc/ops/nn_training_ops.h +++ b/third_party/fwkacllib/inc/ops/nn_training_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/no_op.h b/third_party/fwkacllib/inc/ops/no_op.h index 7834591c..b27b1fa0 100644 --- a/third_party/fwkacllib/inc/ops/no_op.h +++ b/third_party/fwkacllib/inc/ops/no_op.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h b/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h index e0e5dfc6..ce8383db 100644 --- a/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h +++ b/third_party/fwkacllib/inc/ops/nonlinear_fuc_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/npu_loss_scale_ops.h b/third_party/fwkacllib/inc/ops/npu_loss_scale_ops.h index 8d7ef9f9..f36d2935 100644 --- a/third_party/fwkacllib/inc/ops/npu_loss_scale_ops.h +++ b/third_party/fwkacllib/inc/ops/npu_loss_scale_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/outfeed_ops.h b/third_party/fwkacllib/inc/ops/outfeed_ops.h index e0b783bc..53b9d701 100644 --- a/third_party/fwkacllib/inc/ops/outfeed_ops.h +++ b/third_party/fwkacllib/inc/ops/outfeed_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/pad_ops.h b/third_party/fwkacllib/inc/ops/pad_ops.h index 625c1e09..92dca17c 100644 --- a/third_party/fwkacllib/inc/ops/pad_ops.h +++ b/third_party/fwkacllib/inc/ops/pad_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -343,7 +343,7 @@ REG_OP(AscendPadding) */ REG_OP(EmbeddingRankId) .INPUT(addr_table, TensorType({DT_UINT64})) - .INPUT(index, TensorType({DT_UINT32})) + .INPUT(index, TensorType({DT_INT64,DT_INT32,DT_UINT64})) .OUTPUT(rank_id, TensorType({DT_UINT64})) .ATTR(row_memory, Int, 320) .ATTR(mode, String, "mod") diff --git a/third_party/fwkacllib/inc/ops/parsing_ops.h b/third_party/fwkacllib/inc/ops/parsing_ops.h index 5c7adfd8..9a5cf504 100644 --- a/third_party/fwkacllib/inc/ops/parsing_ops.h +++ b/third_party/fwkacllib/inc/ops/parsing_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/quantize_ops.h b/third_party/fwkacllib/inc/ops/quantize_ops.h index b53cfeb6..806e28df 100644 --- a/third_party/fwkacllib/inc/ops/quantize_ops.h +++ b/third_party/fwkacllib/inc/ops/quantize_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/ragged_array_ops.h b/third_party/fwkacllib/inc/ops/ragged_array_ops.h index 9b31aa8e..20484623 100644 --- a/third_party/fwkacllib/inc/ops/ragged_array_ops.h +++ b/third_party/fwkacllib/inc/ops/ragged_array_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/ragged_conversion_ops.h b/third_party/fwkacllib/inc/ops/ragged_conversion_ops.h index 13488a25..020e3da4 100644 --- a/third_party/fwkacllib/inc/ops/ragged_conversion_ops.h +++ b/third_party/fwkacllib/inc/ops/ragged_conversion_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/ragged_math_ops.h b/third_party/fwkacllib/inc/ops/ragged_math_ops.h index 8af4f867..258b0ca1 100644 --- a/third_party/fwkacllib/inc/ops/ragged_math_ops.h +++ b/third_party/fwkacllib/inc/ops/ragged_math_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/random_ops.h b/third_party/fwkacllib/inc/ops/random_ops.h index b46da435..847b0768 100644 --- a/third_party/fwkacllib/inc/ops/random_ops.h +++ b/third_party/fwkacllib/inc/ops/random_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/reduce_ops.h b/third_party/fwkacllib/inc/ops/reduce_ops.h index 6f44093e..cd448c8d 100644 --- a/third_party/fwkacllib/inc/ops/reduce_ops.h +++ b/third_party/fwkacllib/inc/ops/reduce_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/resource_variable_ops.h b/third_party/fwkacllib/inc/ops/resource_variable_ops.h index 1b60d42a..74ac83f8 100644 --- a/third_party/fwkacllib/inc/ops/resource_variable_ops.h +++ b/third_party/fwkacllib/inc/ops/resource_variable_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/rnn.h b/third_party/fwkacllib/inc/ops/rnn.h index 4010707b..e33f3677 100644 --- a/third_party/fwkacllib/inc/ops/rnn.h +++ b/third_party/fwkacllib/inc/ops/rnn.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/rpn_ops.h b/third_party/fwkacllib/inc/ops/rpn_ops.h index b7649a44..089af326 100644 --- a/third_party/fwkacllib/inc/ops/rpn_ops.h +++ b/third_party/fwkacllib/inc/ops/rpn_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/save_ops.h b/third_party/fwkacllib/inc/ops/save_ops.h index 0ce473b7..5ce6c2e0 100644 --- a/third_party/fwkacllib/inc/ops/save_ops.h +++ b/third_party/fwkacllib/inc/ops/save_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/sdca_ops.h b/third_party/fwkacllib/inc/ops/sdca_ops.h index cbd9839d..34c6a268 100644 --- a/third_party/fwkacllib/inc/ops/sdca_ops.h +++ b/third_party/fwkacllib/inc/ops/sdca_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/selection_ops.h b/third_party/fwkacllib/inc/ops/selection_ops.h index 7c4802a6..e7f35e02 100644 --- a/third_party/fwkacllib/inc/ops/selection_ops.h +++ b/third_party/fwkacllib/inc/ops/selection_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -825,7 +825,7 @@ REG_OP(SliceD) * @attention Constraints: * @li k =< 5120 -* @li Size of the last dimension =< 65500 +* @li Size of the last dimension =< 1458176 * @li sorted = true * @li It's unstable sorted indices on the platform of Ascend310 diff --git a/third_party/fwkacllib/inc/ops/set_ops.h b/third_party/fwkacllib/inc/ops/set_ops.h index 1d02fa15..04e04f1b 100644 --- a/third_party/fwkacllib/inc/ops/set_ops.h +++ b/third_party/fwkacllib/inc/ops/set_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/sparse_ops.h b/third_party/fwkacllib/inc/ops/sparse_ops.h index d7512790..09d8ced9 100644 --- a/third_party/fwkacllib/inc/ops/sparse_ops.h +++ b/third_party/fwkacllib/inc/ops/sparse_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/spectral_ops.h b/third_party/fwkacllib/inc/ops/spectral_ops.h index 64fa7814..be3d7d00 100644 --- a/third_party/fwkacllib/inc/ops/spectral_ops.h +++ b/third_party/fwkacllib/inc/ops/spectral_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/split_combination_ops.h b/third_party/fwkacllib/inc/ops/split_combination_ops.h index efe4715d..f1a93fa6 100644 --- a/third_party/fwkacllib/inc/ops/split_combination_ops.h +++ b/third_party/fwkacllib/inc/ops/split_combination_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/state_ops.h b/third_party/fwkacllib/inc/ops/state_ops.h index db1f5353..3c8e32b6 100644 --- a/third_party/fwkacllib/inc/ops/state_ops.h +++ b/third_party/fwkacllib/inc/ops/state_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/stateful_random_ops.h b/third_party/fwkacllib/inc/ops/stateful_random_ops.h index 366112d6..c2f65c6a 100644 --- a/third_party/fwkacllib/inc/ops/stateful_random_ops.h +++ b/third_party/fwkacllib/inc/ops/stateful_random_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/stateless_random_ops.h b/third_party/fwkacllib/inc/ops/stateless_random_ops.h index dad3c379..ff9daaa3 100644 --- a/third_party/fwkacllib/inc/ops/stateless_random_ops.h +++ b/third_party/fwkacllib/inc/ops/stateless_random_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/string_ops.h b/third_party/fwkacllib/inc/ops/string_ops.h index 4a88bc79..ec84cc83 100644 --- a/third_party/fwkacllib/inc/ops/string_ops.h +++ b/third_party/fwkacllib/inc/ops/string_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/swap_co_ops.h b/third_party/fwkacllib/inc/ops/swap_co_ops.h index a1bf4f8b..6e8eaac3 100644 --- a/third_party/fwkacllib/inc/ops/swap_co_ops.h +++ b/third_party/fwkacllib/inc/ops/swap_co_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/transformation_ops.h b/third_party/fwkacllib/inc/ops/transformation_ops.h index 5d77c75d..9338a636 100644 --- a/third_party/fwkacllib/inc/ops/transformation_ops.h +++ b/third_party/fwkacllib/inc/ops/transformation_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/ops/warp_perspective_ops.h b/third_party/fwkacllib/inc/ops/warp_perspective_ops.h index e19cbd7c..8ef69d8b 100644 --- a/third_party/fwkacllib/inc/ops/warp_perspective_ops.h +++ b/third_party/fwkacllib/inc/ops/warp_perspective_ops.h @@ -1,5 +1,5 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd + * Copyright 2019 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/third_party/fwkacllib/inc/register/op_kernel_registry.h b/third_party/fwkacllib/inc/register/op_kernel_registry.h index 2c479e92..5fed8960 100644 --- a/third_party/fwkacllib/inc/register/op_kernel_registry.h +++ b/third_party/fwkacllib/inc/register/op_kernel_registry.h @@ -41,6 +41,7 @@ class FMK_FUNC_HOST_VISIBILITY FMK_FUNC_DEV_VISIBILITY OpKernelRegistry { private: OpKernelRegistry(); class OpKernelRegistryImpl; + /*lint -e148*/ std::unique_ptr impl_; }; } // namespace ge diff --git a/third_party/fwkacllib/inc/runtime/base.h b/third_party/fwkacllib/inc/runtime/base.h index ea32c164..a8341e32 100644 --- a/third_party/fwkacllib/inc/runtime/base.h +++ b/third_party/fwkacllib/inc/runtime/base.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_BASE_H__ #define __CCE_RUNTIME_BASE_H__ @@ -100,6 +100,9 @@ typedef enum tagRtError { RT_ERROR_MODEL_ID, RT_ERROR_MODEL_EXE_FAILED, RT_ERROR_END_OF_SEQUENCE, // end of sequence + RT_ERROR_MODEL_EXIT, + RT_ERROR_MODEL_EXIT_STREAM_UNBIND, + RT_ERROR_MODEL_EXIT_ID, RT_ERROR_EVENT_BASE = 0x07050000, RT_ERROR_EVENT_NULL, diff --git a/third_party/fwkacllib/inc/runtime/config.h b/third_party/fwkacllib/inc/runtime/config.h index 6de84c02..f1a70eaa 100644 --- a/third_party/fwkacllib/inc/runtime/config.h +++ b/third_party/fwkacllib/inc/runtime/config.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_CONFIG_H__ #define __CCE_RUNTIME_CONFIG_H__ diff --git a/third_party/fwkacllib/inc/runtime/context.h b/third_party/fwkacllib/inc/runtime/context.h index 21296ca2..ffcf7e4b 100644 --- a/third_party/fwkacllib/inc/runtime/context.h +++ b/third_party/fwkacllib/inc/runtime/context.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_CONTEXT_H__ #define __CCE_RUNTIME_CONTEXT_H__ diff --git a/third_party/fwkacllib/inc/runtime/dev.h b/third_party/fwkacllib/inc/runtime/dev.h index dddb1e10..f3f2937c 100644 --- a/third_party/fwkacllib/inc/runtime/dev.h +++ b/third_party/fwkacllib/inc/runtime/dev.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_DEVICE_H__ #define __CCE_RUNTIME_DEVICE_H__ diff --git a/third_party/fwkacllib/inc/runtime/dvfsprofile.h b/third_party/fwkacllib/inc/runtime/dvfsprofile.h index e27cd832..6e451695 100644 --- a/third_party/fwkacllib/inc/runtime/dvfsprofile.h +++ b/third_party/fwkacllib/inc/runtime/dvfsprofile.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_DVFSPROFILE_H__ #define __CCE_RUNTIME_DVFSPROFILE_H__ diff --git a/third_party/fwkacllib/inc/runtime/event.h b/third_party/fwkacllib/inc/runtime/event.h index af7b16d8..c8a227e8 100644 --- a/third_party/fwkacllib/inc/runtime/event.h +++ b/third_party/fwkacllib/inc/runtime/event.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_EVENT_H__ #define __CCE_RUNTIME_EVENT_H__ diff --git a/third_party/fwkacllib/inc/runtime/kernel.h b/third_party/fwkacllib/inc/runtime/kernel.h index 2030634a..de806a9e 100644 --- a/third_party/fwkacllib/inc/runtime/kernel.h +++ b/third_party/fwkacllib/inc/runtime/kernel.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_KERNEL_H__ #define __CCE_RUNTIME_KERNEL_H__ diff --git a/third_party/fwkacllib/inc/runtime/mem.h b/third_party/fwkacllib/inc/runtime/mem.h index 0d9e20ce..22a00ac6 100644 --- a/third_party/fwkacllib/inc/runtime/mem.h +++ b/third_party/fwkacllib/inc/runtime/mem.h @@ -1,23 +1,25 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_MEM_H__ #define __CCE_RUNTIME_MEM_H__ +/*lint -e7*/ #include +/*lint +e7*/ #include "base.h" #include "config.h" #include "stream.h" diff --git a/third_party/fwkacllib/inc/runtime/rt.h b/third_party/fwkacllib/inc/runtime/rt.h index c1872941..d3d5956f 100644 --- a/third_party/fwkacllib/inc/runtime/rt.h +++ b/third_party/fwkacllib/inc/runtime/rt.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_RT_H__ #define __CCE_RUNTIME_RT_H__ diff --git a/third_party/fwkacllib/inc/runtime/rt_model.h b/third_party/fwkacllib/inc/runtime/rt_model.h index 59a1ba7d..78bb2321 100644 --- a/third_party/fwkacllib/inc/runtime/rt_model.h +++ b/third_party/fwkacllib/inc/runtime/rt_model.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_MODEL_H__ #define __CCE_RUNTIME_MODEL_H__ @@ -49,6 +49,7 @@ typedef enum tagModelTaskType { RT_MODEL_TASK_MEMCPY_ADDR_ASYNC, RT_MODEL_TASK_STREAM_LABEL_SWITCH_BY_INDEX, RT_MODEL_TASK_STREAM_LABEL_GOTO, + RT_MODEL_TASK_MODEL_EXIT, } rtModelTaskType_t; typedef enum tagModelStreamType { @@ -224,6 +225,13 @@ typedef struct tagrtModelEndGraphTaskInfo { uint32_t reserved[8]; } rtModelEndGraphTaskInfo_t; +typedef struct tagrtModelExitInfo { + uint32_t modelId; + uint32_t streamId; + uint32_t reserved[8]; +} rtModelExitTaskInfo_t; + + typedef struct tagrtStreamLabelSwitchByIndexTask_t { uint64_t indexPtr; uint64_t labelInfoPtr; @@ -256,6 +264,7 @@ typedef struct tagTaskInfo { rtRdmaSendTaskInfo_t rdmaSendTask; rtRdmaDbSendTaskInfo_t rdmaDbSendTask; rtModelEndGraphTaskInfo_t modelEndGraphTask; + rtModelExitTaskInfo_t modelExitTask; rtStreamSwitchNTaskInfo_t streamSwitchNTask; rtStreamLabelSwitchByIndexTask_t streamLabelSwitchIndexTask; rtStreamLabelGotoTask_t streamLabelGotoTask; @@ -389,6 +398,16 @@ RTS_API rtError_t rtModelExecutorSet(rtModel_t model, uint8_t flags); */ RTS_API rtError_t rtModelAbort(rtModel_t model); +/** + * @ingroup rt_model + * @brief end graph task to model default stream + * @param [in] model model to execute + * @param [in] end graph stream + * @return RT_ERROR_NONE for ok + * @return RT_ERROR_INVALID_VALUE for error input + */ +RTS_API rtError_t rtModelExit(rtModel_t model, rtStream_t stream); + /** * @ingroup rt_model * @brief bind queue diff --git a/third_party/fwkacllib/inc/runtime/stream.h b/third_party/fwkacllib/inc/runtime/stream.h index ab542d89..81810a21 100644 --- a/third_party/fwkacllib/inc/runtime/stream.h +++ b/third_party/fwkacllib/inc/runtime/stream.h @@ -1,18 +1,18 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * + * Copyright 2020 Huawei Technologies Co., Ltd + * 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 __CCE_RUNTIME_STREAM_H__ #define __CCE_RUNTIME_STREAM_H__ diff --git a/third_party/fwkacllib/inc/tdt/status.h b/third_party/fwkacllib/inc/tdt/status.h index 185d2b9c..a42f38a5 100644 --- a/third_party/fwkacllib/inc/tdt/status.h +++ b/third_party/fwkacllib/inc/tdt/status.h @@ -1,4 +1,4 @@ -/** +/** * Copyright 2019-2020 Huawei Technologies Co., Ltd * * Licensed under the Apache License, Version 2.0 (the "License"); diff --git a/third_party/fwkacllib/inc/toolchain/adx_datadump_server.h b/third_party/fwkacllib/inc/toolchain/adx_datadump_server.h index 67adecd9..a1c39a51 100644 --- a/third_party/fwkacllib/inc/toolchain/adx_datadump_server.h +++ b/third_party/fwkacllib/inc/toolchain/adx_datadump_server.h @@ -1,18 +1,12 @@ /** - * Copyright 2019-2020 Huawei Technologies Co., Ltd - * - * 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. - */ +* @file adx_datadump_server.h +* +* Copyright (c) Huawei Technologies Co., Ltd. 2020-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 ADX_DATADUMP_SERVER_H #define ADX_DATADUMP_SERVER_H