Remove if_cuda_is_configured_compat wrapper.
PiperOrigin-RevId: 248381353
This commit is contained in:
parent
6700fd4d24
commit
4fa7eec9e5
@ -72,9 +72,6 @@ def if_not_v2(a):
|
||||
"//conditions:default": a,
|
||||
})
|
||||
|
||||
def if_cuda_is_configured_compat(x):
|
||||
return if_cuda_is_configured(x)
|
||||
|
||||
# Given a source file, generate a test name.
|
||||
# i.e. "common_runtime/direct_session_test.cc" becomes
|
||||
# "common_runtime_direct_session_test"
|
||||
@ -1268,7 +1265,7 @@ def _cuda_copts(opts = []):
|
||||
"@local_config_cuda//cuda:using_clang": ([
|
||||
"-fcuda-flush-denormals-to-zero",
|
||||
]),
|
||||
}) + if_cuda_is_configured_compat(opts)
|
||||
}) + if_cuda(opts)
|
||||
|
||||
# Build defs for TensorFlow kernels
|
||||
|
||||
@ -1293,7 +1290,7 @@ def tf_gpu_kernel_library(
|
||||
srcs = srcs,
|
||||
hdrs = hdrs,
|
||||
copts = copts,
|
||||
deps = deps + if_cuda_is_configured_compat([
|
||||
deps = deps + if_cuda_is_configured([
|
||||
clean_dep("//tensorflow/stream_executor/cuda:cudart_stub"),
|
||||
clean_dep("//tensorflow/core:gpu_lib"),
|
||||
]) + if_rocm_is_configured([
|
||||
@ -1333,7 +1330,7 @@ def tf_gpu_library(deps = None, cuda_deps = None, copts = tf_copts(), **kwargs):
|
||||
|
||||
kwargs["features"] = kwargs.get("features", []) + ["-use_header_modules"]
|
||||
native.cc_library(
|
||||
deps = deps + if_cuda_is_configured_compat(cuda_deps + [
|
||||
deps = deps + if_cuda_is_configured(cuda_deps + [
|
||||
clean_dep("//tensorflow/stream_executor/cuda:cudart_stub"),
|
||||
"@local_config_cuda//cuda:cuda_headers",
|
||||
]) + if_rocm_is_configured(cuda_deps + [
|
||||
@ -1760,7 +1757,7 @@ def tf_custom_op_library(name, srcs = [], gpu_srcs = [], deps = [], linkopts = [
|
||||
srcs = gpu_srcs,
|
||||
copts = copts + _cuda_copts() + if_tensorrt(["-DGOOGLE_TENSORRT=1"]),
|
||||
features = if_cuda(["-use_header_modules"]),
|
||||
deps = deps + if_cuda_is_configured_compat(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
deps = deps + if_cuda_is_configured(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
**kwargs
|
||||
)
|
||||
cuda_deps.extend([":" + basename + "_gpu"])
|
||||
@ -1772,12 +1769,12 @@ def tf_custom_op_library(name, srcs = [], gpu_srcs = [], deps = [], linkopts = [
|
||||
clean_dep("//tensorflow/core:framework"),
|
||||
clean_dep("//tensorflow/core:lib"),
|
||||
],
|
||||
deps = deps + if_cuda_is_configured_compat(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
deps = deps + if_cuda_is_configured(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
)
|
||||
tf_cc_shared_object(
|
||||
name = name,
|
||||
srcs = srcs,
|
||||
deps = deps + if_cuda_is_configured_compat(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
deps = deps + if_cuda_is_configured(cuda_deps) + if_rocm_is_configured(rocm_deps),
|
||||
data = if_static([name + "_check_deps"]),
|
||||
copts = copts + tf_copts(is_external = True),
|
||||
features = ["windows_export_all_symbols"],
|
||||
|
Loading…
Reference in New Issue
Block a user