aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/ngraph/build_defs.bzl
diff options
context:
space:
mode:
authorGravatar avijit-nervana <avijit.chakraborty@intel.com>2018-07-31 23:04:56 -0700
committerGravatar avijit-nervana <avijit.chakraborty@intel.com>2018-07-31 23:04:56 -0700
commit2f8b328d2571625161b3c0da0a9b25b907a0927e (patch)
treed264a0d5dbfcd774cccd0f2c23d7616897c1b894 /third_party/ngraph/build_defs.bzl
parent2f3e97cf0ee50ee0e55ab1a3795cc82537426e8c (diff)
parent7ca6ee15555db77c09861fc7e84e5181001da07d (diff)
Merge remote-tracking branch 'upstream/master' and changes
based on PR review comments.
Diffstat (limited to 'third_party/ngraph/build_defs.bzl')
-rw-r--r--third_party/ngraph/build_defs.bzl10
1 files changed, 4 insertions, 6 deletions
diff --git a/third_party/ngraph/build_defs.bzl b/third_party/ngraph/build_defs.bzl
index 2c9027a6b8..8ad7515aed 100644
--- a/third_party/ngraph/build_defs.bzl
+++ b/third_party/ngraph/build_defs.bzl
@@ -1,16 +1,14 @@
def clean_dep(dep):
return str(Label(dep))
-def if_ngraph(a):
+def if_ngraph(if_true, if_false = []):
"""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 select({
+ clean_dep("//tensorflow:with_ngraph_support"): if_true,
+ "//conditions:default": if_false
})
-
- return ret_val