Roll CL 229790895 forward with fix.
PiperOrigin-RevId: 229930009
This commit is contained in:
parent
7c65c591fb
commit
72571e0824
@ -82,7 +82,6 @@ tensorflow/third_party/gpus/crosstool/clang/bin/crosstool_wrapper_driver_is_not_
|
||||
tensorflow/third_party/gpus/crosstool/CROSSTOOL.tpl
|
||||
tensorflow/third_party/gpus/crosstool/CROSSTOOL_hipcc.tpl
|
||||
tensorflow/third_party/gpus/crosstool/LICENSE
|
||||
tensorflow/third_party/gpus/crosstool/remote.BUILD.tpl
|
||||
tensorflow/third_party/gpus/crosstool/windows/msvc_wrapper_for_nvcc.py.tpl
|
||||
tensorflow/third_party/gpus/crosstool/BUILD.tpl
|
||||
tensorflow/third_party/gpus/crosstool/BUILD
|
||||
@ -90,7 +89,6 @@ tensorflow/third_party/gpus/cuda/LICENSE
|
||||
tensorflow/third_party/gpus/cuda/BUILD.tpl
|
||||
tensorflow/third_party/gpus/cuda/BUILD.windows.tpl
|
||||
tensorflow/third_party/gpus/cuda/cuda_config.h.tpl
|
||||
tensorflow/third_party/gpus/cuda/remote.BUILD.tpl
|
||||
tensorflow/third_party/gpus/cuda/BUILD
|
||||
tensorflow/third_party/gpus/cuda/build_defs.bzl.tpl
|
||||
tensorflow/third_party/gpus/rocm/rocm_config.h.tpl
|
||||
@ -194,7 +192,6 @@ tensorflow/third_party/tensorrt/BUILD
|
||||
tensorflow/third_party/tensorrt/build_defs.bzl.tpl
|
||||
tensorflow/third_party/tensorrt/BUILD.tpl
|
||||
tensorflow/third_party/tensorrt/tensorrt_configure.bzl
|
||||
tensorflow/third_party/tensorrt/remote.BUILD.tpl
|
||||
tensorflow/third_party/kafka/config.patch
|
||||
tensorflow/third_party/kafka/BUILD
|
||||
tensorflow/third_party/android/BUILD
|
||||
|
10
third_party/gpus/crosstool/remote.BUILD.tpl
vendored
10
third_party/gpus/crosstool/remote.BUILD.tpl
vendored
@ -1,10 +0,0 @@
|
||||
# Description:
|
||||
# Template for crosstool Build file to use a pre-generated config.
|
||||
licenses(["restricted"])
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
alias(
|
||||
name = "toolchain",
|
||||
actual = "%{remote_cuda_repo}:toolchain",
|
||||
)
|
110
third_party/gpus/cuda/remote.BUILD.tpl
vendored
110
third_party/gpus/cuda/remote.BUILD.tpl
vendored
@ -1,110 +0,0 @@
|
||||
# Description:
|
||||
# Template for cuda Build file to use a pre-generated config.
|
||||
licenses(["restricted"]) # MPL2, portions GPL v3, LGPL v3, BSD-like
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
config_setting(
|
||||
name = "using_nvcc",
|
||||
values = {
|
||||
"define": "using_cuda_nvcc=true",
|
||||
},
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "using_clang",
|
||||
values = {
|
||||
"define": "using_cuda_clang=true",
|
||||
},
|
||||
)
|
||||
|
||||
# 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"},
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
config_setting(
|
||||
name = "freebsd",
|
||||
values = {"cpu": "freebsd"},
|
||||
visibility = ["//visibility:public"],
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cuda_headers",
|
||||
actual = "%{remote_cuda_repo}/cuda:cuda_headers",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cudart_static",
|
||||
actual = "%{remote_cuda_repo}/cuda:cudart_static",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cuda_driver",
|
||||
actual = "%{remote_cuda_repo}/cuda:cuda_driver",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cudart",
|
||||
actual = "%{remote_cuda_repo}/cuda:cudart",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cublas",
|
||||
actual = "%{remote_cuda_repo}/cuda:cublas",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cusolver",
|
||||
actual = "%{remote_cuda_repo}/cuda:cusolver",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cudnn",
|
||||
actual = "%{remote_cuda_repo}/cuda:cudnn",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cudnn_header",
|
||||
actual = "%{remote_cuda_repo}/cuda:cudnn_header",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cufft",
|
||||
actual = "%{remote_cuda_repo}/cuda:cufft",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "curand",
|
||||
actual = "%{remote_cuda_repo}/cuda:curand",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cuda",
|
||||
actual = "%{remote_cuda_repo}/cuda:cuda",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cupti_headers",
|
||||
actual = "%{remote_cuda_repo}/cuda:cupti_headers",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "cupti_dsos",
|
||||
actual = "%{remote_cuda_repo}/cuda:cupti_dsos",
|
||||
)
|
||||
|
||||
alias(
|
||||
name = "libdevice_root",
|
||||
actual = "%{remote_cuda_repo}/cuda:libdevice_root",
|
||||
)
|
22
third_party/gpus/cuda_configure.bzl
vendored
22
third_party/gpus/cuda_configure.bzl
vendored
@ -1508,17 +1508,21 @@ def _create_remote_cuda_repository(repository_ctx, remote_config_repo):
|
||||
),
|
||||
},
|
||||
)
|
||||
_tpl(
|
||||
repository_ctx,
|
||||
"cuda:remote.BUILD",
|
||||
{
|
||||
"%{remote_cuda_repo}": remote_config_repo,
|
||||
},
|
||||
repository_ctx.template(
|
||||
"cuda/BUILD",
|
||||
Label(remote_config_repo + "/cuda:BUILD"),
|
||||
{},
|
||||
)
|
||||
repository_ctx.template(
|
||||
"cuda/build_defs.bzl",
|
||||
Label(remote_config_repo + "/cuda:build_defs.bzl"),
|
||||
{},
|
||||
)
|
||||
repository_ctx.template(
|
||||
"cuda/cuda/cuda_config.h",
|
||||
Label(remote_config_repo + "/cuda:cuda/cuda_config.h"),
|
||||
{},
|
||||
)
|
||||
_tpl(repository_ctx, "crosstool:remote.BUILD", {
|
||||
"%{remote_cuda_repo}": remote_config_repo,
|
||||
}, "crosstool/BUILD")
|
||||
|
||||
|
||||
def _cuda_autoconf_impl(repository_ctx):
|
||||
|
4
third_party/tensorrt/build_defs.bzl.tpl
vendored
4
third_party/tensorrt/build_defs.bzl.tpl
vendored
@ -2,6 +2,4 @@
|
||||
|
||||
def if_tensorrt(if_true, if_false=[]):
|
||||
"""Tests whether TensorRT was enabled during the configure process."""
|
||||
if %{tensorrt_is_configured}:
|
||||
return if_true
|
||||
return if_false
|
||||
return %{if_tensorrt}
|
||||
|
7
third_party/tensorrt/remote.BUILD.tpl
vendored
7
third_party/tensorrt/remote.BUILD.tpl
vendored
@ -1,7 +0,0 @@
|
||||
licenses(["notice"]) # Apache 2.0
|
||||
|
||||
package(default_visibility = ["//visibility:public"])
|
||||
|
||||
alias(name="LICENSE", actual = "%{target}:LICENSE")
|
||||
alias(name = "tensorrt_headers", actual = "%{target}:tensorrt_headers")
|
||||
alias(name = "tensorrt", actual = "%{target}:tensorrt")
|
16
third_party/tensorrt/tensorrt_configure.bzl
vendored
16
third_party/tensorrt/tensorrt_configure.bzl
vendored
@ -129,7 +129,7 @@ def _tpl(repository_ctx, tpl, substitutions):
|
||||
|
||||
def _create_dummy_repository(repository_ctx):
|
||||
"""Create a dummy TensorRT repository."""
|
||||
_tpl(repository_ctx, "build_defs.bzl", {"%{tensorrt_is_configured}": "False"})
|
||||
_tpl(repository_ctx, "build_defs.bzl", {"%{if_tensorrt}": "if_false"})
|
||||
|
||||
_tpl(repository_ctx, "BUILD", {
|
||||
"%{tensorrt_genrules}": "",
|
||||
@ -141,11 +141,13 @@ def _tensorrt_configure_impl(repository_ctx):
|
||||
"""Implementation of the tensorrt_configure repository rule."""
|
||||
if _TF_TENSORRT_CONFIG_REPO in repository_ctx.os.environ:
|
||||
# Forward to the pre-configured remote repository.
|
||||
repository_ctx.template("BUILD", Label("//third_party/tensorrt:remote.BUILD.tpl"), {
|
||||
"%{target}": repository_ctx.os.environ[_TF_TENSORRT_CONFIG_REPO],
|
||||
})
|
||||
# Set up config file.
|
||||
_tpl(repository_ctx, "build_defs.bzl", {"%{tensorrt_is_configured}": "True"})
|
||||
remote_config_repo = repository_ctx.os.environ[_TF_TENSORRT_CONFIG_REPO]
|
||||
repository_ctx.template("BUILD", Label(remote_config_repo + ":BUILD"), {})
|
||||
repository_ctx.template(
|
||||
"build_defs.bzl",
|
||||
Label(remote_config_repo + ":build_defs.bzl"),
|
||||
{},
|
||||
)
|
||||
return
|
||||
|
||||
if _TENSORRT_INSTALL_PATH not in repository_ctx.os.environ:
|
||||
@ -194,7 +196,7 @@ def _tensorrt_configure_impl(repository_ctx):
|
||||
))
|
||||
|
||||
# Set up config file.
|
||||
_tpl(repository_ctx, "build_defs.bzl", {"%{tensorrt_is_configured}": "True"})
|
||||
_tpl(repository_ctx, "build_defs.bzl", {"%{if_tensorrt}": "if_true"})
|
||||
|
||||
# Set up BUILD file.
|
||||
_tpl(repository_ctx, "BUILD", {
|
||||
|
Loading…
Reference in New Issue
Block a user