Skip to content

Commit 443a47d

Browse files
Fix local build with GPU support (#2764)
Allow local build with GPU support against TF 2.10 Partly fixes #2712 To build locally it still required to manually replace crosstool_top value in .bazelrc with "@local_config_cuda//crosstool:toolchain"
1 parent 15b37bf commit 443a47d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

build_deps/toolchains/gpu/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def InvokeNvcc(argv, log=False):
167167
undefines = ''.join([' -U' + define for define in undefines])
168168
std_options = GetOptionValue(argv, 'std')
169169
# Supported -std flags as of CUDA 9.0. Only keep last to mimic gcc/clang.
170-
nvcc_allowed_std_options = ["c++03", "c++11", "c++14"]
170+
nvcc_allowed_std_options = ["c++03", "c++11", "c++14", "c++17"]
171171
std_options = ''.join([' -std=' + define
172172
for define in std_options if define in nvcc_allowed_std_options])
173173

@@ -205,7 +205,7 @@ def InvokeNvcc(argv, log=False):
205205
x.replace(".", "") for x in supported_cuda_compute_capabilities])
206206
for capability in supported_cuda_compute_capabilities[:-1]:
207207
nvccopts += r'-gencode=arch=compute_%s,\"code=sm_%s\" ' % (
208-
capability, capability, capability)
208+
capability, capability)
209209
if supported_cuda_compute_capabilities:
210210
capability = supported_cuda_compute_capabilities[-1]
211211
nvccopts += r'-gencode=arch=compute_%s,code=\"sm_%s,compute_%s\" ' % (

0 commit comments

Comments
 (0)