Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use environment invalidation for cuda_configure #7575

Merged
merged 1 commit into from Mar 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion WORKSPACE
Expand Up @@ -19,7 +19,7 @@ load("//tensorflow:workspace.bzl", "check_version", "tf_workspace")
# We must check the bazel version before trying to parse any other BUILD files,
# in case the parsing of those build files depends on the bazel version we
# require here.
check_version("0.4.2")
check_version("0.4.5")

# Uncomment and update the paths in these entries to build the Android demo.
#android_sdk_repository(
Expand Down
5 changes: 0 additions & 5 deletions configure
Expand Up @@ -39,11 +39,6 @@ function is_windows() {
}

function bazel_clean_and_fetch() {
# bazel clean --expunge currently doesn't work on Windows
# TODO(pcloudy): Re-enable it after bazel clean --expunge is fixed.
if ! is_windows; then
bazel clean --expunge
fi
if [ -z "$TF_BAZEL_TARGETS" ]; then
bazel fetch "//tensorflow/... -//tensorflow/contrib/nccl/... -//tensorflow/examples/android/..."
else
Expand Down
12 changes: 11 additions & 1 deletion third_party/gpus/cuda_configure.bzl
Expand Up @@ -824,10 +824,20 @@ def _cuda_autoconf_impl(repository_ctx):
_create_cuda_repository(repository_ctx)



cuda_configure = repository_rule(
implementation = _cuda_autoconf_impl,
local = True,
environ = [
_GCC_HOST_COMPILER_PATH,
"TF_NEED_CUDA",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one modifies the behaviour in configure script, but does anything else depend on it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I found one usage here in this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added all the environment variable used in the cuda_configure.bzl script.

_CUDA_TOOLKIT_PATH,
_CUDNN_INSTALL_PATH,
_TF_CUDA_VERSION,
_TF_CUDNN_VERSION,
_TF_CUDA_COMPUTE_CAPABILITIES,
],
)

"""Detects and configures the local CUDA toolchain.

Add the following to your WORKSPACE FILE:
Expand Down