Browse Source

Bugfix: support unknown control op subgraph

pull/1322/head
lichun 4 years ago
parent
commit
6426aab7d3
7 changed files with 63 additions and 62 deletions
  1. +52
    -52
      ge/CMakeLists.txt
  2. +2
    -2
      ge/common/CMakeLists.txt
  3. +2
    -2
      ge/executor/CMakeLists.txt
  4. +3
    -3
      ge/ge_local_engine/CMakeLists.txt
  5. +2
    -2
      ge/host_cpu_engine/CMakeLists.txt
  6. +1
    -1
      ge/offline/CMakeLists.txt
  7. +1
    -0
      tests/ut/ge/hybrid/ge_hybrid_unittest.cc

+ 52
- 52
ge/CMakeLists.txt View File

@@ -28,59 +28,59 @@ set(PROTO_HEADER_LIST
"${METADEF_DIR}/proto/op_mapping_info.proto"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge PROTO_CLIENT_SRCS PROTO_CLIENT_HDRS ${PROTO_CLIENT_LIST})
protobuf_generate(ge PROTO_HEADER_SRCS PROTO_HEADER_HDRS ${PROTO_HEADER_LIST})
protobuf_generate(ge_client PROTO_CLIENT_HEADER_SRCS PROTO_CLIENT_HEADER_HDRS ${PROTO_HEADER_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_CLIENT_SRCS PROTO_CLIENT_HDRS ${PROTO_CLIENT_LIST})
#protobuf_generate(ge PROTO_HEADER_SRCS PROTO_HEADER_HDRS ${PROTO_HEADER_LIST})
#protobuf_generate(ge_client PROTO_CLIENT_HEADER_SRCS PROTO_CLIENT_HEADER_HDRS ${PROTO_HEADER_LIST})

if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
############ libge_proto_common.a ############
add_library(ge_proto_common STATIC
${PROTO_HEADER_HDRS}
${PROTO_SRCS}
)
target_compile_definitions(ge_proto_common PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
google=ascend_private
)
target_compile_options(ge_proto_common PRIVATE
-O2
-fno-common
)
target_link_libraries(ge_proto_common PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf
)
############ libge_proto_client.a ############
add_library(ge_proto_client STATIC
${PROTO_CLIENT_HEADER_HDRS}
${PROTO_CLIENT_SRCS}
)
target_compile_definitions(ge_proto_client PRIVATE
PROTOBUF_INLINE_NOT_IN_HEADERS=0
google=ascend_private
)
target_include_directories(ge_proto_client PRIVATE
${CMAKE_BINARY_DIR}/proto/ge_client
${CMAKE_BINARY_DIR}/proto/ge_client/proto
)
target_compile_options(ge_proto_client PRIVATE
-O2
-fno-common
)
target_link_libraries(ge_proto_client PRIVATE
$<BUILD_INTERFACE:intf_pub>
ascend_protobuf
)
endif ()
#if (NOT ENABLE_D AND NOT ENABLE_ACL AND NOT ENABLE_MS_TESTCASES)
############# libge_proto_common.a ############
#add_library(ge_proto_common STATIC
# ${PROTO_HEADER_HDRS}
# ${PROTO_SRCS}
#)
#
#target_compile_definitions(ge_proto_common PRIVATE
# PROTOBUF_INLINE_NOT_IN_HEADERS=0
# google=ascend_private
#)
#
#target_compile_options(ge_proto_common PRIVATE
# -O2
# -fno-common
#)
#
#target_link_libraries(ge_proto_common PRIVATE
# $<BUILD_INTERFACE:intf_pub>
# ascend_protobuf
#)
#
############# libge_proto_client.a ############
#add_library(ge_proto_client STATIC
# ${PROTO_CLIENT_HEADER_HDRS}
# ${PROTO_CLIENT_SRCS}
#)
#
#target_compile_definitions(ge_proto_client PRIVATE
# PROTOBUF_INLINE_NOT_IN_HEADERS=0
# google=ascend_private
#)
#
#target_include_directories(ge_proto_client PRIVATE
# ${CMAKE_BINARY_DIR}/proto/ge_client
# ${CMAKE_BINARY_DIR}/proto/ge_client/proto
#)
#
#target_compile_options(ge_proto_client PRIVATE
# -O2
# -fno-common
#)
#
#target_link_libraries(ge_proto_client PRIVATE
# $<BUILD_INTERFACE:intf_pub>
# ascend_protobuf
#)
#endif ()

##################################################################
set(TRAIN_SRC_LIST


+ 2
- 2
ge/common/CMakeLists.txt View File

@@ -15,8 +15,8 @@ set(PROTO_LIST
"${METADEF_DIR}/proto/tensorflow/versions.proto"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge_static PROTO_STATIC_SRCS PROTO_STATIC_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge_static PROTO_STATIC_SRCS PROTO_STATIC_HDRS ${PROTO_LIST})

set(SRC_LIST
"context/ctx.cc"


+ 2
- 2
ge/executor/CMakeLists.txt View File

@@ -7,8 +7,8 @@ set(PROTO_LIST
"${METADEF_DIR}/proto/dump_task.proto"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge_static PROTO_STATIC_SRCS PROTO_STATIC_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge_static PROTO_STATIC_SRCS PROTO_STATIC_HDRS ${PROTO_LIST})

set(SRC_LIST
"ge_executor.cc"


+ 3
- 3
ge/ge_local_engine/CMakeLists.txt View File

@@ -19,9 +19,9 @@ set(OPS_KERNEL_SRC_LIST
"ops_kernel_store/op/no_op.cc"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge_ops_shared PROTO_OPS_SHARED_SRCS PROTO_OPS_SHARED_HDRS ${PROTO_LIST})
protobuf_generate(ge_ops_static PROTO_OPS_STATIC_SRCS PROTO_OPS_STATIC_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge_ops_shared PROTO_OPS_SHARED_SRCS PROTO_OPS_SHARED_HDRS ${PROTO_LIST})
#protobuf_generate(ge_ops_static PROTO_OPS_STATIC_SRCS PROTO_OPS_STATIC_HDRS ${PROTO_LIST})

############ libge_local_engine.so ############
add_library(ge_local_engine SHARED ${SRC_LIST} ${PROTO_HDRS})


+ 2
- 2
ge/host_cpu_engine/CMakeLists.txt View File

@@ -2,8 +2,8 @@ set(PROTO_LIST
"${METADEF_DIR}/proto/task.proto"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
protobuf_generate(ge_atcstub PROTO_ATCSTUB_SRCS PROTO_ATCSTUB_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge_atcstub PROTO_ATCSTUB_SRCS PROTO_ATCSTUB_HDRS ${PROTO_LIST})

set(SRC_LIST
"engine/host_cpu_engine.cc"


+ 1
- 1
ge/offline/CMakeLists.txt View File

@@ -5,7 +5,7 @@ set(PROTO_LIST
"${METADEF_DIR}/proto/task.proto"
)

protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})
#protobuf_generate(ge PROTO_SRCS PROTO_HDRS ${PROTO_LIST})

set(SRC_LIST
"main.cc"


+ 1
- 0
tests/ut/ge/hybrid/ge_hybrid_unittest.cc View File

@@ -283,6 +283,7 @@ TEST_F(UtestGeHybrid, unfold_subgraphs_success) {
auto partitioned_call_op_desc = MakeShared<OpDesc>("partitioned_call", PARTITIONEDCALL);
auto partitioned_call_node = root_graph->AddNode(partitioned_call_op_desc);
partitioned_call_node->GetOpDesc()->AddSubgraphName("sub_graph");
partitioned_call_node->GetOpDesc()->SetSubgraphInstanceName(0, "sub_graph");

sub_sub_graph1->AddSubGraph(sub_sub_graph1);
sub_sub_graph2->AddSubGraph(sub_sub_graph2);


Loading…
Cancel
Save