From 668d8b3e0452c00a4396dd560c58a729488d67a3 Mon Sep 17 00:00:00 2001 From: xuming Date: Fri, 6 Nov 2020 09:54:02 +0800 Subject: [PATCH] adapted to ge headfile change --- CMakeLists.txt | 6 +++++- tf_adapter/BUILD | 8 +++++++- tf_adapter/module.BUILD | 18 ++++++++++++++++-- workspace.bzl.tpl | 12 ++++++++++++ 4 files changed, 40 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index dc85f683c..4eb9bc83a 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,6 +82,10 @@ else() ${TOP_DIR}/inc/common/ ${TOP_DIR}/inc/soft_dp/ ${TOP_DIR}/soft_dp/ + ${TOP_DIR}/graphengine/inc/ + ${TOP_DIR}/graphengine/inc/external/ + ${TOP_DIR}/metadef/inc/ + ${TOP_DIR}/metadef/inc/external/ ${TOP_DIR}/libc_sec/include/ ${TOP_DIR}/third_party/json/include/ ${TOP_DIR}/third_party/tensorflow/tensorflow-1.15.0/ @@ -163,4 +167,4 @@ else() install(FILES ${CMAKE_CURRENT_BINARY_DIR}/npu_bridge-1.15.0-py3-none-any.whl OPTIONAL DESTINATION ${INSTALL_LIBRARY_DIR} ) -endif() \ No newline at end of file +endif() diff --git a/tf_adapter/BUILD b/tf_adapter/BUILD index 66feb93a9..d28056115 100644 --- a/tf_adapter/BUILD +++ b/tf_adapter/BUILD @@ -16,6 +16,10 @@ cc_binary( # so that can ensure the protobuf version is consistent with the installed tensorflow "-Iexternal/installed_tensorflow/include", "-Iexternal/org_tensorflow", + "-Iexternal/graphengine_extend_hdrs", + "-Iexternal/graphengine_extend_hdrs/external", + "-Iexternal/metadef_extend_hdrs", + "-Iexternal/metadef_extend_hdrs/external", "-Iexternal/tf_adapter_extend_hdrs", "-Iexternal/tf_adapter_extend_hdrs/external", "-Iexternal/local_nlohmann_json_lib/", @@ -58,9 +62,11 @@ cc_binary( # "@installed_tensorflow_libs//:installed_tensorflow_libs", "@local_nlohmann_json_lib//:local_nlohmann_json_lib", - "@tf_adapter_extend_hdrs//:tf_adapter_extend_hdrs", "@sec_lib//:sec_lib", "@python_include//:python_include", + "@graphengine_extend_hdrs//:graphengine_extend_hdrs", + "@metadef_extend_hdrs//:metadef_extend_hdrs", + "@tf_adapter_extend_hdrs//:tf_adapter_extend_hdrs", ], ) diff --git a/tf_adapter/module.BUILD b/tf_adapter/module.BUILD index d11465d35..d95f2a136 100644 --- a/tf_adapter/module.BUILD +++ b/tf_adapter/module.BUILD @@ -13,8 +13,6 @@ cc_library( cc_library( name = "tf_adapter_extend_hdrs", srcs = glob([ - "framework/**/*.h", "framework/**/*.hpp", - "graph/**/*.h", "graph/**/*.hpp", "hccl/**/*.h", "hccl/**/*.hpp", "tdt/**/*.h", "tdt/**/*.hpp", "runtime/**/*.h", "runtime/**/*.hpp", @@ -23,6 +21,22 @@ cc_library( ]), ) +cc_library( + name = "graphengine_extend_hdrs", + srcs = glob([ + "framework/**/*.h", "framework/**/*.hpp", + "external/**/*.h" + ]), +) + +cc_library( + name = "metadef_extend_hdrs", + srcs = glob([ + "graph/**/*.h", "graph/**/*.hpp", + "external/**/*.h" + ]), +) + cc_library( name = "tf_adapter_host_libs", srcs = glob([ diff --git a/workspace.bzl.tpl b/workspace.bzl.tpl index ac1d7a338..f231d7df9 100644 --- a/workspace.bzl.tpl +++ b/workspace.bzl.tpl @@ -27,6 +27,18 @@ def tf_adapter_workspace(): build_file = "@tf_adapter//tf_adapter:module.BUILD", ) + native.new_local_repository( + name = "graphengine_extend_hdrs", + path = extend_base() + "graphengine/inc", + build_file = "@tf_adapter//tf_adapter:module.BUILD", + ) + + native.new_local_repository( + name = "metadef_extend_hdrs", + path = extend_base() + "metadef/inc", + build_file = "@tf_adapter//tf_adapter:module.BUILD", + ) + native.new_local_repository( name="installed_tensorflow", path=extend_base() + "third_party/tensorflow/compile_deps/tf-1.15.0", -- Gitee