diff options
author | Avijit <30507445+avijit-nervana@users.noreply.github.com> | 2018-07-24 23:35:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-24 23:35:27 -0700 |
commit | 121e0161c5a7273c5a59f1e10a8577428c685796 (patch) | |
tree | fb6b99b4af3accd9c68d05442be95f9250b59604 /third_party/ngraph/build_defs.bzl | |
parent | 80fb8679ab14ba3d180e8eb22da11509a15b9219 (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/build_defs.bzl')
-rw-r--r-- | third_party/ngraph/build_defs.bzl | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/third_party/ngraph/build_defs.bzl b/third_party/ngraph/build_defs.bzl new file mode 100644 index 0000000000..2c9027a6b8 --- /dev/null +++ b/third_party/ngraph/build_defs.bzl @@ -0,0 +1,16 @@ +def clean_dep(dep): + return str(Label(dep)) + +def if_ngraph(a): + """Shorthand for select()'ing on whether we're building with nGraph support. + + Returns a select statement which evaluates to if_true if we're building + with nGraph. Otherwise, the select statement evaluates to default. + + """ + ret_val = select({ + clean_dep("//tensorflow:with_ngraph_support"): a, + "//conditions:default": [] + }) + + return ret_val |