Pass -O3 when building tensorflow with clang -c opt. (This isn't hooked
up to the OSS build yet, we're working on it.) Change: 123248081
This commit is contained in:
parent
13dc98fd95
commit
8074e98b20
@ -314,6 +314,11 @@ def _cuda_copts():
|
||||
"--cuda-gpu-arch=sm_35",
|
||||
]
|
||||
),
|
||||
}) + select({
|
||||
# Pass -O3 when building CUDA code with clang; some important
|
||||
# optimizations are not enabled at O2.
|
||||
"//third_party/gpus/cuda:using_clang_opt": ["-O3"],
|
||||
"//conditions:default": [],
|
||||
})
|
||||
|
||||
# Build defs for TensorFlow kernels
|
||||
|
9
third_party/gpus/cuda/BUILD
vendored
9
third_party/gpus/cuda/BUILD
vendored
@ -31,6 +31,15 @@ config_setting(
|
||||
},
|
||||
)
|
||||
|
||||
# Equivalent to using_clang && -c opt.
|
||||
config_setting(
|
||||
name = "using_clang_opt",
|
||||
values = {
|
||||
"define": "using_cuda_clang=true",
|
||||
"compilation_mode": "opt",
|
||||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "darwin",
|
||||
values = {"cpu": "darwin"},
|
||||
|
Loading…
Reference in New Issue
Block a user