aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/ngraph/ngraph_tf.BUILD
diff options
context:
space:
mode:
authorGravatar Avijit <30507445+avijit-nervana@users.noreply.github.com>2018-07-24 23:35:27 -0700
committerGravatar GitHub <noreply@github.com>2018-07-24 23:35:27 -0700
commit121e0161c5a7273c5a59f1e10a8577428c685796 (patch)
treefb6b99b4af3accd9c68d05442be95f9250b59604 /third_party/ngraph/ngraph_tf.BUILD
parent80fb8679ab14ba3d180e8eb22da11509a15b9219 (diff)
nGraph integration with TensorFlow
* Added nGraph bridge as a third_party to be built with TensorFlow based on user selection. * Added a limited set of C++ unit tests to verify the correctness of the computation
Diffstat (limited to 'third_party/ngraph/ngraph_tf.BUILD')
-rw-r--r--third_party/ngraph/ngraph_tf.BUILD96
1 files changed, 96 insertions, 0 deletions
diff --git a/third_party/ngraph/ngraph_tf.BUILD b/third_party/ngraph/ngraph_tf.BUILD
new file mode 100644
index 0000000000..bbac74db0f
--- /dev/null
+++ b/third_party/ngraph/ngraph_tf.BUILD
@@ -0,0 +1,96 @@
+licenses(["notice"]) # 3-Clause BSD
+
+exports_files(["license.txt"])
+
+filegroup(
+ name = "LICENSE",
+ srcs = [
+ "license.txt",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+load(
+ "@org_tensorflow//tensorflow:tensorflow.bzl",
+ "tf_cc_test"
+)
+
+cc_library(
+ name = "ngraph_libs_linux",
+ srcs = [
+ "lib/libiomp5.so",
+ "lib/libmklml_intel.so",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+cc_library(
+ name = "ngraph_tf",
+ srcs =
+ [
+ "src/ngraph_builder.h",
+ "src/ngraph_builder.cc",
+ "src/ngraph_cluster.h",
+ "src/ngraph_cluster.cc",
+ "src/ngraph_cluster_manager.h",
+ "src/ngraph_cluster_manager.cc",
+ "src/ngraph_confirm_pass.cc",
+ "src/ngraph_device.cc",
+ "src/ngraph_encapsulate_op.cc",
+ "src/ngraph_encapsulate_pass.cc",
+ "src/ngraph_freshness_tracker.h",
+ "src/ngraph_freshness_tracker.cc",
+ "src/ngraph_graph_rewrite_passes.cc",
+ "src/ngraph_liberate_pass.cc",
+ "src/ngraph_op_kernels.cc",
+ "src/ngraph_stub_ops.cc",
+ "src/ngraph_utils.h",
+ "src/ngraph_utils.cc",
+ "src/ngraph_send_recv_ops.cc",
+ "src/ngraph_variable_ops.cc",
+ "src/tf_graphcycles.cc",
+ "logging/ngraph_log.h",
+ "logging/ngraph_log.cc",
+ "logging/tf_graph_writer.h",
+ "logging/tf_graph_writer.cc",
+ ],
+ hdrs = [
+ "src/tf_graphcycles.h"
+ ],
+ deps = [
+ "@org_tensorflow//tensorflow/core:protos_all_proto_text",
+ "@org_tensorflow//tensorflow/core:framework_headers_lib",
+ "@org_tensorflow//tensorflow/core:core_cpu_headers_lib",
+ "@ngraph//:ngraph_core"
+ ],
+ copts = [
+ "-I external/ngraph_tf/src",
+ "-I external/ngraph_tf/logging",
+ "-I external/ngraph/src",
+ "-D NGRAPH_EMBEDDED_IN_TENSORFLOW=1",
+ ],
+ visibility = ["//visibility:public"],
+)
+
+tf_cc_test(
+ name = "ngraph_tf_tests",
+ size = "small",
+ srcs = [
+ "test/tf_exec.cpp",
+ "test/main.cpp",
+ ],
+ deps = [
+ ":ngraph_tf",
+ "@com_google_googletest//:gtest",
+ "@org_tensorflow//tensorflow/cc:cc_ops",
+ "@org_tensorflow//tensorflow/cc:client_session",
+ "@org_tensorflow//tensorflow/core:tensorflow",
+ ],
+ extra_copts = [
+ "-fexceptions ",
+ "-D NGRAPH_EMBEDDED_IN_TENSORFLOW=1",
+ "-I external/ngraph_tf/src",
+ "-I external/ngraph_tf/logging",
+ "-I external/ngraph/src",
+ ],
+)