Hi,
I’ve just upgraded from 1.11.7 to 1.12.0 and went though the packages installation from scratch. I installed CUDA.jl from pkg.add() and it did install fine. I then restarted the machine to make sure all is clear, and when opened julia 1.12.0 and issued the ‘using CUDA’ command, it just sits there doing nothing, essentially forever (20+ minutes waiting and still nothing). I changed nothing else but julia in my ubuntu machine, and everything was working fine before, prior to the upgrade…
Any clues here?
Best,
Ferran.
Can you share the output of:
using Pkg
Pkg.status()
?
sure
julia> Pkg.status()
Status ~/.julia/environments/v1.12/Project.toml
[052768ef] CUDA v5.9.0
[944b1d66] CodecZlib v0.7.8
[7a1cc6ca] FFTW v1.10.0
[59287772] Formatting v0.4.3
[7073ff75] IJulia v1.30.6
[bac558e1] OrderedCollections v1.8.1
[d330b81b] PyPlot v2.11.6
Uh… no apparent solution, right? I wonder if anybody else here has tried that and can report on her/his experience with the upgrade and CUDA.
In the meantime I don’t know what to do… revert to the previous julia version?
I can’t reproduce this on a Windows 11 machine, the first using CUDA was indeed quite slow (on the order of a couple of minutes) but things work fine.
Then this may be OS-dependent. The only way I’ve managed to make it work on my ubuntu mate machine is to invoke julia with the command
julia --compiled-modules=no
then it takes a while to load -but it does load, contrarily to what happened before…
Just tried in Ubuntu WSL2 and it’s much speedier there:
julia> @time using CUDA
17.013851 seconds (12.21 M allocations: 715.201 MiB, 1.71% gc time, 83.69% compilation time: 98% of which was recompilation)
Ok, looks like there is a bug in the synchronization of parallel loading tasks… or something similar
At least that’s what claude anthropic told me. And he found the following workaround, which is to edit the .julia/config/startup.jl file and add the following line:
ENV[“JULIA_DEBUG”] = “loading”
which is a bit annoying because it spits a lot of messages you don’t really want to see on the screen every time you load a package… but it makes it work. Claude also says that is something that has been also reported by other users, andhope to find a fix in julia 1.12.1. Please notice I’ve tried that in 4 different machines running ubuntu.
Bottom line is: there’s a bug but also a workaround.
julia> CUDA.versioninfo()
CUDA toolchain:
- runtime 13.0, artifact installation
- driver 580.76.5 for 13.0
- compiler 13.0
CUDA libraries:
- CUBLAS: 13.0.2
- CURAND: 10.4.0
- CUFFT: 12.0.0
- CUSOLVER: 12.0.4
- CUSPARSE: 12.6.3
- CUPTI: 2025.3.1 (API 13.0.1)
- NVML: 13.0.0+580.76.5
Julia packages:
- CUDA: 5.9.0
- CUDA_Driver_jll: 13.0.1+0
- CUDA_Compiler_jll: 0.2.1+0
- CUDA_Runtime_jll: 0.19.1+0
Toolchain:
- Julia: 1.12.0
- LLVM: 18.1.7
1 device:
0: NVIDIA GeForce RTX 5090 (sm_120, 30.470 GiB / 31.843 GiB available)
julia> CUDA.functional()
true
CUDA.jl 1.12 compatibility is in the works. Try the master branch if you run into issues.
Interrupt it (CTRL-C) and post the backtrace.
Don’t trust LLMs to debug issues like this. Adding debug logging only increases verbosity, and is not expected to be a valid workaround for anything.
Hi,
‘trusting’ is not the right word, but in any case Claude has given me a way (other than downgrading to a previous version) to keep running my production codes. Actually it is the only one who has done so. I would say that a sentence like ‘Adding debug logging only increases verbosity, and is not expected to be a valid workaround for anything’ simply means that, at least in this case, the problem is not yet fully understood. Maybe adding the verbosity level has some side effects that are among the ‘not expected’ things. I don’t know as I’m not a julia develope. The only thing I can say is that this is indeed a workaround, as it makes things work (and with that I mean more than just returning the prompt after the ‘using CUDA’, I mean to have codes running again and working as before), while I understand this can’t be the solution, which should come in the (near?) future…