Browse Source

Merge branch 'development' of https://gitee.com/ascend/parser into development

pull/63/head
l00444296 5 years ago
parent
commit
049b43548b
16 changed files with 198 additions and 48 deletions
  1. +55
    -3
      build.sh
  2. +9
    -1
      cmake/external_libs/gflags.cmake
  3. +11
    -2
      cmake/external_libs/json.cmake
  4. +9
    -1
      cmake/external_libs/onnx.cmake
  5. +9
    -1
      cmake/external_libs/protobuf_shared.cmake
  6. +9
    -1
      cmake/external_libs/protobuf_static.cmake
  7. +10
    -1
      cmake/external_libs/protoc.cmake
  8. +1
    -1
      metadef
  9. +14
    -13
      parser/CMakeLists.txt
  10. +34
    -0
      parser/caffe/caffe_parser.cc
  11. +2
    -0
      parser/caffe/caffe_parser.h
  12. +13
    -12
      parser/common/CMakeLists.txt
  13. +3
    -0
      parser/common/proto/insert_op.proto
  14. +13
    -12
      parser/onnx/CMakeLists.txt
  15. +3
    -0
      parser/proto/insert_op.proto
  16. +3
    -0
      parser/tensorflow/proto/insert_op.proto

+ 55
- 3
build.sh View File

@@ -23,7 +23,7 @@ export BUILD_PATH="${BASEPATH}/build/"
usage()
{
echo "Usage:"
echo "sh build.sh [-j[n]] [-h] [-v] [-s] [-t] [-u] [-c]"
echo "sh build.sh [-j[n]] [-h] [-v] [-s] [-t] [-u] [-c] [-S on|off]"
echo ""
echo "Options:"
echo " -h Print usage"
@@ -33,9 +33,21 @@ usage()
echo " -t Build and execute ut"
echo " -c Build ut with coverage tag"
echo " -v Display build command"
echo " -S Enable enable download cmake compile dependency from gitee , default off"
echo "to be continued ..."
}

# check value of input is 'on' or 'off'
# usage: check_on_off arg_value arg_name
check_on_off()
{
if [[ "X$1" != "Xon" && "X$1" != "Xoff" ]]; then
echo "Invalid value $1 for option -$2"
usage
exit 1
fi
}

# parse and set options
checkopts()
{
@@ -46,8 +58,9 @@ checkopts()
ENABLE_GE_ST="off"
ENABLE_GE_COV="off"
GE_ONLY="on"
ENABLE_GITEE="off"
# Process the options
while getopts 'ustchj:v' opt
while getopts 'ustchj:vS:' opt
do
OPTARG=$(echo ${OPTARG} | tr '[A-Z]' '[a-z]')
case "${opt}" in
@@ -77,6 +90,11 @@ checkopts()
v)
VERBOSE="VERBOSE=1"
;;
S)
check_on_off $OPTARG S
ENABLE_GITEE="$OPTARG"
echo "enable download from gitee"
;;
*)
echo "Undefined option: ${opt}"
usage
@@ -86,6 +104,8 @@ checkopts()
}
checkopts "$@"

git submodule update --init metadef

mk_dir() {
local create_dir="$1" # the target to make

@@ -117,6 +137,10 @@ build_parser()
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_GE_ST=ON"
fi

if [[ "X$ENABLE_GITEE" = "Xon" ]]; then
CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_GITEE=ON"
fi

CMAKE_ARGS="${CMAKE_ARGS} -DENABLE_OPEN_SRC=True -DCMAKE_INSTALL_PREFIX=${OUTPUT_PATH}"
echo "${CMAKE_ARGS}"
cmake ${CMAKE_ARGS} ..
@@ -152,12 +176,40 @@ generate_package()
cd "${BASEPATH}"

PARSER_LIB_PATH="lib"
ACL_PATH="acllib/lib64"
FWK_PATH="fwkacllib/lib64"
ATC_PATH="atc/lib64"

COMMON_LIB=("libgraph.so" "libregister.so")
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}/

mk_dir "${OUTPUT_PATH}/${FWK_PATH}"
mk_dir "${OUTPUT_PATH}/${ATC_PATH}"
mk_dir "${OUTPUT_PATH}/${ACL_PATH}"

find output/ -name parser_lib.tar -exec rm {} \;
cd "${OUTPUT_PATH}"

tar -cf parser_lib.tar "${PARSER_LIB_PATH}"
for lib in "${PARSER_LIB[@]}";
do
find ${OUTPUT_PATH}/${PARSER_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \;
find ${OUTPUT_PATH}/${PARSER_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH} \;
done

for lib in "${COMMON_LIB[@]}";
do
find ${OUTPUT_PATH}/${PARSER_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${FWK_PATH} \;
find ${OUTPUT_PATH}/${PARSER_LIB_PATH} -maxdepth 1 -name "$lib" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH} \;
done

find ${OUTPUT_PATH}/${PARSER_LIB_PATH} -maxdepth 1 -name "libc_sec.so" -exec cp -f {} ${OUTPUT_PATH}/${ATC_PATH} \;

tar -cf parser_lib.tar fwkacllib acllib atc
}

if [[ "X$ENABLE_GE_UT" = "Xoff" ]]; then


+ 9
- 1
cmake/external_libs/gflags.cmake View File

@@ -11,8 +11,16 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
endif()

if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/gflags/repository/archive/v2.2.2.tar.gz")
set(MD5 "")
else()
set(REQ_URL "https://github.com/gflags/gflags/archive/v2.2.2.tar.gz")
set(MD5 "")
endif ()

ExternalProject_Add(gflags_build
URL https://github.com/gflags/gflags/archive/v2.2.2.tar.gz
URL ${REQ_URL}
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${PARSER_DIR}/../../third_party/gflags/src/gflags-2.2.2
CONFIGURE_COMMAND ${CMAKE_COMMAND} -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/gflags <SOURCE_DIR>


+ 11
- 2
cmake/external_libs/json.cmake View File

@@ -5,8 +5,17 @@ endif()
include(ExternalProject)

set(JSON_SRC_DIR ${CMAKE_BINARY_DIR}/opensrc/json/include)
if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/JSON-for-Modern-CPP/repository/archive/v3.6.1.zip")
set(MD5 "5bda78ce308e6cfcf614dcf1d5ff27a7")
set(JSON_INCLUDE_DIR "${JSON_SRC_DIR}/include")
else()
set(REQ_URL "https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip")
set(MD5 "0dc903888211db3a0f170304cd9f3a89")
set(JSON_INCLUDE_DIR ${JSON_SRC_DIR})
endif ()
ExternalProject_Add(json_build
URL https://github.com/nlohmann/json/releases/download/v3.6.1/include.zip
URL ${REQ_URL}
#URL /home/txd/workspace/cloud_code/pkg/include.zip
SOURCE_DIR ${JSON_SRC_DIR}
CONFIGURE_COMMAND ""
@@ -17,7 +26,7 @@ ExternalProject_Add(json_build


add_library(json INTERFACE)
target_include_directories(json INTERFACE ${JSON_SRC_DIR})
target_include_directories(json INTERFACE ${JSON_INCLUDE_DIR})
add_dependencies(json json_build)

#set(HAVE_JSON TRUE CACHE BOOL "json build add")


+ 9
- 1
cmake/external_libs/onnx.cmake View File

@@ -6,8 +6,16 @@ set(ONNX_PROTO_DIR ${CMAKE_BINARY_DIR}/onnx)
set(ONNX_PROTO_FILE ${ONNX_PROTO_DIR}/onnx.proto)
file(MAKE_DIRECTORY ${ONNX_PROTO_DIR})

if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/ONNX/repository/archive/v1.6.0.tar.gz")
set(MD5 "1bdbcecdd68ea8392630467646776e02")
else()
set(REQ_URL "https://github.com/onnx/onnx/releases/download/v1.6.0/onnx-1.6.0.tar.gz")
set(MD5 "512f2779d6215d4a36f366b6b9acdf1e")
endif ()

ExternalProject_Add(onnx
URL https://github.com/onnx/onnx/releases/download/v1.6.0/onnx-1.6.0.tar.gz
URL ${REQ_URL}
#URL /home/txd/workspace/cloud_code/pkg/onnx-1.6.0.tar.gz
#URL_HASH SHA256=3b88c3fe521151651a0403c4d131cb2e0311bd28b753ef692020a432a81ce345
#SOURCE_DIR ${ONNX_SRC_DIR}


+ 9
- 1
cmake/external_libs/protobuf_shared.cmake View File

@@ -11,10 +11,18 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
endif()

if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz")
set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236")
else()
set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz")
set(MD5 "3d9e32700639618a4d2d342c99d4507a")
endif ()

set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(protobuf_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
URL ${REQ_URL}
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0
#DOWNLOAD_COMMAND ${CMAKE_COMMAND} -E copy_directory ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0 <SOURCE_DIR>


+ 9
- 1
cmake/external_libs/protobuf_static.cmake View File

@@ -8,11 +8,19 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
endif()

if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz")
set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236")
else()
set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz")
set(MD5 "3d9e32700639618a4d2d342c99d4507a")
endif ()

set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
set(PROTOBUF_STATIC_PKG_DIR ${CMAKE_INSTALL_PREFIX}/protobuf_static)
ExternalProject_Add(protobuf_static_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
URL ${REQ_URL}
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${PARSER_DIR}/../../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND}


+ 10
- 1
cmake/external_libs/protoc.cmake View File

@@ -12,10 +12,19 @@ if ((${CMAKE_INSTALL_PREFIX} STREQUAL /usr/local) OR
message(STATUS "No install prefix selected, default to ${CMAKE_INSTALL_PREFIX}.")
endif()
if (ENABLE_GITEE)
set(REQ_URL "https://gitee.com/mirrors/protobuf_source/repository/archive/v3.8.0.tar.gz")
set(MD5 "eba86ae9f07ba5cfbaf8af3bc4e84236")
else()
set(REQ_URL "https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz")
set(MD5 "3d9e32700639618a4d2d342c99d4507a")
endif ()
set(protobuf_CXXFLAGS "-Wno-maybe-uninitialized -Wno-unused-parameter -fPIC -fstack-protector-all -D_FORTIFY_SOURCE=2 -D_GLIBCXX_USE_CXX11_ABI=0 -O2")
set(protobuf_LDFLAGS "-Wl,-z,relro,-z,now,-z,noexecstack")
ExternalProject_Add(protoc_build
URL https://github.com/protocolbuffers/protobuf/archive/v3.8.0.tar.gz
URL ${REQ_URL}
#URL /home/txd/workspace/linux_cmake/pkg/protobuf-3.8.0.tar.gz
#SOURCE_DIR ${PARSER_DIR}/../third_party/protobuf/src/protobuf-3.8.0
CONFIGURE_COMMAND ${CMAKE_COMMAND} -Dprotobuf_WITH_ZLIB=OFF -Dprotobuf_BUILD_TESTS=OFF -DBUILD_SHARED_LIBS=OFF -DCMAKE_CXX_FLAGS=${protobuf_CXXFLAGS} -DCMAKE_CXX_LDFLAGS=${protobuf_LDFLAGS} -DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}/protoc <SOURCE_DIR>/cmake


+ 1
- 1
metadef

@@ -1 +1 @@
Subproject commit 1cc55bcae09902b3d158993dd57bfbd1d3337066
Subproject commit bf012e65ec60b40d18936677547c94bbd1f89323

+ 14
- 13
parser/CMakeLists.txt View File

@@ -59,24 +59,12 @@ target_include_directories(fmk_parser PRIVATE
${PARSER_DIR}
${PARSER_DIR}/inc
${PARSER_DIR}/parser
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
${METADEF_DIR}/inc
${METADEF_DIR}/inc/graph
${METADEF_DIR}/inc/register
${METADEF_DIR}/inc/external
${METADEF_DIR}/inc/external/graph
${METADEF_DIR}/inc/external/register
#### independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
#### temp ####
${PARSER_DIR}/../graphengine/inc/common/util
${PARSER_DIR}/../graphengine/inc/external
@@ -84,7 +72,20 @@ target_include_directories(fmk_parser PRIVATE
${PARSER_DIR}/../graphengine/inc
${PARSER_DIR}/../graphengine/ge
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/proto/ge
${CMAKE_BINARY_DIR}/proto/ge
#### blue zone compile #####
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
#### blue independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
)

target_link_libraries(fmk_parser


+ 34
- 0
parser/caffe/caffe_parser.cc View File

@@ -20,6 +20,7 @@
#include <iostream>
#include <sstream>
#include <memory>
#include <algorithm>
#include "parser/common/convert/pb2json.h"
#include "common/debug/log.h"
#include "parser/common/acl_graph_parser_util.h"
@@ -1595,6 +1596,34 @@ void CaffeModelParser::SaveOrigionLayerTops(domi::caffe::LayerParameter &layer)
return;
}

Status CaffeModelParser::SaveDataLayerTops(const domi::caffe::LayerParameter &layer) {
string name = layer.name();
if (node_map.find(name) == node_map.end()) {
GELOGE(FAILED, "Node can not be found by layer name: %s", name.c_str());
return FAILED;
}

ge::NodePtr node = node_map[name];
GE_CHECK_NOTNULL(node);

if (node->GetType() == ge::parser::DATA) {
if (layer.top_size() != 1) {
GELOGE(FAILED, "Data layer[%s] top size must be 1, real size: %d", name.c_str(), layer.top_size());
return FAILED;
}

string top_name = layer.top(0);
auto data_top_names = ge::GetParserContext().data_top_names;
if (find(data_top_names.begin(), data_top_names.end(), top_name) != data_top_names.end()) {
GELOGE(FAILED, "Different data can not have same top name: %s.", top_name.c_str());
return FAILED;
}
ge::GetParserContext().data_top_names.push_back(top_name);
}

return SUCCESS;
}

Status CaffeModelParser::Parse(const char *model_path, ge::ComputeGraphPtr &graph) {
bool has_error = false;
GE_CHECK_NOTNULL(model_path);
@@ -1666,6 +1695,7 @@ Status CaffeModelParser::Parse(const char *model_path, ge::ComputeGraphPtr &grap
// Map of operator name and occurrence times
std::map<std::string, int32_t> layer_name_map;

GetParserContext().data_top_names.clear();
// <layername,paramnames>
std::map<std::string, std::vector<std::string>> layer_params_map;
// same param name set <paramnames,layernames>
@@ -1712,6 +1742,10 @@ Status CaffeModelParser::Parse(const char *model_path, ge::ComputeGraphPtr &grap

GE_RETURN_WITH_LOG_IF_ERROR(AddBlobsToMap(layer, inplace_blob_name_remapping),
"Caffe parser add blobs to map ret fail.");
if (SaveDataLayerTops(layer) != SUCCESS) {
GELOGE(FAILED, "Caffe parse: save data layer tops failed.");
return FAILED;
}
}
// Find a layer with the same param name and save it to graph
GE_RETURN_WITH_LOG_IF_ERROR(FindShareParamLayers(layer_params_map),


+ 2
- 0
parser/caffe/caffe_parser.h View File

@@ -343,6 +343,8 @@ class CaffeModelParser : public domi::ModelParser {

Status ParseOutputNodeTopInfo(const domi::caffe::NetParameter &proto_message);

Status SaveDataLayerTops(const domi::caffe::LayerParameter &layer);

std::map<std::string, ge::NodePtr> node_map;

// key: blob name, value: layer name and index


+ 13
- 12
parser/common/CMakeLists.txt View File

@@ -41,24 +41,12 @@ target_include_directories(parser_common PRIVATE
${CMAKE_CURRENT_LIST_DIR}
${PARSER_DIR}
${PARSER_DIR}/parser
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
${METADEF_DIR}/inc
${METADEF_DIR}/inc/graph
${METADEF_DIR}/inc/register
${METADEF_DIR}/inc/external
${METADEF_DIR}/inc/external/graph
${METADEF_DIR}/inc/external/register
#### independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
#### temp ####
${PARSER_DIR}/../graphengine/inc/common/util
${PARSER_DIR}/../graphengine/inc/external
@@ -67,6 +55,19 @@ target_include_directories(parser_common PRIVATE
${PARSER_DIR}/../graphengine/ge
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/proto/ge
#### blue zone compile #####
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
#### independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
)

target_link_libraries(parser_common PRIVATE


+ 3
- 0
parser/common/proto/insert_op.proto View File

@@ -45,6 +45,9 @@ message AippOpParams {
// 标识对模型的第几个输入做AIPP处理,例如模型有两个输入,需要对第2个输入做AIPP,则配置related_input_rank为1。
uint32 related_input_rank = 2;
// related_input_name is optional and the top name of data node which inserts aipp
string related_input_name = 6;
// input_edge_idx参数为可选,类型为整型,配置范围为>=0。
// 配置该参数的作用,在于对Data算子不同的输出做不同的AIPP处理,如果该参数没有配置,默认对related_input_rank指定的模型输入的所有输出边做AIPP。
// 配置值 <= Data算子输出边的个数。


+ 13
- 12
parser/onnx/CMakeLists.txt View File

@@ -29,24 +29,12 @@ target_include_directories(fmk_onnx_parser PRIVATE
${PARSER_DIR}
${PARSER_DIR}/inc
${PARSER_DIR}/parser
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
${METADEF_DIR}/inc
${METADEF_DIR}/inc/graph
${METADEF_DIR}/inc/register
${METADEF_DIR}/inc/external
${METADEF_DIR}/inc/external/graph
${METADEF_DIR}/inc/external/register
#### independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
#### temp ####
${PARSER_DIR}/../graphengine/inc/common/util
${PARSER_DIR}/../graphengine/inc/external
@@ -55,6 +43,19 @@ target_include_directories(fmk_onnx_parser PRIVATE
${PARSER_DIR}/../graphengine/ge
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}/proto/ge
#### blue zone compile #####
${PARSER_DIR}/../ge
${PARSER_DIR}/../inc
${PARSER_DIR}/../inc/common/util
${PARSER_DIR}/../inc/framework
${PARSER_DIR}/../inc/external
${PARSER_DIR}/../third_party/fwkacllib/inc
#### independent compile #####
${METADEF_DIR}/third_party/graphengine/ge
${METADEF_DIR}/third_party/graphengine/inc
${METADEF_DIR}/third_party/graphengine/inc/framework
${METADEF_DIR}/third_party/graphengine/inc/external
${METADEF_DIR}/third_party/fwkacllib/inc
)

target_link_libraries(fmk_onnx_parser PRIVATE


+ 3
- 0
parser/proto/insert_op.proto View File

@@ -45,6 +45,9 @@ message AippOpParams {
// 标识对模型的第几个输入做AIPP处理,例如模型有两个输入,需要对第2个输入做AIPP,则配置related_input_rank为1。
uint32 related_input_rank = 2;
// related_input_name is optional and the top name of data node which inserts aipp
string related_input_name = 6;
// input_edge_idx参数为可选,类型为整型,配置范围为>=0。
// 配置该参数的作用,在于对Data算子不同的输出做不同的AIPP处理,如果该参数没有配置,默认对related_input_rank指定的模型输入的所有输出边做AIPP。
// 配置值 <= Data算子输出边的个数。


+ 3
- 0
parser/tensorflow/proto/insert_op.proto View File

@@ -45,6 +45,9 @@ message AippOpParams {
// 标识对模型的第几个输入做AIPP处理,例如模型有两个输入,需要对第2个输入做AIPP,则配置related_input_rank为1。
uint32 related_input_rank = 2;
// related_input_name is optional and the top name of data node which inserts aipp
string related_input_name = 6;
// input_edge_idx参数为可选,类型为整型,配置范围为>=0。
// 配置该参数的作用,在于对Data算子不同的输出做不同的AIPP处理,如果该参数没有配置,默认对related_input_rank指定的模型输入的所有输出边做AIPP。
// 配置值 <= Data算子输出边的个数。


Loading…
Cancel
Save