-
Notifications
You must be signed in to change notification settings - Fork 232
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rework how local toolkits are selected. #2058
Conversation
90fe32a
to
569ccf7
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## master #2058 +/- ##
==========================================
- Coverage 71.09% 71.08% -0.02%
==========================================
Files 157 157
Lines 13911 13916 +5
==========================================
+ Hits 9890 9892 +2
- Misses 4021 4024 +3
☔ View full report in Codecov by Sentry. |
@maleadt what version will this change land in? |
5.0, which I plan to release early next week (with an accompanying blog post). For all intents and purposes, the current state of the master branch is what will be in the release, so now would be a great time for some last-minute testing. |
is there a way we could do this so the preferences would be backward compatible? |
Not without some effort; is why I asked about it beforehand. I guess we could make it so that |
yes? Basically I have some overrides we apply system wide, and it would be nice if they applied to all versions of CUDA.jl. |
FYI, I don't see a warning if I don't set the version properly. e.g. the following Project.toml doesn't trigger anything
|
Not sure about that, but it works if I add |
Copying from JuliaPackaging/Yggdrasil#7246:
TLDR: Users of local toolkits now have to specify the version when precompiling in an environment where CUDA is not available (i.e. containers, log-in nodes), by calling
CUDA.set_runtime_version!(v"11.8"; local_toolkit=true)
or by provisioning aLocalPreferences.toml
that contains both theversion
andlocal
preference. When precompiling on a system where CUDA is available, just settinglocal = "true"
or callingCUDA.set_runtime_version!(local_toolkit=true)
is sufficient, and CUDA_Runtime_jll will auto-detect the CUDA version by calling in tolibcudart
.I'm doing this so that CUDA.jl knows, during precompilation, which CUDA version will be used. Right now, it only knows that when we're using artifacts, as for local toolkits the version is simply
"local"
(and we might be precompiling on a system without CUDA, so we can't just check which version we'll be using). Once we're guaranteed to know the CUDA version, we'll be able to do conditional things like versioning the header wrappers, or doing@static
conditionals in hot code paths (currently these are runtime checks, memoized for performance).HPC folks: This is the minor breaking change I mentioned at JuliaCon. It slightly changes the workflow, but shouldn't change anything significantly. It should even improve certain local toolkit aspects, as it won't now download artifacts when
local = "true"
. On the other hand, it will complain when the local CUDA installation is updated and you do not re-compile CUDA.jl (which we cannot easily automate).