Migrate toolchains for --incompatible_use_specific_tool_files
This will fix Cuda and ROCm RBE build with Bazel 1.0 Related https://github.com/bazelbuild/bazel/issues/8531 Preconfigured toolchains are updated by: tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3-gcc7_manylinux2010-cuda10.1-cudnn7-tensorrt6.0 tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3-gcc7_manylinux2010-cuda10.0-cudnn7-tensorrt5.1 tensorflow/third_party/toolchains/preconfig/generate/update.sh ubuntu16.04-py3_opt-gcc5-rocm PiperOrigin-RevId: 279942421 Change-Id: Ic8538d49b970b074e35acebc1345482170d98847
This commit is contained in:
parent
641ebb4552
commit
044e7e4b55
8
third_party/gpus/crosstool/BUILD.rocm.tpl
vendored
8
third_party/gpus/crosstool/BUILD.rocm.tpl
vendored
@ -35,10 +35,12 @@ cc_toolchain_suite(
|
|||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-local",
|
name = "cc-compiler-local",
|
||||||
all_files = "%{linker_files}",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = "%{linker_files}",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
# To support linker flags that need to go to the start of command line
|
# To support linker flags that need to go to the start of command line
|
||||||
|
24
third_party/gpus/crosstool/BUILD.tpl
vendored
24
third_party/gpus/crosstool/BUILD.tpl
vendored
@ -39,10 +39,12 @@ cc_toolchain_suite(
|
|||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-local",
|
name = "cc-compiler-local",
|
||||||
all_files = "%{linker_files}",
|
all_files = "%{compiler_deps}",
|
||||||
compiler_files = ":empty",
|
compiler_files = "%{compiler_deps}",
|
||||||
|
ar_files = "%{compiler_deps}",
|
||||||
|
as_files = "%{compiler_deps}",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = "%{linker_files}",
|
linker_files = "%{compiler_deps}",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
# To support linker flags that need to go to the start of command line
|
# To support linker flags that need to go to the start of command line
|
||||||
@ -70,10 +72,12 @@ cc_toolchain_config(
|
|||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-darwin",
|
name = "cc-compiler-darwin",
|
||||||
all_files = "%{linker_files}",
|
all_files = "%{compiler_deps}",
|
||||||
compiler_files = ":empty",
|
compiler_files = "%{compiler_deps}",
|
||||||
|
ar_files = "%{compiler_deps}",
|
||||||
|
as_files = "%{compiler_deps}",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = "%{linker_files}",
|
linker_files = "%{compiler_deps}",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
supports_param_files = 0,
|
supports_param_files = 0,
|
||||||
@ -95,10 +99,12 @@ cc_toolchain_config(
|
|||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-windows",
|
name = "cc-compiler-windows",
|
||||||
all_files = "%{win_linker_files}",
|
all_files = "%{win_compiler_deps}",
|
||||||
compiler_files = ":empty",
|
compiler_files = "%{win_compiler_deps}",
|
||||||
|
ar_files = "%{win_compiler_deps}",
|
||||||
|
as_files = "%{win_compiler_deps}",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = "%{win_linker_files}",
|
linker_files = "%{win_compiler_deps}",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
supports_param_files = 1,
|
supports_param_files = 1,
|
||||||
|
12
third_party/gpus/cuda_configure.bzl
vendored
12
third_party/gpus/cuda_configure.bzl
vendored
@ -81,7 +81,7 @@ def verify_build_defines(params):
|
|||||||
"host_compiler_prefix",
|
"host_compiler_prefix",
|
||||||
"host_compiler_warnings",
|
"host_compiler_warnings",
|
||||||
"linker_bin_path",
|
"linker_bin_path",
|
||||||
"linker_files",
|
"compiler_deps",
|
||||||
"msvc_cl_path",
|
"msvc_cl_path",
|
||||||
"msvc_env_include",
|
"msvc_env_include",
|
||||||
"msvc_env_lib",
|
"msvc_env_lib",
|
||||||
@ -91,7 +91,7 @@ def verify_build_defines(params):
|
|||||||
"msvc_link_path",
|
"msvc_link_path",
|
||||||
"msvc_ml_path",
|
"msvc_ml_path",
|
||||||
"unfiltered_compile_flags",
|
"unfiltered_compile_flags",
|
||||||
"win_linker_files",
|
"win_compiler_deps",
|
||||||
]:
|
]:
|
||||||
if ("%{" + param + "}") not in params:
|
if ("%{" + param + "}") not in params:
|
||||||
missing.append(param)
|
missing.append(param)
|
||||||
@ -1171,8 +1171,8 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
"-Wno-invalid-partial-specialization"
|
"-Wno-invalid-partial-specialization"
|
||||||
"""
|
"""
|
||||||
cuda_defines["%{cxx_builtin_include_directories}"] = to_list_of_strings(host_compiler_includes)
|
cuda_defines["%{cxx_builtin_include_directories}"] = to_list_of_strings(host_compiler_includes)
|
||||||
cuda_defines["%{linker_files}"] = ":empty"
|
cuda_defines["%{compiler_deps}"] = ":empty"
|
||||||
cuda_defines["%{win_linker_files}"] = ":empty"
|
cuda_defines["%{win_compiler_deps}"] = ":empty"
|
||||||
repository_ctx.file(
|
repository_ctx.file(
|
||||||
"crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc",
|
"crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc",
|
||||||
"",
|
"",
|
||||||
@ -1205,8 +1205,8 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
".exe" if _is_windows(repository_ctx) else "",
|
".exe" if _is_windows(repository_ctx) else "",
|
||||||
)),
|
)),
|
||||||
)
|
)
|
||||||
cuda_defines["%{linker_files}"] = ":crosstool_wrapper_driver_is_not_gcc"
|
cuda_defines["%{compiler_deps}"] = ":crosstool_wrapper_driver_is_not_gcc"
|
||||||
cuda_defines["%{win_linker_files}"] = ":windows_msvc_wrapper_files"
|
cuda_defines["%{win_compiler_deps}"] = ":windows_msvc_wrapper_files"
|
||||||
|
|
||||||
wrapper_defines = {
|
wrapper_defines = {
|
||||||
"%{cpu_compiler}": str(cc),
|
"%{cpu_compiler}": str(cc),
|
||||||
|
3
third_party/gpus/rocm_configure.bzl
vendored
3
third_party/gpus/rocm_configure.bzl
vendored
@ -46,7 +46,6 @@ def verify_build_defines(params):
|
|||||||
"host_compiler_path",
|
"host_compiler_path",
|
||||||
"host_compiler_prefix",
|
"host_compiler_prefix",
|
||||||
"linker_bin_path",
|
"linker_bin_path",
|
||||||
"linker_files",
|
|
||||||
"unfiltered_compile_flags",
|
"unfiltered_compile_flags",
|
||||||
]:
|
]:
|
||||||
if ("%{" + param + "}") not in params:
|
if ("%{" + param + "}") not in params:
|
||||||
@ -793,8 +792,6 @@ def _create_local_rocm_repository(repository_ctx):
|
|||||||
rocm_defines["%{cxx_builtin_include_directories}"] = to_list_of_strings(host_compiler_includes +
|
rocm_defines["%{cxx_builtin_include_directories}"] = to_list_of_strings(host_compiler_includes +
|
||||||
_rocm_include_path(repository_ctx, rocm_config))
|
_rocm_include_path(repository_ctx, rocm_config))
|
||||||
|
|
||||||
rocm_defines["%{linker_files}"] = "clang/bin/crosstool_wrapper_driver_is_not_gcc"
|
|
||||||
|
|
||||||
verify_build_defines(rocm_defines)
|
verify_build_defines(rocm_defines)
|
||||||
|
|
||||||
# Only expand template variables in the BUILD file
|
# Only expand template variables in the BUILD file
|
||||||
|
@ -35,10 +35,12 @@ cc_toolchain_suite(
|
|||||||
|
|
||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-local",
|
name = "cc-compiler-local",
|
||||||
all_files = "clang/bin/crosstool_wrapper_driver_is_not_gcc",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = "clang/bin/crosstool_wrapper_driver_is_not_gcc",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
strip_files = ":empty",
|
strip_files = ":empty",
|
||||||
# To support linker flags that need to go to the start of command line
|
# To support linker flags that need to go to the start of command line
|
||||||
|
@ -40,7 +40,9 @@ cc_toolchain_suite(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-local",
|
name = "cc-compiler-local",
|
||||||
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
@ -80,7 +82,9 @@ cc_toolchain_config(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-darwin",
|
name = "cc-compiler-darwin",
|
||||||
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
@ -116,7 +120,9 @@ cc_toolchain_config(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-windows",
|
name = "cc-compiler-windows",
|
||||||
all_files = ":windows_msvc_wrapper_files",
|
all_files = ":windows_msvc_wrapper_files",
|
||||||
compiler_files = ":empty",
|
ar_files = ":windows_msvc_wrapper_files",
|
||||||
|
as_files = ":windows_msvc_wrapper_files",
|
||||||
|
compiler_files = ":windows_msvc_wrapper_files",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":windows_msvc_wrapper_files",
|
linker_files = ":windows_msvc_wrapper_files",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
|
@ -40,7 +40,9 @@ cc_toolchain_suite(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-local",
|
name = "cc-compiler-local",
|
||||||
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
@ -82,7 +84,9 @@ cc_toolchain_config(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-darwin",
|
name = "cc-compiler-darwin",
|
||||||
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
all_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
compiler_files = ":empty",
|
ar_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
as_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
|
compiler_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
linker_files = ":crosstool_wrapper_driver_is_not_gcc",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
@ -118,7 +122,9 @@ cc_toolchain_config(
|
|||||||
cc_toolchain(
|
cc_toolchain(
|
||||||
name = "cc-compiler-windows",
|
name = "cc-compiler-windows",
|
||||||
all_files = ":windows_msvc_wrapper_files",
|
all_files = ":windows_msvc_wrapper_files",
|
||||||
compiler_files = ":empty",
|
ar_files = ":windows_msvc_wrapper_files",
|
||||||
|
as_files = ":windows_msvc_wrapper_files",
|
||||||
|
compiler_files = ":windows_msvc_wrapper_files",
|
||||||
dwp_files = ":empty",
|
dwp_files = ":empty",
|
||||||
linker_files = ":windows_msvc_wrapper_files",
|
linker_files = ":windows_msvc_wrapper_files",
|
||||||
objcopy_files = ":empty",
|
objcopy_files = ":empty",
|
||||||
|
Loading…
Reference in New Issue
Block a user