Add a CUDA JLL for actually loading the runtime libraries. #4677
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.
This is an experimental JLL, working my way towards actually using JLLs to load the CUDA runtime libraries instead of doing everything ourselves in CUDA.jl. It uses the
cuda
platform tag to determine which CUDA toolkit to load (based on driver compatibility and toolkit availability). That tag can then used by dependent JLLs, like CUDNN, to determine which library to load.Note that I didn't use a comparison strategy for determining which toolkit artifact to load. Instead, I'm using plain equality, but providing the list of available toolkits to
augment_platform!
instead (essentially embedding that in the generated JLL). This results in the platform tag containing the actual toolkit loaded, instead of the host's compatibility, which should make it easier for dependent JLLs to determine which artifact they can load.I'm not sure about the comparison strategy for dependent packages, so @giordano if you could review that (given how you've been looking into this recently).
The other big change that this JLL will result in, is that
using CUDA_Runtime_JLL
will eagerly download and load the CUDA runtime libraries (because we lack the flexibility of lazy-downloading or lazy-loading with JLLs right now, even with lazy artifacts). So packages depending on the CUDA stack will need to use Preferences to avoid loading CUDA if it isn't to be used. That's a departure from how things work right now.