Use CUDA tools from @local_config_cuda when building NCCL.
PiperOrigin-RevId: 230245994
This commit is contained in:
parent
dad786f963
commit
ff91cd6910
8
third_party/nccl/build_defs.bzl.tpl
vendored
8
third_party/nccl/build_defs.bzl.tpl
vendored
@ -202,25 +202,25 @@ _device_link = rule(
|
||||
"gpu_archs": attr.string_list(),
|
||||
"nvlink_args": attr.string_list(),
|
||||
"_nvlink": attr.label(
|
||||
default = Label("@local_config_nccl//:nvlink"),
|
||||
default = Label("@local_config_cuda//cuda:cuda/bin/nvlink"),
|
||||
allow_single_file = True,
|
||||
executable = True,
|
||||
cfg = "host",
|
||||
),
|
||||
"_fatbinary": attr.label(
|
||||
default = Label("@local_config_nccl//:cuda/bin/fatbinary"),
|
||||
default = Label("@local_config_cuda//cuda:cuda/bin/fatbinary"),
|
||||
allow_single_file = True,
|
||||
executable = True,
|
||||
cfg = "host",
|
||||
),
|
||||
"_bin2c": attr.label(
|
||||
default = Label("@local_config_nccl//:cuda/bin/bin2c"),
|
||||
default = Label("@local_config_cuda//cuda:cuda/bin/bin2c"),
|
||||
allow_single_file = True,
|
||||
executable = True,
|
||||
cfg = "host",
|
||||
),
|
||||
"_link_stub": attr.label(
|
||||
default = Label("@local_config_nccl//:cuda/bin/crt/link.stub"),
|
||||
default = Label("@local_config_cuda//cuda:cuda/bin/crt/link.stub"),
|
||||
allow_single_file = True,
|
||||
),
|
||||
},
|
||||
|
16
third_party/nccl/nccl_configure.bzl
vendored
16
third_party/nccl/nccl_configure.bzl
vendored
@ -43,13 +43,6 @@ cc_library(
|
||||
"""
|
||||
|
||||
_NCCL_ARCHIVE_BUILD_CONTENT = """
|
||||
exports_files([
|
||||
"cuda/bin/crt/link.stub",
|
||||
"cuda/bin/fatbinary",
|
||||
"cuda/bin/bin2c",
|
||||
"nvlink",
|
||||
])
|
||||
|
||||
filegroup(
|
||||
name = "LICENSE",
|
||||
data = ["@nccl_archive//:LICENSE.txt"],
|
||||
@ -151,15 +144,6 @@ def _nccl_configure_impl(repository_ctx):
|
||||
repository_ctx.template("build_defs.bzl", _label("build_defs.bzl.tpl"), {
|
||||
"%{gpu_architectures}": str(gpu_architectures),
|
||||
})
|
||||
|
||||
repository_ctx.symlink(cuda_toolkit_path(repository_ctx), "cuda")
|
||||
|
||||
# Temporary work-around for setups which symlink ptxas to a newer
|
||||
# version. The versions of nvlink and ptxas need to agree, so we find
|
||||
# nvlink next to the real location of ptxas. This is only temporary and
|
||||
# will be removed again soon.
|
||||
nvlink_dir = repository_ctx.path("cuda/bin/ptxas").realpath.dirname
|
||||
repository_ctx.symlink(nvlink_dir.get_child("nvlink"), "nvlink")
|
||||
else:
|
||||
# Create target for locally installed NCCL.
|
||||
nccl_install_path = repository_ctx.os.environ[_NCCL_INSTALL_PATH].strip()
|
||||
|
Loading…
Reference in New Issue
Block a user