CUDA under julia 1.5.0

Hi,
this is ubuntu 20.04 fresh install, also Julia 1.5.0

add CUDA
[ Info: Resolving package identifier `CUDA` as a directory at `~/CUDA`.
ERROR: Did not find a git repository at `CUDA`

no CUDA whatsoever… what am I doing wrong?

Of course, other packages install well with the same procedure…

Best,

Ferran

The problem here is that it tries to add the local folder called CUDA on your harddrive. You can do

using Pkg
Pkg.add(name="CUDA")

There has been a discussion about removing this ambiguity, and forcing writing add ./CUDA to add the local folder over the named package.

3 Likes

Interesting issue… thanks for the info.
In any case I guess this has to be fixed in future releases, right? I mean, it makes no sense to have to
install this package in a different way from the rest (I mean that the standard way add CUDA should work, to my understandings…)
Best,
Ferran.

It’s not specific to CUDA, it’s specific to you having a directory called CUDA in your home directory, but as @kristoffer.carlsson said, it can be a bit confusing and may get changed in the future.

5 Likes

…which makes essentially no difference because the installation methods should not depend on the names of the folders I have on my local drive.
Anyway it does not compile on my Julia 1.5.0 box under ubuntu 20.04 so I guess I’ll wait until the package gets a bit more stable, sticking to the old CuArrays etc packages for a while.
Thanks for the replies,
Ferran.

I’m a little confused by this. Are you running Julia out of your home directory specifically? That’s the only way Pkg would pick up on a subdirectory called “CUDA”. Even changing to a different directory and trying to install CUDA in the global environment works as expected…

In other words, this is not a problem with CUDA itself. I would run into the same problem right now if I cd'd to a random directory, created a CuArrays subdir, started Julia and ran ] add CuArrays. Are you able to just run Julia out of the same directory you have the rest of your project’s files/data in? I can only assume that would cut down on home directory clutter as well!

3 Likes

This issue has literally nothing to do with the CUDA.jl package, but with the coincidence that you have a folder named CUDA in your home directory. Waiting for the package to ‘stabilize’ won’t help, a more productive approach is to get rid or rename said folder. If you have other issues, please file an issue.

2 Likes

Hence

5 Likes

HI,
I renamed my CUDA folder (so to adapt my computer to Julia requests, very nice) and tried to install CUDA.jl on my ubuntu mate 20.04, julia 1.5.0 box. Still getting errors

   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.0 (2020-08-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using CUDA
[ Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
ERROR: LoadError: LoadError: LoadError: UndefVarError: AddrSpacePtr not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
 [3] include(::Function, ::Module, ::String) at ./Base.jl:380
 [4] include at ./Base.jl:368 [inlined]
 [5] include(::String) at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [6] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:15
 [7] include(::Function, ::Module, ::String) at ./Base.jl:380
 [8] include at ./Base.jl:368 [inlined]
 [9] include(::String) at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:1
 [10] top-level scope at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
 [11] include(::Function, ::Module, ::String) at ./Base.jl:380
 [12] include(::Module, ::String) at ./Base.jl:368
 [13] top-level scope at none:2
 [14] eval at ./boot.jl:331 [inlined]
 [15] eval(::Expr) at ./client.jl:467
 [16] top-level scope at ./none:3
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda/wmma.jl:52
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/device/cuda.jl:14
in expression starting at /home/mazzanti/.julia/packages/CUDA/5t6R9/src/CUDA.jl:39
ERROR: Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to /home/mazzanti/.julia/compiled/v1.5/CUDA/oWw5k_JTdPc.ji.
Stacktrace:
 [1] error(::String) at ./error.jl:33
 [2] compilecache(::Base.PkgId, ::String) at ./loading.jl:1290
 [3] _require(::Base.PkgId) at ./loading.jl:1030
 [4] require(::Base.PkgId) at ./loading.jl:928
 [5] require(::Module, ::Symbol) at ./loading.jl:923

…so there are still some issues here. Has anybody experienced anything similar?
Thanks…

1.5 is only supported by a sufficiently recent version of CUDA.jl; you’re probably still using v0.1

1 Like

A Pkg.status() would certainly help other people reproduce the problem.

I have no issues using CUDA.jl with Julia 1.5.