aboutsummaryrefslogtreecommitdiffhomepage
path: root/configure.py
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-07-11 04:52:49 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-07-11 04:59:54 -0700
commitab39198aceb641d7be631ba85091a4139edf203f (patch)
treec9f4843307520d8856ee12b7c8af25e3037b1b72 /configure.py
parent78d4d1ad4688ced8781ac2d7d7931d712cb9d144 (diff)
Add CROSSTOOL for Windows GPU build with nvcc compiler
After this change, to build TensorFlow with GPU support on Windows, you just need to follow the same procedure as Linux. Also re-enable remote cache since the bug in b/111106393 has been fixed by the new wrapper script. The clean-up of the wrapper scripts also made the build around 5 mins faster than using Bazel's msvc wrapper script. PiperOrigin-RevId: 204105368
Diffstat (limited to 'configure.py')
-rw-r--r--configure.py27
1 files changed, 6 insertions, 21 deletions
diff --git a/configure.py b/configure.py
index 03c03aad9c..8930c3a1f1 100644
--- a/configure.py
+++ b/configure.py
@@ -1236,28 +1236,13 @@ def set_tf_cuda_compute_capabilities(environ_cp):
def set_other_cuda_vars(environ_cp):
"""Set other CUDA related variables."""
- if is_windows():
- # The following three variables are needed for MSVC toolchain configuration
- # in Bazel
- environ_cp['CUDA_PATH'] = environ_cp.get('CUDA_TOOLKIT_PATH')
- environ_cp['CUDA_COMPUTE_CAPABILITIES'] = environ_cp.get(
- 'TF_CUDA_COMPUTE_CAPABILITIES')
- environ_cp['NO_WHOLE_ARCHIVE_OPTION'] = 1
- write_action_env_to_bazelrc('CUDA_PATH', environ_cp.get('CUDA_PATH'))
- write_action_env_to_bazelrc('CUDA_COMPUTE_CAPABILITIE',
- environ_cp.get('CUDA_COMPUTE_CAPABILITIE'))
- write_action_env_to_bazelrc('NO_WHOLE_ARCHIVE_OPTION',
- environ_cp.get('NO_WHOLE_ARCHIVE_OPTION'))
- write_to_bazelrc('build --config=win-cuda')
- write_to_bazelrc('test --config=win-cuda')
+ # If CUDA is enabled, always use GPU during build and test.
+ if environ_cp.get('TF_CUDA_CLANG') == '1':
+ write_to_bazelrc('build --config=cuda_clang')
+ write_to_bazelrc('test --config=cuda_clang')
else:
- # If CUDA is enabled, always use GPU during build and test.
- if environ_cp.get('TF_CUDA_CLANG') == '1':
- write_to_bazelrc('build --config=cuda_clang')
- write_to_bazelrc('test --config=cuda_clang')
- else:
- write_to_bazelrc('build --config=cuda')
- write_to_bazelrc('test --config=cuda')
+ write_to_bazelrc('build --config=cuda')
+ write_to_bazelrc('test --config=cuda')
def set_host_cxx_compiler(environ_cp):