From 121e0161c5a7273c5a59f1e10a8577428c685796 Mon Sep 17 00:00:00 2001 From: Avijit <30507445+avijit-nervana@users.noreply.github.com> Date: Tue, 24 Jul 2018 23:35:27 -0700 Subject: 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 --- tensorflow/BUILD | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tensorflow/BUILD') diff --git a/tensorflow/BUILD b/tensorflow/BUILD index 51eea94847..6d443eb9f2 100644 --- a/tensorflow/BUILD +++ b/tensorflow/BUILD @@ -24,6 +24,8 @@ load( "gen_api_init_files", # @unused ) +load("//third_party/ngraph:build_defs.bzl", "if_ngraph") + # Config setting for determining if we are building for Android. config_setting( name = "android", @@ -408,6 +410,14 @@ config_setting( visibility = ["//visibility:public"], ) +# This flag is set from the configure step when the user selects with nGraph option. +# By default it should be false +config_setting( + name = "with_ngraph_support", + values = {"define": "with_ngraph_support=true"}, + visibility = ["//visibility:public"], +) + package_group( name = "internal", packages = [ @@ -540,7 +550,7 @@ tf_cc_shared_object( "//tensorflow/c:version_script.lds", "//tensorflow/c/eager:c_api", "//tensorflow/core:tensorflow", - ], + ] ) tf_cc_shared_object( @@ -568,7 +578,7 @@ tf_cc_shared_object( "//tensorflow/cc:scope", "//tensorflow/cc/profiler", "//tensorflow/core:tensorflow", - ], + ] + if_ngraph(["@ngraph_tf//:ngraph_tf"]) ) exports_files( -- cgit v1.2.3