Add cuda_root filegroup target to the windows BUILD template.
When I added this to the linux BUILD template, I forgot to add it here, too. Adjust cuda_configure.bzl.oss so that it copies the binaries with .exe extension on Windows. PiperOrigin-RevId: 317601952 Change-Id: I0712bcd926372cb9d067ead7f92270d52883bfd9
This commit is contained in:
parent
9f43ebd68c
commit
5229c77d94
8
third_party/gpus/cuda/BUILD.windows.tpl
vendored
8
third_party/gpus/cuda/BUILD.windows.tpl
vendored
@ -196,6 +196,14 @@ cc_library(
|
|||||||
data = [":cuda-nvvm"],
|
data = [":cuda-nvvm"],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
filegroup(
|
||||||
|
name = "cuda_root",
|
||||||
|
srcs = [
|
||||||
|
"cuda/bin/fatbinary.exe",
|
||||||
|
"cuda/bin/bin2c.exe",
|
||||||
|
],
|
||||||
|
)
|
||||||
|
|
||||||
bzl_library(
|
bzl_library(
|
||||||
name = "build_defs_bzl",
|
name = "build_defs_bzl",
|
||||||
srcs = ["build_defs.bzl"],
|
srcs = ["build_defs.bzl"],
|
||||||
|
13
third_party/gpus/cuda_configure.bzl
vendored
13
third_party/gpus/cuda_configure.bzl
vendored
@ -1062,20 +1062,21 @@ def _create_local_cuda_repository(repository_ctx):
|
|||||||
))
|
))
|
||||||
|
|
||||||
# copy files mentioned in third_party/nccl/build_defs.bzl.tpl
|
# copy files mentioned in third_party/nccl/build_defs.bzl.tpl
|
||||||
|
file_ext = ".exe" if is_windows(repository_ctx) else ""
|
||||||
copy_rules.append(make_copy_files_rule(
|
copy_rules.append(make_copy_files_rule(
|
||||||
repository_ctx,
|
repository_ctx,
|
||||||
name = "cuda-bin",
|
name = "cuda-bin",
|
||||||
srcs = [
|
srcs = [
|
||||||
cuda_config.cuda_toolkit_path + "/bin/" + "crt/link.stub",
|
cuda_config.cuda_toolkit_path + "/bin/" + "crt/link.stub",
|
||||||
cuda_config.cuda_toolkit_path + "/bin/" + "nvlink",
|
cuda_config.cuda_toolkit_path + "/bin/" + "nvlink" + file_ext,
|
||||||
cuda_config.cuda_toolkit_path + "/bin/" + "fatbinary",
|
cuda_config.cuda_toolkit_path + "/bin/" + "fatbinary" + file_ext,
|
||||||
cuda_config.cuda_toolkit_path + "/bin/" + "bin2c",
|
cuda_config.cuda_toolkit_path + "/bin/" + "bin2c" + file_ext,
|
||||||
],
|
],
|
||||||
outs = [
|
outs = [
|
||||||
"cuda/bin/" + "crt/link.stub",
|
"cuda/bin/" + "crt/link.stub",
|
||||||
"cuda/bin/" + "nvlink",
|
"cuda/bin/" + "nvlink" + file_ext,
|
||||||
"cuda/bin/" + "fatbinary",
|
"cuda/bin/" + "fatbinary" + file_ext,
|
||||||
"cuda/bin/" + "bin2c",
|
"cuda/bin/" + "bin2c" + file_ext,
|
||||||
],
|
],
|
||||||
))
|
))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user