aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus/cuda
diff options
context:
space:
mode:
authorGravatar Martin Wicke <wicke@google.com>2016-07-25 13:48:16 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-07-25 15:02:34 -0700
commit21716d8f6e175cd6e8cd97a84e48497574268b0c (patch)
tree3345202e7a812cc9572beb24fc01732696a4140d /third_party/gpus/cuda
parented281973d66d0030e58a77a05821bbb88627f5bd (diff)
Merge changes from github.
Change: 128401884
Diffstat (limited to 'third_party/gpus/cuda')
-rw-r--r--third_party/gpus/cuda/BUILD73
1 files changed, 39 insertions, 34 deletions
diff --git a/third_party/gpus/cuda/BUILD b/third_party/gpus/cuda/BUILD
index 354377555b..79c6227687 100644
--- a/third_party/gpus/cuda/BUILD
+++ b/third_party/gpus/cuda/BUILD
@@ -51,7 +51,10 @@ cc_library(
hdrs = glob([
"**/*.h",
]),
- includes = [".", "include"],
+ includes = [
+ ".",
+ "include",
+ ],
visibility = ["//visibility:public"],
)
@@ -66,7 +69,7 @@ cc_library(
"-lpthread",
] + select({
"//tensorflow:darwin": [],
- "//conditions:default": ["-lrt"]
+ "//conditions:default": ["-lrt"],
}),
visibility = ["//visibility:public"],
)
@@ -74,65 +77,65 @@ cc_library(
cc_library(
name = "cudart",
srcs = [
- cuda_library_path("cudart")
+ cuda_library_path("cudart"),
],
data = [
- cuda_library_path("cudart")
+ cuda_library_path("cudart"),
],
includes = ["include/"],
- visibility = ["//visibility:public"],
linkstatic = 1,
+ visibility = ["//visibility:public"],
)
cc_library(
name = "cublas",
srcs = [
- cuda_library_path("cublas")
+ cuda_library_path("cublas"),
],
data = [
- cuda_library_path("cublas")
+ cuda_library_path("cublas"),
],
includes = ["include/"],
- visibility = ["//visibility:public"],
linkstatic = 1,
+ visibility = ["//visibility:public"],
)
cc_library(
name = "cudnn",
srcs = [
- cudnn_library_path()
+ cudnn_library_path(),
],
data = [
- cudnn_library_path()
+ cudnn_library_path(),
],
includes = ["include/"],
- visibility = ["//visibility:public"],
linkstatic = 1,
+ visibility = ["//visibility:public"],
)
cc_library(
name = "cufft",
srcs = [
- cuda_library_path("cufft")
+ cuda_library_path("cufft"),
],
data = [
- cuda_library_path("cufft")
+ cuda_library_path("cufft"),
],
includes = ["include/"],
- visibility = ["//visibility:public"],
linkstatic = 1,
+ visibility = ["//visibility:public"],
)
cc_library(
name = "cuda",
+ visibility = ["//visibility:public"],
deps = [
+ ":cublas",
":cuda_headers",
":cudart",
- ":cublas",
":cudnn",
":cufft",
],
- visibility = ["//visibility:public"],
)
cc_library(
@@ -140,7 +143,10 @@ cc_library(
hdrs = glob([
"**/*.h",
]),
- includes = [".", "extras/CUPTI/include/"],
+ includes = [
+ ".",
+ "extras/CUPTI/include/",
+ ],
visibility = ["//visibility:public"],
)
@@ -152,7 +158,6 @@ cc_library(
visibility = ["//visibility:public"],
)
-
# TODO(opensource): for now, we have to invoke the cuda_config.sh manually in the source tree.
# This rule checks if Cuda libraries in the source tree has been properly configured.
# The output list makes bazel runs this rule first if the Cuda files are missing.
@@ -182,21 +187,21 @@ genrule(
# Under non-cuda config, create all dummy files to make the build go through
";".join([
- "mkdir -p $(@D)/include",
- "mkdir -p $(@D)/lib64",
- "mkdir -p $(@D)/extras/CUPTI/include",
- "mkdir -p $(@D)/extras/CUPTI/lib64",
- "touch $(@D)/include/cuda.h",
- "touch $(@D)/include/cublas.h",
- "touch $(@D)/include/cudnn.h",
- "touch $(@D)/extras/CUPTI/include/cupti.h",
- "touch $(@D)/{}".format(cuda_static_library_path("cudart")),
- "touch $(@D)/{}".format(cuda_library_path("cublas")),
- "touch $(@D)/{}".format(cudnn_library_path()),
- "touch $(@D)/{}".format(cuda_library_path("cudart")),
- "touch $(@D)/{}".format(cuda_library_path("cufft")),
- "touch $(@D)/{}".format(cupti_library_path()),
- ]),
+ "mkdir -p $(@D)/include",
+ "mkdir -p $(@D)/lib64",
+ "mkdir -p $(@D)/extras/CUPTI/include",
+ "mkdir -p $(@D)/extras/CUPTI/lib64",
+ "touch $(@D)/include/cuda.h",
+ "touch $(@D)/include/cublas.h",
+ "touch $(@D)/include/cudnn.h",
+ "touch $(@D)/extras/CUPTI/include/cupti.h",
+ "touch $(@D)/{}".format(cuda_static_library_path("cudart")),
+ "touch $(@D)/{}".format(cuda_library_path("cublas")),
+ "touch $(@D)/{}".format(cudnn_library_path()),
+ "touch $(@D)/{}".format(cuda_library_path("cudart")),
+ "touch $(@D)/{}".format(cuda_library_path("cufft")),
+ "touch $(@D)/{}".format(cupti_library_path()),
+ ]),
),
local = 1,
)
@@ -212,7 +217,7 @@ genrule(
# Under non-cuda config, create the dummy file
";".join([
- "touch $(@D)/cuda.config",
+ "touch $(@D)/cuda.config",
]),
),
local = 1,