# cuDNN, julia-1.10 and linux

**URL:** <https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658>\
**Category:** Machine Learning\
**Tags:** flux, cudnn, metalhead\
**Created:** [November 24, 2023, 4:02am UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658 "2023-11-24T04:02:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [November 24, 2023, 4:02am UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/1 "2023-11-24T04:02:33Z")

</div>

I have trained a Resnet18 using Flux on julia-1.10 rc1, actually I have trained multiple models with no trouble at all, but this week when I try to predict using my model I get a compilation error for my private package:

```julia
julia> using Skraak
┌ Error: cuDNN is not available for your platform (x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-cuda+none-julia_version+1.10.0)
└ @ cuDNN ~/.julia/packages/cuDNN/E0AFc/src/cuDNN.jl:172

```

prediction fails with a stack trace. cuDNN again.

This would be no problem, I reinstalled julia 1.9.4, cuDNN is available, but my jld2 does not load because it has a different structure.

(I thought jld2 was the safe way to save a model, alas no. I am using Metalhead in there and maybe that is where the structure change snuck in, not sure.)

So now I am stuck, can’t use a model that took 5 days on a GPU to train.

Question: when will cuDNN become available for my platform (x86\_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-cuda+none-julia\_version+1.10.0), or is there another way to solve this problem.

Since I manged to train and run several models before this error surfaced, it is most likely due to a change in a Project.toml somewhere upstream. It can likely be fixed very easily by a package maintainer somewhere.

I really want to publish my package sometime, so others can use it, but a stable api is very important.

Regards  
David

---

<div class="post-metadata">

**Author:** ![Alexander-Barth](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/alexander-barth/32/3692_2.png) [@Alexander-Barth](https://discourse.julialang.org/u/Alexander-Barth)\
**Post date:** [December 5, 2023, 9:35am UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/2 "2023-12-05T09:35:31Z")

</div>

I am having a similar problem for julia 1.9.4 while trying to install a older version of CUDA 4.1-4.4 (the current version runs out of GPU memory, while it worked with older version).

I wondering if the issue is not from the `none` in the platform name. Maybe the CUDA version is not recognized?

I also see this error:

```julia
 NNlibCUDACUDNNExt [ab3ce674-22af-5de9-b6c7-795b17302dcb]
│ ┌ Error: CUDA.jl could not find an appropriate CUDA runtime to use.
│ │ 
│ │ This can have several reasons:
│ │ * you are using an unsupported platform: this version of CUDA.jl
│ │ only supports Linux (x86_64, aarch64, ppc64le) and Windows (x86_64),
│ │ while your platform was identified as x86_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-cuda+local-julia_version+1.9.4;
│ │ * you precompiled CUDA.jl in an environment where the CUDA driver
│ │ was not available (i.e., a container, or an HPC login node).
│ │ in that case, you need to specify which CUDA version to use
│ │ by calling `CUDA.set_runtime_version!`;
│ │ * you requested use of a local CUDA toolkit, but not all
│ │ required components were discovered. try running with
│ │ JULIA_DEBUG=all in your environment for more details.
│ │ 
│ │ For more details, refer to the CUDA.jl documentation at
│ │ https://cuda.juliagpu.org/stable/installation/overview/
│ └ @ CUDA ~/src/DiffModel-test4.jl/depot/packages/CUDA/p5OVK/src/initialization.jl:

```

Running this command did not resolve the problem for me:

```julia
julia> CUDA.set_runtime_version!()
[ Info: Reset CUDA Runtime version preference, please re-start Julia for this to take effect.

```

---

<div class="post-metadata">

**Author:** ![ToucheSir](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/touchesir/32/14411_2.png) [@ToucheSir](https://discourse.julialang.org/u/ToucheSir)\
**Post date:** [December 5, 2023, 3:27pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/3 "2023-12-05T15:27:14Z")

</div>

The best place to troubleshoot issues like these is the CUDA.jl issue tracker. I know there are a million and a half edge cases around discovering the right libraries, so the recommendation from the maintainers has been to open issues with enough information to repro the problem or otherwise deduce what might be happening on your machines.

(The ML category is probably not the best place since we don’t know what’s going on either, and the GPU library maintainers aren’t actively watching here)

---

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [December 5, 2023, 11:27pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/4 "2023-12-05T23:27:45Z")

</div>

Thanks for your replies.

I have other stuff going on at the moment, as soon as I get time I will try a few more things and share the results somewhere more appropriate.

Julia is a really great language to work with and I am always learning new stuff.

Regards  
David

---

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [December 8, 2023, 1:00am UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/5 "2023-12-08T01:00:35Z")

</div>

I upgraded to julia 1.10 rc2, had a clean out and now it all works well again. cuDNN is back.

Kindness  
David

---

<div class="post-metadata">

**Author:** ![lf28](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lf28/32/31200_2.png) [@lf28](https://discourse.julialang.org/u/lf28)\
**Post date:** [January 27, 2024, 12:34pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/6 "2024-01-27T12:34:47Z")

</div>

Hello, I was wondering whether you have got the problem again? It seems I am now having exactly the same problem: cuDNN is not available for your platform (x86\_64-linux-gnu-libgfortran5-cxx11-libstdcxx30-cuda+none-julia\_version+1.10.0), but CUDA and cuDNN both have been installed fine.

---

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [January 27, 2024, 9:01pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/7 "2024-01-27T21:01:42Z")

</div>

Hi

Yes, I still have this problem. It went away with 1.10 rc2, but when i upgraded to 1.10 it came back again. I have not checked for around a month though.

Extremely frustrating as I am unable to get any real work done.

Regards  
David

---

<div class="post-metadata">

**Author:** ![lf28](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lf28/32/31200_2.png) [@lf28](https://discourse.julialang.org/u/lf28)\
**Post date:** [January 27, 2024, 11:10pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/8 "2024-01-27T23:10:56Z")

</div>

Yeah, I am having exactly the same error. I have rolled back 1.94 and it works fine. I have added an issue to CUDA.jl’s GitHub and hope it can be resolved.

Lei

---

<div class="post-metadata">

**Author:** ![lf28](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/lf28/32/31200_2.png) [@lf28](https://discourse.julialang.org/u/lf28)\
**Post date:** [January 28, 2024, 12:36pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/9 "2024-01-28T12:36:00Z")

</div>

Good news! Thanks to [Tim Besard](https://github.com/maleadt), there is an easy solution: check here for details: [cuDNN not available for your platform · Issue #2252 · JuliaGPU/CUDA.jl · GitHub](https://github.com/JuliaGPU/CUDA.jl/issues/2252)

TL;DR

First, remove the compilecache

> rm -rf ~/.julia/compiled/v1.10/cuDNN  
> rm -rf ~/.julia/compiled/v1.10/CUDNN\_jll

Then, restart again, i.e. add CUDA, cuDNN,  
Then everything should work fine again.

---

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [January 28, 2024, 4:09pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/10 "2024-01-28T16:09:19Z")

</div>

Thanks!

I really don/t want to go back to 1.9

Kindness  
David

---

<div class="post-metadata">

**Author:** ![quietlight](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/quietlight/32/35187_2.png) [@quietlight](https://discourse.julialang.org/u/quietlight)\
**Post date:** [January 28, 2024, 9:34pm UTC](https://discourse.julialang.org/t/cudnn-julia-1-10-and-linux/106658/11 "2024-01-28T21:34:28Z")

</div>

Thanks a million. It worked for me. I have successfully fine tuned my model on GPU.

Now I can work on my prediction loop again, at last. I need to predict over TB of audio, not having a GPU is a fate worse than death. I had to go back to a python library.

Kindness  
David
