| @@ -1 +1 @@ | |||||
| Subproject commit c9b6960725036291ed2328f5751beb4f01247526 | |||||
| Subproject commit 4aabad33f2a0ba7380d4b0baf96712256dff53e7 | |||||
| @@ -48,6 +48,7 @@ add_library(fmk_parser SHARED ${SRC_LIST} ${PROTO_SRCS}) | |||||
| target_compile_options(fmk_parser PRIVATE | target_compile_options(fmk_parser PRIVATE | ||||
| -Werror | -Werror | ||||
| -Wno-deprecated-declarations | |||||
| ) | ) | ||||
| target_compile_definitions(fmk_parser PRIVATE | target_compile_definitions(fmk_parser PRIVATE | ||||
| @@ -32,6 +32,7 @@ add_library(parser_common SHARED ${SRC_LIST}) | |||||
| target_compile_options(parser_common PRIVATE | target_compile_options(parser_common PRIVATE | ||||
| -Werror | -Werror | ||||
| -Wno-deprecated-declarations | |||||
| ) | ) | ||||
| target_compile_definitions(parser_common PRIVATE | target_compile_definitions(parser_common PRIVATE | ||||
| @@ -5,7 +5,7 @@ include $(CLEAR_VARS) | |||||
| LOCAL_MODULE := libparser_common | LOCAL_MODULE := libparser_common | ||||
| LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | ||||
| LOCAL_CFLAGS += -Werror -Dgoogle=ascend_private | |||||
| LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations -Dgoogle=ascend_private | |||||
| ifeq ($(DEBUG), 1) | ifeq ($(DEBUG), 1) | ||||
| LOCAL_CFLAGS += -g -O0 | LOCAL_CFLAGS += -g -O0 | ||||
| endif | endif | ||||
| @@ -58,7 +58,7 @@ include $(CLEAR_VARS) | |||||
| LOCAL_MODULE := libfmk_parser | LOCAL_MODULE := libfmk_parser | ||||
| LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | ||||
| LOCAL_CFLAGS += -Werror -Dgoogle=ascend_private | |||||
| LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations -Dgoogle=ascend_private | |||||
| ifeq ($(DEBUG), 1) | ifeq ($(DEBUG), 1) | ||||
| LOCAL_CFLAGS += -g -O0 | LOCAL_CFLAGS += -g -O0 | ||||
| endif | endif | ||||
| @@ -18,6 +18,7 @@ add_library(fmk_onnx_parser SHARED ${SRC_LIST} ${PROTO_HDRS}) | |||||
| target_compile_options(fmk_onnx_parser PRIVATE | target_compile_options(fmk_onnx_parser PRIVATE | ||||
| -Werror | -Werror | ||||
| -Wno-deprecated-declarations | |||||
| ) | ) | ||||
| target_compile_definitions(fmk_onnx_parser PRIVATE | target_compile_definitions(fmk_onnx_parser PRIVATE | ||||
| @@ -6,7 +6,7 @@ include $(CLEAR_VARS) | |||||
| LOCAL_MODULE := libfmk_onnx_parser | LOCAL_MODULE := libfmk_onnx_parser | ||||
| LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | LOCAL_CFLAGS += -DPROTOBUF_INLINE_NOT_IN_HEADERS=0 | ||||
| LOCAL_CFLAGS += -Werror -Dgoogle=ascend_private | |||||
| LOCAL_CFLAGS += -Werror -Wno-deprecated-declarations -Dgoogle=ascend_private | |||||
| ifeq ($(DEBUG), 1) | ifeq ($(DEBUG), 1) | ||||
| LOCAL_CFLAGS += -g -O0 | LOCAL_CFLAGS += -g -O0 | ||||
| endif | endif | ||||
| @@ -234,11 +234,17 @@ Status PostOpProcessForSubgraph(const ParseArg &arg) { | |||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| auto post_func = domi::OpRegistry::Instance()->GetParseSubgraphPostFunc(arg.parent_node->GetType()); | |||||
| std::string op_type = arg.parent_node->GetType(); | |||||
| std::string op_name = arg.parent_node->GetName(); | |||||
| domi::ParseSubgraphFuncV2 parse_subgraph = nullptr; | |||||
| auto post_func = domi::OpRegistry::Instance()->GetParseSubgraphPostFunc(op_type); | |||||
| if (post_func == nullptr) { | if (post_func == nullptr) { | ||||
| GELOGW("The subgraph post func for node %s type %s is null", arg.parent_node->GetName().c_str(), | |||||
| arg.parent_node->GetType().c_str()); | |||||
| return SUCCESS; | |||||
| GELOGW("The subgraph post func for node %s type %s is null", op_name.c_str(), op_type.c_str()); | |||||
| if (domi::OpRegistry::Instance()->GetParseSubgraphPostFunc(op_type, parse_subgraph) != SUCCESS || | |||||
| parse_subgraph == nullptr) { | |||||
| GELOGW("The subgraph new post func for node[%s] type [%s] is null", op_name.c_str(), op_type.c_str()); | |||||
| return SUCCESS; | |||||
| } | |||||
| } | } | ||||
| GELOGD("Post process for subgraph %s node %s type %s subgraph name %s", arg.function_name.c_str(), | GELOGD("Post process for subgraph %s node %s type %s subgraph name %s", arg.function_name.c_str(), | ||||
| @@ -253,13 +259,17 @@ Status PostOpProcessForSubgraph(const ParseArg &arg) { | |||||
| } | } | ||||
| auto graph = ge::GraphUtils::CreateGraphFromComputeGraph(arg.graph); | auto graph = ge::GraphUtils::CreateGraphFromComputeGraph(arg.graph); | ||||
| auto ret = post_func(arg.subgraph_name, graph); | |||||
| Status ret = FAILED; | |||||
| if (post_func != nullptr) { | |||||
| ret = post_func(arg.subgraph_name, graph); | |||||
| } else if (parse_subgraph != nullptr) { | |||||
| ret = parse_subgraph(arg.subgraph_name.c_str(), graph); | |||||
| } | |||||
| if (ret != SUCCESS) { | if (ret != SUCCESS) { | ||||
| GELOGE(FAILED, "Failed to post-process subgraph %s on node %s type %s subgraph name %s", arg.function_name.c_str(), | GELOGE(FAILED, "Failed to post-process subgraph %s on node %s type %s subgraph name %s", arg.function_name.c_str(), | ||||
| arg.parent_node->GetName().c_str(), arg.parent_node->GetType().c_str(), arg.subgraph_name.c_str()); | arg.parent_node->GetName().c_str(), arg.parent_node->GetType().c_str(), arg.subgraph_name.c_str()); | ||||
| return FAILED; | return FAILED; | ||||
| } | } | ||||
| return SUCCESS; | return SUCCESS; | ||||
| } | } | ||||
| } // namespace | } // namespace | ||||