aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar jayfurmanek <furmanek@us.ibm.com>2018-09-26 07:41:29 -0500
committerGravatar GitHub <noreply@github.com>2018-09-26 07:41:29 -0500
commit49978a87c80d85f8eea71e003265b788aa5febc3 (patch)
treea46260d71a4ea505871b448a0f48f5b8dc2ed7a4 /third_party
parent09bf8eb99cd76c506dcd2a0e8c8e893f7f3916b1 (diff)
parente45f7ee4182d5e831026f329cff5da2596d6733a (diff)
Merge branch 'master' into nccl2_configure
Diffstat (limited to 'third_party')
-rw-r--r--third_party/gpus/cuda_configure.bzl2
-rw-r--r--third_party/mkl/BUILD23
-rw-r--r--third_party/mkl/build_defs.bzl41
-rw-r--r--third_party/mkl_dnn/BUILD6
-rw-r--r--third_party/mkl_dnn/build_defs.bzl2
5 files changed, 52 insertions, 22 deletions
diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
index 5648b1525a..f5fdd3a75e 100644
--- a/third_party/gpus/cuda_configure.bzl
+++ b/third_party/gpus/cuda_configure.bzl
@@ -48,6 +48,7 @@ _DEFAULT_CUDA_COMPUTE_CAPABILITIES = ["3.5", "5.2"]
CUDA_LIB_PATHS = [
"lib64/",
"lib64/stubs/",
+ "lib/powerpc64le-linux-gnu/",
"lib/x86_64-linux-gnu/",
"lib/x64/",
"lib/",
@@ -70,6 +71,7 @@ CUPTI_HEADER_PATHS = [
# the other CUDA libraries but rather in a special extras/CUPTI directory.
CUPTI_LIB_PATHS = [
"extras/CUPTI/lib64/",
+ "lib/powerpc64le-linux-gnu/",
"lib/x86_64-linux-gnu/",
"lib64/",
"extras/CUPTI/libx64/",
diff --git a/third_party/mkl/BUILD b/third_party/mkl/BUILD
index efff7fd51b..15a3e5cfa7 100644
--- a/third_party/mkl/BUILD
+++ b/third_party/mkl/BUILD
@@ -1,26 +1,26 @@
licenses(["notice"]) # 3-Clause BSD
config_setting(
- name = "using_mkl",
+ name = "build_with_mkl",
define_values = {
- "using_mkl": "true",
+ "build_with_mkl": "true",
},
visibility = ["//visibility:public"],
)
config_setting(
- name = "using_mkl_ml_only",
+ name = "build_with_mkl_ml_only",
define_values = {
- "using_mkl": "true",
- "using_mkl_ml_only": "true",
+ "build_with_mkl": "true",
+ "build_with_mkl_ml_only": "true",
},
visibility = ["//visibility:public"],
)
config_setting(
- name = "using_mkl_lnx_x64",
+ name = "build_with_mkl_lnx_x64",
define_values = {
- "using_mkl": "true",
+ "build_with_mkl": "true",
},
values = {
"cpu": "k8",
@@ -28,6 +28,15 @@ config_setting(
visibility = ["//visibility:public"],
)
+config_setting(
+ name = "enable_mkl",
+ define_values = {
+ "enable_mkl": "true",
+ "build_with_mkl": "true",
+ },
+ visibility = ["//visibility:public"],
+)
+
load(
"//third_party/mkl:build_defs.bzl",
"if_mkl",
diff --git a/third_party/mkl/build_defs.bzl b/third_party/mkl/build_defs.bzl
index b645c0fc5c..bb798e715a 100644
--- a/third_party/mkl/build_defs.bzl
+++ b/third_party/mkl/build_defs.bzl
@@ -1,9 +1,11 @@
# -*- Python -*-
"""Skylark macros for MKL.
-if_mkl is a conditional to check if MKL is enabled or not.
-if_mkl_ml is a conditional to check if MKL-ML is enabled.
+
+if_mkl is a conditional to check if we are building with MKL.
+if_mkl_ml is a conditional to check if we are building with MKL-ML.
if_mkl_ml_only is a conditional to check for MKL-ML-only (no MKL-DNN) mode.
if_mkl_lnx_x64 is a conditional to check for MKL
+if_enable_mkl is a conditional to check if building with MKL and MKL is enabled.
mkl_repository is a repository rule for creating MKL repository rule that can
be pointed to either a local folder, or download it from the internet.
@@ -24,7 +26,7 @@ def if_mkl(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- str(Label("//third_party/mkl:using_mkl")): if_true,
+ str(Label("//third_party/mkl:build_with_mkl")): if_true,
"//conditions:default": if_false,
})
@@ -40,8 +42,8 @@ def if_mkl_ml(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- str(Label("//third_party/mkl_dnn:using_mkl_dnn_only")): if_false,
- str(Label("//third_party/mkl:using_mkl")): if_true,
+ str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_false,
+ str(Label("//third_party/mkl:build_with_mkl")): if_true,
"//conditions:default": if_false,
})
@@ -56,12 +58,12 @@ def if_mkl_ml_only(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- str(Label("//third_party/mkl:using_mkl_ml_only")): if_true,
+ str(Label("//third_party/mkl:build_with_mkl_ml_only")): if_true,
"//conditions:default": if_false,
})
def if_mkl_lnx_x64(if_true, if_false = []):
- """Shorthand to select() on if MKL is on and the target is Linux x86-64.
+ """Shorthand to select() if building with MKL and the target is Linux x86-64.
Args:
if_true: expression to evaluate if building with MKL is enabled and the
@@ -73,7 +75,24 @@ def if_mkl_lnx_x64(if_true, if_false = []):
a select evaluating to either if_true or if_false as appropriate.
"""
return select({
- str(Label("//third_party/mkl:using_mkl_lnx_x64")): if_true,
+ str(Label("//third_party/mkl:build_with_mkl_lnx_x64")): if_true,
+ "//conditions:default": if_false,
+ })
+
+def if_enable_mkl(if_true, if_false = []):
+ """Shorthand to select() if we are building with MKL and MKL is enabled.
+
+ This is only effective when built with MKL.
+
+ Args:
+ if_true: expression to evaluate if building with MKL and MKL is enabled
+ if_false: expression to evaluate if building without MKL or MKL is not enabled.
+
+ Returns:
+ A select evaluating to either if_true or if_false as appropriate.
+ """
+ return select({
+ "//third_party/mkl:enable_mkl": if_true,
"//conditions:default": if_false,
})
@@ -87,9 +106,9 @@ def mkl_deps():
inclusion in the deps attribute of rules.
"""
return select({
- 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")): [
+ str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): ["@mkl_dnn"],
+ str(Label("//third_party/mkl:build_with_mkl_ml_only")): ["//third_party/mkl:intel_binary_blob"],
+ str(Label("//third_party/mkl:build_with_mkl")): [
"//third_party/mkl:intel_binary_blob",
"@mkl_dnn",
],
diff --git a/third_party/mkl_dnn/BUILD b/third_party/mkl_dnn/BUILD
index 3e567fa9fc..58ecda55e6 100644
--- a/third_party/mkl_dnn/BUILD
+++ b/third_party/mkl_dnn/BUILD
@@ -3,10 +3,10 @@ licenses(["notice"])
exports_files(["LICENSE"])
config_setting(
- name = "using_mkl_dnn_only",
+ name = "build_with_mkl_dnn_only",
define_values = {
- "using_mkl": "true",
- "using_mkl_dnn_only": "true",
+ "build_with_mkl": "true",
+ "build_with_mkl_dnn_only": "true",
},
visibility = ["//visibility:public"],
)
diff --git a/third_party/mkl_dnn/build_defs.bzl b/third_party/mkl_dnn/build_defs.bzl
index 7ce2a7d9b0..6388f31971 100644
--- a/third_party/mkl_dnn/build_defs.bzl
+++ b/third_party/mkl_dnn/build_defs.bzl
@@ -8,6 +8,6 @@ def if_mkl_open_source_only(if_true, if_false = []):
"""
return select({
- str(Label("//third_party/mkl_dnn:using_mkl_dnn_only")): if_true,
+ str(Label("//third_party/mkl_dnn:build_with_mkl_dnn_only")): if_true,
"//conditions:default": if_false,
})