aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Avijit <30507445+avijit-nervana@users.noreply.github.com>2018-08-22 17:51:05 -0700
committerGravatar GitHub <noreply@github.com>2018-08-22 17:51:05 -0700
commitb425b0ed272a28ccb6dbc3d3ab937da257b7f02d (patch)
treef92eb0b728b972c4160c4f8a1906acf065a3dbf7 /third_party
parent792aa3d576242b83ad38c36f7e50fc4f5714b561 (diff)
Avijit/fix broken unit tests
* Fixed the dependencies with `str(Label(...))` so that third_party codes that refer to the tensorflow as a submodule get it properly resolved.
Diffstat (limited to 'third_party')
-rw-r--r--third_party/mkl/build_defs.bzl24
1 files changed, 10 insertions, 14 deletions
diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl
index 06a8c3518c..9970a772fe 100644
--- a/third_party/mkl/build_defs.bzl
+++ b/third_party/mkl/build_defs.bzl
@@ -26,7 +26,7 @@ def if_mkl(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- "//third_party/mkl:using_mkl": if_true,
+ str(Label("//third_party/mkl:using_mkl")): if_true,
"//conditions:default": if_false,
})
@@ -42,9 +42,8 @@ def if_mkl_ml(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- "//third_party/mkl_dnn:using_mkl_dnn_only":
- if_false,
- "//third_party/mkl:using_mkl": if_true,
+ str(Label("//third_party/mkl_dnn:using_mkl_dnn_only")): if_false,
+ str(Label("//third_party/mkl:using_mkl")): if_true,
"//conditions:default": if_false,
})
@@ -59,7 +58,7 @@ def if_mkl_ml_only(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- "//third_party/mkl:using_mkl_ml_only": if_true,
+ str(Label("//third_party/mkl:using_mkl_ml_only")): if_true,
"//conditions:default": if_false,
})
@@ -76,7 +75,7 @@ def if_mkl_lnx_x64(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- "//third_party/mkl:using_mkl_lnx_x64": if_true,
+ str(Label("//third_party/mkl:using_mkl_lnx_x64")): if_true,
"//conditions:default": if_false,
})
@@ -90,16 +89,13 @@ def mkl_deps():
inclusion in the deps attribute of rules.
"""
return select({
- "//third_party/mkl_dnn:using_mkl_dnn_only":
- ["@mkl_dnn"],
- "//third_party/mkl:using_mkl_ml_only":
- ["//third_party/mkl:intel_binary_blob"],
- "//third_party/mkl:using_mkl":
- [
+ str(Label("//third_party/mkl_dnn:using_mkl_dnn_only")): ["@mkl_dnn"],
+ str(Label("//third_party/mkl:using_mkl_ml_only")): ["//third_party/mkl:intel_binary_blob"],
+ str(Label("//third_party/mkl:using_mkl")): [
"//third_party/mkl:intel_binary_blob",
- "@mkl_dnn"
+ "@mkl_dnn",
],
- "//conditions:default": []
+ "//conditions:default": [],
})
def _enable_local_mkl(repository_ctx):