From b425b0ed272a28ccb6dbc3d3ab937da257b7f02d Mon Sep 17 00:00:00 2001 From: Avijit <30507445+avijit-nervana@users.noreply.github.com> Date: Wed, 22 Aug 2018 17:51:05 -0700 Subject: 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. --- third_party/mkl/build_defs.bzl | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'third_party') 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): -- cgit v1.2.3