提交 ede5ebe5 编写于 作者: D Damien Martin-Guillerez 提交者: gunan

Use environment invalidation for cuda_configure (#7575)

This removes the needs for clean --expunge in configure :) but
request the incoming bazel 0.4.5.
上级 e9fbd584
......@@ -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(
......
......@@ -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
......
......@@ -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",
_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:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册