Skip to content
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

switch to using defined globals #1832

Merged
merged 1 commit into from
Mar 29, 2023

Conversation

simonbyrne
Copy link
Contributor

@simonbyrne simonbyrne commented Mar 24, 2023

@maleadt maleadt marked this pull request as ready for review March 28, 2023 15:17
@maleadt
Copy link
Member

maleadt commented Mar 28, 2023

@simonbyrne do you have a way to verify if this works for you?

@simonbyrne
Copy link
Contributor Author

It works!

The only downside is that it leaves CUDA.libcuda undefined if CUDA_Driver_jll.libcuda == nothing. Would it perhaps be simpler to just import CUDA_Driver_jll: libcuda and leave it at that?

@maleadt
Copy link
Member

maleadt commented Mar 29, 2023

The only downside is that it leaves CUDA.libcuda undefined if CUDA_Driver_jll.libcuda == nothing. Would it perhaps be simpler to just import CUDA_Driver_jll: libcuda and leave it at that?

That won't work: CUDA_Driver_jll isn't available on all platforms, so its init block doesn't always run (JuliaPackaging/JLLWrappers.jl#50). That's why CUDA.jl falls back to a simple Libdl.find_library search and uses that to set CUDA.libcuda. If we'd import CUDA_Driver_jll: libcuda, we can't redefine it in case it is nothing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants