parent
324820231d
commit
f5a7e40011
@ -3327,7 +3327,7 @@ tf_cuda_library(
|
|||||||
name = "device_tracer",
|
name = "device_tracer",
|
||||||
srcs = tf_additional_device_tracer_srcs(),
|
srcs = tf_additional_device_tracer_srcs(),
|
||||||
copts = tf_copts(),
|
copts = tf_copts(),
|
||||||
cuda_deps = tf_additional_cupti_wrapper_deps() + tf_additional_device_tracer_cuda_deps(),
|
cuda_deps = if_cuda_is_configured(tf_additional_cupti_wrapper_deps() + tf_additional_device_tracer_cuda_deps()),
|
||||||
visibility = [
|
visibility = [
|
||||||
"//tensorflow:internal",
|
"//tensorflow:internal",
|
||||||
],
|
],
|
||||||
|
@ -198,22 +198,12 @@ cc_library(
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
alias(
|
|
||||||
name = "cublas_lib",
|
|
||||||
actual = if_static(
|
|
||||||
"@local_config_cuda//cuda:cublas",
|
|
||||||
":cublas_stub",
|
|
||||||
),
|
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cublas_plugin",
|
name = "cublas_plugin",
|
||||||
srcs = if_cuda_is_configured(["cuda_blas.cc"]),
|
srcs = if_cuda_is_configured(["cuda_blas.cc"]),
|
||||||
hdrs = if_cuda_is_configured(["cuda_blas.h"]),
|
hdrs = if_cuda_is_configured(["cuda_blas.h"]),
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
deps = if_cuda_is_configured([
|
deps = if_cuda_is_configured([
|
||||||
":cublas_lib",
|
|
||||||
":cuda_activation",
|
":cuda_activation",
|
||||||
":cuda_gpu_executor",
|
":cuda_gpu_executor",
|
||||||
":cuda_platform_id",
|
":cuda_platform_id",
|
||||||
@ -233,7 +223,10 @@ cc_library(
|
|||||||
"//tensorflow/stream_executor/gpu:gpu_helpers_header",
|
"//tensorflow/stream_executor/gpu:gpu_helpers_header",
|
||||||
"//tensorflow/stream_executor/lib",
|
"//tensorflow/stream_executor/lib",
|
||||||
"//tensorflow/stream_executor/platform",
|
"//tensorflow/stream_executor/platform",
|
||||||
]) + [
|
] + if_static(
|
||||||
|
["@local_config_cuda//cuda:cublas"],
|
||||||
|
[":cublas_stub"],
|
||||||
|
)) + [
|
||||||
"@com_google_absl//absl/strings:str_format",
|
"@com_google_absl//absl/strings:str_format",
|
||||||
"@com_google_absl//absl/synchronization",
|
"@com_google_absl//absl/synchronization",
|
||||||
],
|
],
|
||||||
@ -251,15 +244,6 @@ cc_library(
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
alias(
|
|
||||||
name = "cufft_lib",
|
|
||||||
actual = if_static(
|
|
||||||
"@local_config_cuda//cuda:cufft",
|
|
||||||
":cufft_stub",
|
|
||||||
),
|
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cufft_plugin",
|
name = "cufft_plugin",
|
||||||
srcs = if_cuda_is_configured(["cuda_fft.cc"]),
|
srcs = if_cuda_is_configured(["cuda_fft.cc"]),
|
||||||
@ -271,7 +255,6 @@ cc_library(
|
|||||||
":cuda_platform_id",
|
":cuda_platform_id",
|
||||||
":cuda_stream",
|
":cuda_stream",
|
||||||
":cuda_helpers",
|
":cuda_helpers",
|
||||||
":cufft_lib",
|
|
||||||
"@local_config_cuda//cuda:cuda_headers",
|
"@local_config_cuda//cuda:cuda_headers",
|
||||||
"//tensorflow/stream_executor:event",
|
"//tensorflow/stream_executor:event",
|
||||||
"//tensorflow/stream_executor:fft",
|
"//tensorflow/stream_executor:fft",
|
||||||
@ -281,7 +264,10 @@ cc_library(
|
|||||||
"//tensorflow/stream_executor/lib",
|
"//tensorflow/stream_executor/lib",
|
||||||
"//tensorflow/stream_executor/platform",
|
"//tensorflow/stream_executor/platform",
|
||||||
"//tensorflow/stream_executor/platform:dso_loader",
|
"//tensorflow/stream_executor/platform:dso_loader",
|
||||||
]),
|
] + if_static(
|
||||||
|
["@local_config_cuda//cuda:cufft"],
|
||||||
|
[":cufft_stub"],
|
||||||
|
)),
|
||||||
alwayslink = True,
|
alwayslink = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -296,15 +282,6 @@ cc_library(
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
alias(
|
|
||||||
name = "cudnn_lib",
|
|
||||||
actual = if_static(
|
|
||||||
"@local_config_cuda//cuda:cudnn",
|
|
||||||
":cudnn_stub",
|
|
||||||
),
|
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "cudnn_plugin",
|
name = "cudnn_plugin",
|
||||||
srcs = if_cuda_is_configured(["cuda_dnn.cc"]),
|
srcs = if_cuda_is_configured(["cuda_dnn.cc"]),
|
||||||
@ -319,7 +296,6 @@ cc_library(
|
|||||||
":cuda_stream",
|
":cuda_stream",
|
||||||
":cuda_timer",
|
":cuda_timer",
|
||||||
":cudnn_version",
|
":cudnn_version",
|
||||||
":cudnn_lib",
|
|
||||||
"@com_google_absl//absl/strings",
|
"@com_google_absl//absl/strings",
|
||||||
"//third_party/eigen3",
|
"//third_party/eigen3",
|
||||||
"@local_config_cuda//cuda:cuda_headers",
|
"@local_config_cuda//cuda:cuda_headers",
|
||||||
@ -333,7 +309,10 @@ cc_library(
|
|||||||
"//tensorflow/stream_executor:temporary_device_memory",
|
"//tensorflow/stream_executor:temporary_device_memory",
|
||||||
"//tensorflow/stream_executor/lib",
|
"//tensorflow/stream_executor/lib",
|
||||||
"//tensorflow/stream_executor/platform",
|
"//tensorflow/stream_executor/platform",
|
||||||
]) + tf_additional_cudnn_plugin_deps() + ["@com_google_absl//absl/synchronization"],
|
]) + tf_additional_cudnn_plugin_deps() + if_cuda_is_configured(if_static(
|
||||||
|
["@local_config_cuda//cuda:cudnn"],
|
||||||
|
[":cudnn_stub"],
|
||||||
|
)) + ["@com_google_absl//absl/synchronization"],
|
||||||
alwayslink = True,
|
alwayslink = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -348,15 +327,6 @@ cc_library(
|
|||||||
]),
|
]),
|
||||||
)
|
)
|
||||||
|
|
||||||
alias(
|
|
||||||
name = "curand_lib",
|
|
||||||
actual = if_static(
|
|
||||||
"@local_config_cuda//cuda:curand",
|
|
||||||
":curand_stub",
|
|
||||||
),
|
|
||||||
visibility = ["//visibility:private"],
|
|
||||||
)
|
|
||||||
|
|
||||||
cc_library(
|
cc_library(
|
||||||
name = "curand_plugin",
|
name = "curand_plugin",
|
||||||
srcs = if_cuda_is_configured(["cuda_rng.cc"]),
|
srcs = if_cuda_is_configured(["cuda_rng.cc"]),
|
||||||
@ -367,7 +337,6 @@ cc_library(
|
|||||||
":cuda_platform_id",
|
":cuda_platform_id",
|
||||||
":cuda_stream",
|
":cuda_stream",
|
||||||
":cuda_helpers",
|
":cuda_helpers",
|
||||||
":curand_lib",
|
|
||||||
"@local_config_cuda//cuda:cuda_headers",
|
"@local_config_cuda//cuda:cuda_headers",
|
||||||
"//tensorflow/stream_executor:event",
|
"//tensorflow/stream_executor:event",
|
||||||
"//tensorflow/stream_executor:plugin_registry",
|
"//tensorflow/stream_executor:plugin_registry",
|
||||||
@ -377,7 +346,10 @@ cc_library(
|
|||||||
"//tensorflow/stream_executor/lib",
|
"//tensorflow/stream_executor/lib",
|
||||||
"//tensorflow/stream_executor/platform",
|
"//tensorflow/stream_executor/platform",
|
||||||
"//tensorflow/stream_executor/platform:dso_loader",
|
"//tensorflow/stream_executor/platform:dso_loader",
|
||||||
]),
|
] + if_static(
|
||||||
|
["@local_config_cuda//cuda:curand"],
|
||||||
|
[":curand_stub"],
|
||||||
|
)),
|
||||||
alwayslink = True,
|
alwayslink = True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
4
third_party/gpus/cuda/build_defs.bzl.tpl
vendored
4
third_party/gpus/cuda/build_defs.bzl.tpl
vendored
@ -29,5 +29,5 @@ def if_cuda_is_configured(x):
|
|||||||
--config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
|
--config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
|
||||||
"""
|
"""
|
||||||
if cuda_is_configured():
|
if cuda_is_configured():
|
||||||
return select({"//conditions:default": x})
|
return x
|
||||||
return select({"//conditions:default": []})
|
return []
|
||||||
|
@ -27,5 +27,5 @@ def if_cuda_is_configured(x):
|
|||||||
--config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
|
--config=cuda. Used to allow non-CUDA code to depend on CUDA libraries.
|
||||||
"""
|
"""
|
||||||
if cuda_is_configured():
|
if cuda_is_configured():
|
||||||
return select({"//conditions:default": x})
|
return x
|
||||||
return select({"//conditions:default": []})
|
return []
|
||||||
|
Loading…
Reference in New Issue
Block a user