-
I am helping a NERSC user develop a package on Perlmutter that depends on CUDA. We're encountering the following problem where the Pkg.test() environment does not pick up the project-wide CUDA configuration. BackgroundAt NERSC we set the # MPI stuff committed for brevity
[CUDA_Runtime_jll]
local = "true"
version = "12.2" This way we set the CUDA.jl runtime version globally on the system to match the version installed by the vendor:
The ProblemThe package the user is developing uses CUDA. If I add
So then I tried adding the
to the test's How do I either force CUDA.jl to use the system-wide preferences, or how to tell a unit test that relies on CUDA.jl to use a specific runtime version? I was going to post this in the official Pkg.jl repo, but wanted to get @maleadt 's opinion first. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
Converted to a discussion since this isn't really a CUDA.jl issue. In CI, we successfully do this by setting a CUDA.jl/.buildkite/pipeline.yml Lines 20 to 21 in a085bbb CUDA_Runtime_jll ) isn't a direct dependency or listed in the [extras] section of the active environment.
|
Beta Was this translation helpful? Give feedback.
-
Thanks @maleadt I think the relevant lines are here: CUDA.jl/.buildkite/pipeline.yml Line 117 in a085bbb CUDA.jl/.buildkite/pipeline.yml Line 459 in a085bbb Pkg.test() but instead you instantiate your own environment.
I'm going to ask in Pgk.jl to see if there is a simpler way -- otherwise I'll advise the user to do what you're doing in your CI. |
Beta Was this translation helpful? Give feedback.
-
Ah! I just found: JuliaLang/Pkg.jl#3389 -- let's leave this discussion open until the linked issue has been solved. |
Beta Was this translation helpful? Give feedback.
Converted to a discussion since this isn't really a CUDA.jl issue.
In CI, we successfully do this by setting a
LocalPreferences.toml
in the package directory:CUDA.jl/.buildkite/pipeline.yml
Lines 20 to 21 in a085bbb
CUDA_Runtime_jll
) isn't a direct dependency or listed in the[extras]
section of the active environment.