aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/gpus
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-06-29 17:20:56 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-06-29 17:24:39 -0700
commit1c27162649359e5fabade5f806ef851401ec2f1e (patch)
tree009ae0ff68bb3638a1a8e8f280930cacb29e9ae5 /third_party/gpus
parent7ccfbdffde54d11bc8fad4b49fde53cf2b550434 (diff)
Clean up cuda configuration:
- Remove experimental attributes (remote_config_repo). Use of experimental remote repo can only be enabled now via env variable (preferred to change to workspace file) - Fixes minor issues with template: adds spaces to srcs in genrule, remove extra space after genrules. - Fix ordering of attributes in build template PiperOrigin-RevId: 160595014
Diffstat (limited to 'third_party/gpus')
-rw-r--r--third_party/gpus/cuda/BUILD.tpl4
-rw-r--r--third_party/gpus/cuda_configure.bzl16
2 files changed, 5 insertions, 15 deletions
diff --git a/third_party/gpus/cuda/BUILD.tpl b/third_party/gpus/cuda/BUILD.tpl
index f7610dd7a9..87c8678714 100644
--- a/third_party/gpus/cuda/BUILD.tpl
+++ b/third_party/gpus/cuda/BUILD.tpl
@@ -94,8 +94,8 @@ cc_library(
srcs = ["lib/%{cusolver_lib}"],
data = ["lib/%{cusolver_lib}"],
includes = ["include"],
- linkstatic = 1,
linkopts = ["-lgomp"],
+ linkstatic = 1,
visibility = ["//visibility:public"],
)
@@ -129,9 +129,9 @@ cc_library(
cc_library(
name = "cuda",
deps = [
+ ":cublas",
":cuda_headers",
":cudart",
- ":cublas",
":cudnn",
":cufft",
":curand",
diff --git a/third_party/gpus/cuda_configure.bzl b/third_party/gpus/cuda_configure.bzl
index 1e29f23d90..cc445eb0ae 100644
--- a/third_party/gpus/cuda_configure.bzl
+++ b/third_party/gpus/cuda_configure.bzl
@@ -830,7 +830,7 @@ def _symlink_genrule_for_dir(repository_ctx, src_dir, dest_dir, genrule_name,
# On Windows, symlink is not supported, so we just copy all the files.
cmd = 'cp -f' if _is_windows(repository_ctx) else 'ln -s'
command.append(cmd + ' "%s" "%s"' % (src_files[i] , dest))
- outs.append(' "' + dest_dir + dest_files[i] + '",')
+ outs.append(' "' + dest_dir + dest_files[i] + '",')
genrule = _genrule(src_dir, genrule_name, " && ".join(command),
"\n".join(outs))
return genrule
@@ -851,7 +851,7 @@ def _genrule(src_dir, genrule_name, command, outs):
' cmd = """\n' +
command +
'\n """,\n' +
- ')\n\n'
+ ')\n'
)
@@ -1027,18 +1027,12 @@ def _cuda_autoconf_impl(repository_ctx):
if _TF_CUDA_CONFIG_REPO in repository_ctx.os.environ:
_create_remote_cuda_repository(repository_ctx,
repository_ctx.os.environ[_TF_CUDA_CONFIG_REPO])
- elif repository_ctx.attr.remote_config_repo != "":
- _create_remote_cuda_repository(repository_ctx,
- repository_ctx.attr.remote_config_repo)
else:
_create_local_cuda_repository(repository_ctx)
cuda_configure = repository_rule(
implementation = _cuda_autoconf_impl,
- attrs = {
- "remote_config_repo": attr.string(mandatory = False, default =""),
- },
environ = [
_GCC_HOST_COMPILER_PATH,
"TF_NEED_CUDA",
@@ -1056,13 +1050,9 @@ cuda_configure = repository_rule(
Add the following to your WORKSPACE FILE:
```python
-cuda_configure(
- name = "local_config_cuda"
- remote_config_repo = "@remote_cuda_config_tf//"
-)
+cuda_configure(name = "local_config_cuda")
```
Args:
name: A unique name for this workspace rule.
- remote_config_repo: Location of a pre-generated config (optional).
"""