Build scripts in public repo need to be adjusted to match internal build.

Change: 139832288
This commit is contained in:
A. Unique TensorFlower 2016-11-21 14:31:25 -08:00 committed by TensorFlower Gardener
parent 24cb2e5023
commit e76d1d8755
3 changed files with 9 additions and 4 deletions

View File

@ -15,7 +15,6 @@ tf_cuda_library(
copts = tf_copts(),
cuda_deps = [
"//tensorflow/core:stream_executor",
"@local_config_cuda//cuda:cuda_headers",
"@local_config_cuda//cuda:cupti_headers",
],
data = ["@local_config_cuda//cuda:cupti_dsos"],

View File

@ -46,6 +46,7 @@ load(
load(
"@local_config_cuda//cuda:build_defs.bzl",
"if_cuda",
"cuda_path_flags"
)
# List of proto files for android builds
@ -425,7 +426,6 @@ def _cuda_copts():
common_cuda_opts +
[
"-fcuda-flush-denormals-to-zero",
"--cuda-path=external/local_config_cuda/cuda",
"--cuda-gpu-arch=sm_35",
]
),
@ -434,7 +434,7 @@ def _cuda_copts():
# optimizations are not enabled at O2.
"@local_config_cuda//cuda:using_clang_opt": ["-O3"],
"//conditions:default": [],
})
}) + cuda_path_flags()
# Build defs for TensorFlow kernels
@ -480,7 +480,10 @@ def tf_cuda_library(deps=None, cuda_deps=None, copts=None, **kwargs):
copts = []
native.cc_library(
deps = deps + if_cuda(cuda_deps + ["//tensorflow/core:cuda"]),
deps = deps + if_cuda(cuda_deps + [
"//tensorflow/core:cuda",
"@local_config_cuda//cuda:cuda_headers"
]),
copts = copts + if_cuda(["-DGOOGLE_CUDA=1"]),
**kwargs)

View File

@ -1,4 +1,7 @@
# Macros for building CUDA code.
def cuda_path_flags():
"""Stub for compatibility with internal build."""
return []
def if_cuda(if_true, if_false = []):
"""Shorthand for select()'ing on whether we're building with CUDA.