Skip to content

Commit

Permalink
Fix _wrapper_device_link artifact name conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
cloudhan committed Jul 19, 2023
1 parent 0503ead commit 101a137
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion cuda/private/actions/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ def compile(
srcs,
common,
pic = False,
rdc = False):
rdc = False,
_prefix = "_objs"):
"""Perform CUDA compilation, return compiled object files.
Notes:
Expand All @@ -26,6 +27,7 @@ def compile(
common: A cuda common object. Can be obtained with `cuda_helper.create_common(ctx)`
pic: Whether the `srcs` are compiled for position independent code.
rdc: Whether the `srcs` are compiled for relocatable device code.
_prefix: DON'T USE IT! Prefix of the output dir. Exposed for device link to redirect the output.
Returns:
An compiled object `File`.
Expand Down
2 changes: 1 addition & 1 deletion cuda/private/actions/dlink.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -203,5 +203,5 @@ def _wrapper_device_link(
# suppress cuda mode as c++ mode
host_compile_flags = common.host_compile_flags + ["-x", "c++"],
)
ret = compile(ctx, cuda_toolchain, cc_toolchain, srcs = [fatbin_c], common = compile_common, pic = pic, rdc = rdc)
ret = compile(ctx, cuda_toolchain, cc_toolchain, srcs = [fatbin_c], common = compile_common, pic = pic, rdc = rdc, _prefix = "_objs/_dlink")
return ret[0]

0 comments on commit 101a137

Please sign in to comment.