Csaint/cuda runtime rdc static deps - #488
Open
charleysaintNV wants to merge 7 commits into
Open
Conversation
charleysaintNV
requested review from
cloudhan,
jsharpe and
ryanleary
as code owners
August 6, 2026 22:32
Collaborator
|
Generally looks good. But where is my CI?🤔 |
charleysaintNV
force-pushed
the
csaint/cuda-runtime-rdc-static-deps
branch
from
August 7, 2026 03:19
d018775 to
83f58e2
Compare
Contributor
Author
|
Not sure why that happened but a rebase seems to have corrected it... |
Contributor
Author
|
@cloudhan not sure if I need to fix CI or if it's expected to fail in some cases |
Collaborator
|
The two window tests can be ignored for now. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Move CUDA RDC device runtime libs into the toolchain
Summary
This change removes unconditional propagation of CUDA device runtime static archives from the normal CUDA runtime dependency and moves them into the CUDA toolchain.
The goal is to let non-RDC consumers of
@rules_cuda//cuda:runtimekeep linking against sharedlibcudartwithout also pullinglibcudadevrt.a/libculibos.ainto downstream shared libraries. RDC builds still get those static archives from the toolchain for device-link and final host-link correctness.Changes
device_runtime_static_libstoCudaToolkitInfo.libcudadevrt.a/libculibos.aand generated redist aliases as toolchain inputs.cuda_library(rdc = True).cudadevrt_a/culibos_afrom the normal dynamiccuda_runtimedependency path.cudadevrt_a/cudadevrt_libaliases from the cudart component registry so generated toolchains can reference them.Validation
Rules CUDA:
bazel test //tests/flag:cuda_library_dlink_copts_and_host_copts_flag_test bazel build @rules_cuda_examples//rdc:main_from_library bazel build @rules_cuda_examples//basic:mainLink-shape checks:
basic:mainfinal link uses sharedlibcudartand does not includelibcudadevrt.a,libculibos.a, orlibcudart_static.a.rdc:main_from_libraryfinal link includeslibcudadevrt.aandlibculibos.afrom the CUDA toolchain.Downstream smoke validation:
The representative shared library
libvisual_global_localization_node.sodropped to about 20 MB, and the package SO link params used sharedlibcudart.so.13withoutcudadevrt,culibos, orcudart_staticentries.