# Julia 1.7 & CUDA on Windows 11

**URL:** <https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488>\
**Category:** GPU\
**Tags:** question\
**Created:** [December 2, 2021, 8:18pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488 "2021-12-02T20:18:03Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![00shiv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00shiv/32/8903_2.png) [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Post date:** [December 2, 2021, 8:18pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/1 "2021-12-02T20:18:03Z")

</div>

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–

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [December 2, 2021, 9:22pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/2 "2021-12-02T21:22:09Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![00shiv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00shiv/32/8903_2.png) [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Post date:** [December 2, 2021, 10:06pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/3 "2021-12-02T22:06:46Z")

</div>

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–

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [December 3, 2021, 7:52am UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/4 "2021-12-03T07:52:22Z")

</div>

> [@00shiv](#):
>
> 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.

Can you post which version of LLVM.jl and LLVMExtra\_jll.jl you’re using? See `]st -m`.

> [@00shiv](#):
>
> In WSL “using CUDA” actually succeeds, but CUDA.versioninfo() raises the error “could not load symbol “cuDriverGetVersion””.

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

```julia
julia> using Libdl

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

```

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

---

<div class="post-metadata">

**Author:** ![00shiv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00shiv/32/8903_2.png) [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Post date:** [December 3, 2021, 3:10pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/5 "2021-12-03T15:10:04Z")

</div>

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–

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [December 3, 2021, 7:28pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/6 "2021-12-03T19:28:01Z")

</div>

> [@00shiv](#):
>
> LLVM 3.9.0  
> LLVMExtra\_jll 0.0.13+0

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.

> [@00shiv](#):
>
> On WSL Libdl.find\_library(“libcuda”) returns “”.  
> So something is wrong. I thought Julia would download libcuda if needed?

CUDA.jl downloads the CUDA _toolkit_, you’re still responsible for installing the NVIDIA driver providing `libcuda`. See [Overview · CUDA.jl](https://cuda.juliagpu.org/stable/installation/overview/)

---

<div class="post-metadata">

**Author:** ![00shiv](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/00shiv/32/8903_2.png) [@00shiv](https://discourse.julialang.org/u/00shiv)\
**Post date:** [December 6, 2021, 6:56pm UTC](https://discourse.julialang.org/t/julia-1-7-cuda-on-windows-11/72488/7 "2021-12-06T18:56:57Z")

</div>

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