aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorflow.bzl
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/tensorflow.bzl')
-rw-r--r--tensorflow/tensorflow.bzl32
1 files changed, 17 insertions, 15 deletions
diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl
index 898a8b7309..ffa1965c3b 100644
--- a/tensorflow/tensorflow.bzl
+++ b/tensorflow/tensorflow.bzl
@@ -32,7 +32,7 @@ load(
"tf_cuda_tests_tags",
)
load(
- "//third_party/gpus/cuda:build_defs.bzl",
+ "@local_config_cuda//cuda:build_defs.bzl",
"if_cuda",
)
@@ -324,11 +324,11 @@ def tf_cc_tests(tests, deps, linkstatic=0, tags=[], size="medium", args=None,
tf_cc_test(t, deps, linkstatic, tags=tags, size=size, args=args,
linkopts=linkopts)
-def tf_cc_tests_gpu(tests, deps, linkstatic=0, tags=[], size="medium", args=None):
+def tf_cc_tests_gpu(tests, deps, linkstatic=0, tags=[], size="medium",
+ args=None):
tf_cc_tests(tests, deps, linkstatic, tags=tags, size=size, args=args)
-
def tf_cuda_cc_tests(tests, deps, tags=[], size="medium", linkstatic=0,
args=None, linkopts=[]):
for t in tests:
@@ -345,29 +345,29 @@ def _cuda_copts():
common_cuda_opts = ["-x", "cuda", "-DGOOGLE_CUDA=1"]
return select({
"//conditions:default": [],
- "//third_party/gpus/cuda:using_nvcc": (
+ "@local_config_cuda//cuda:using_nvcc": (
common_cuda_opts +
[
"-nvcc_options=relaxed-constexpr",
"-nvcc_options=ftz=true",
]
),
- "//third_party/gpus/cuda:using_gcudacc": (
+ "@local_config_cuda//cuda:using_gcudacc": (
common_cuda_opts +
["--gcudacc_flag=-ftz=true"]
),
- "//third_party/gpus/cuda:using_clang": (
+ "@local_config_cuda//cuda:using_clang": (
common_cuda_opts +
[
"-fcuda-flush-denormals-to-zero",
- "--cuda-path=third_party/gpus/cuda",
+ "--cuda-path=external/local_config_cuda/cuda",
"--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"],
+ "@local_config_cuda//cuda:using_clang_opt": ["-O3"],
"//conditions:default": [],
})
@@ -438,7 +438,8 @@ def tf_kernel_library(name, prefix=None, srcs=None, gpu_srcs=None, hdrs=None,
* srcs = ["cwise_op_abs.cc", ..., "cwise_op_tanh.cc"],
* hdrs = ["cwise_ops.h", "cwise_ops_common.h"],
* gpu_srcs = ["cwise_op_gpu_abs.cu.cc", ..., "cwise_op_gpu_tanh.cu.cc",
- "cwise_ops.h", "cwise_ops_common.h", "cwise_ops_gpu_common.cu.h"]
+ "cwise_ops.h", "cwise_ops_common.h",
+ "cwise_ops_gpu_common.cu.h"]
* "cwise_ops_test.cc" is excluded
"""
if not srcs:
@@ -642,7 +643,7 @@ check_deps = rule(
def tf_custom_op_library(name, srcs=[], gpu_srcs=[], deps=[]):
cuda_deps = [
"//tensorflow/core:stream_executor_headers_lib",
- "//third_party/gpus/cuda:cudart_static",
+ "@local_config_cuda//cuda:cudart_static",
]
deps = deps + tf_custom_op_library_additional_deps()
if gpu_srcs:
@@ -692,7 +693,7 @@ def tf_py_wrap_cc(name, srcs, swig_includes=[], deps=[], copts=[], **kwargs):
module_name=module_name,
py_module_name=name)
extra_linkopts = select({
- "//third_party/gpus/cuda:darwin": [
+ "@local_config_cuda//cuda:darwin": [
"-Wl,-exported_symbols_list",
"//tensorflow:tf_exported_symbols.lds"
],
@@ -701,7 +702,7 @@ def tf_py_wrap_cc(name, srcs, swig_includes=[], deps=[], copts=[], **kwargs):
"//tensorflow:tf_version_script.lds"
]})
extra_deps += select({
- "//third_party/gpus/cuda:darwin": [
+ "@local_config_cuda//cuda:darwin": [
"//tensorflow:tf_exported_symbols.lds"
],
"//conditions:default": [
@@ -775,13 +776,14 @@ def py_tests(name,
data=data,
additional_deps=additional_deps)
-def cuda_py_tests(name, srcs, size="medium", additional_deps=[], data=[], shard_count=1, tags=[], prefix=""):
+def cuda_py_tests(name, srcs, size="medium", additional_deps=[], data=[],
+ shard_count=1, tags=[], prefix=""):
test_tags = tags + tf_cuda_tests_tags()
py_tests(name=name, size=size, srcs=srcs, additional_deps=additional_deps,
data=data, tags=test_tags, shard_count=shard_count,prefix=prefix)
-# Creates a genrule named <name> for running tools/proto_text's generator to make
-# the proto_text functions, for the protos passed in <srcs>.
+# Creates a genrule named <name> for running tools/proto_text's generator to
+# make the proto_text functions, for the protos passed in <srcs>.
#
# Return a struct with fields (hdrs, srcs) containing the names of the
# generated files.