Julia 1.7 & CUDA on Windows 11

I am not able to get CUDA installed on Julia 1.7 on Windows 11 (not even with WSL). The errors seem to be the same in both cases as it is not able to install LLVM properly. The error seems to be “could not load symbol “LLVMExtraInitializeNativeTarget””.
Any help/advice will be appreciated.
Thanks.
–shiv–

Update your packages, you need a sufficiently recent LLVM.jl (which in turn is only supported by a sufficiently recent CUDA.jl) for Julia 1.7.

I thought I had. In any case I updated all the packages (twice) again. It now complains that it cannot find LLVMInitializeAllTargets. This in in Windows itself.

In WSL “using CUDA” actually succeeds, but CUDA.versioninfo() raises the error “could not load symbol “cuDriverGetVersion””.

Thanks.
–shiv–

Can you post which version of LLVM.jl and LLVMExtra_jll.jl you’re using? See ]st -m.

That means libcuda cannot be found. This library is discovered using standard functionality, so verify this works:

julia> using Libdl

julia> Libdl.find_library("libcuda")
"libcuda"

If not, there’s probably something wrong with your set-up.

On windows 11 these are versions I have (] status):
LLVM 3.9.0
LLVMExtra_jll 0.0.13+0

On WSL Libdl.find_library(“libcuda”) returns “”.
So something is wrong. I thought Julia would download libcuda if needed?
Thanks.
–shiv–

Those are old versions, probably being held back by some package. Try ]add LLVM@4.7.0, the latest version. That will probably error, and explain the situation.

CUDA.jl downloads the CUDA toolkit, you’re still responsible for installing the NVIDIA driver providing libcuda. See Overview · CUDA.jl

Not sure why my reply does not show up here but ArrayFire was the culprit package.
Thanks.
–shiv–