aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/mkl_dnn
diff options
context:
space:
mode:
authorGravatar Ilya Biryukov <ibiryukov@google.com>2018-03-19 14:48:23 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-03-19 14:52:03 -0700
commite69a3e1ac1cd0c31a8e8078982212cca1fbf988e (patch)
tree99c4e8851fd556818c3049770b6346fb95f327dd /third_party/mkl_dnn
parentff43dff34ab525dd333128c73ebfb0f9723c34c0 (diff)
Fix build breakage with downloadable clang and -fopenmp.
By disabling openmp when building with clang. If we want to enable openmp with clang, we'll probably have to have libomp as an explicit dependency. This fixes a breakage found by OS CI: https://ci.tensorflow.org/view/Nightly/job/nightly-matrix-linux-gpu-clang/215/ PiperOrigin-RevId: 189644968
Diffstat (limited to 'third_party/mkl_dnn')
-rw-r--r--third_party/mkl_dnn/mkldnn.BUILD13
1 files changed, 12 insertions, 1 deletions
diff --git a/third_party/mkl_dnn/mkldnn.BUILD b/third_party/mkl_dnn/mkldnn.BUILD
index 58bb7a6a5d..752a0d8498 100644
--- a/third_party/mkl_dnn/mkldnn.BUILD
+++ b/third_party/mkl_dnn/mkldnn.BUILD
@@ -1,5 +1,13 @@
exports_files(["LICENSE"])
+config_setting(
+ name = "clang_linux_x86_64",
+ values = {
+ "cpu": "k8",
+ "define": "using_cuda_clang=true",
+ },
+)
+
cc_library(
name = "mkl_dnn",
srcs = glob([
@@ -9,8 +17,11 @@ cc_library(
hdrs = glob(["include/*"]),
copts = ["-fexceptions"] + select({
"@org_tensorflow//tensorflow:linux_x86_64": [
- "-fopenmp",
+ "-fopenmp", # only works with gcc
],
+ # TODO(ibiryukov): enable openmp with clang by including libomp as a
+ # dependency.
+ ":clang_linux_x86_64": [],
"//conditions:default": [],
}),
includes = [