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:
A. Unique TensorFlower 2016-05-25 12:39:30 -08:00 committed by TensorFlower Gardener
parent 13dc98fd95
commit 8074e98b20
2 changed files with 14 additions and 0 deletions

View File

@ -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

View File

@ -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"},