Skip to content

Versions newer than 1.3.2 make Julia/CUDA/Flux slow #742

@fps

Description

@fps

Hi,

this is a weird issue I suppose. It showed up the first time when the move from 1.3.2 to 1.4.0 was made and I thought it might be a transitive quirk but it seems to have persisted even up to the current release:

Create a new temporary environment and

add CUDA, cuDNN, Flux

(Note that GPUCompiler is then added as dependency at the current release.)

For some reason this makes Julia slow. Even right after doing this, in the precompilation step, julia never takes more than ca. 20% of a cpu and the precompilation step takes a very long time. Once it's done everything with Flux also takes a long time.

Image

If you do instead:

add CUDA, cuDNN, Flux, GPUCompiler@1.3.2

everything seems to behave normally. Precompilation utilizes cores up to 99.9% and my Flux code runs normally. This system is running NixOS and has an Nvidia RTX 3080.

In the past I think I tried repeatedly attaching GDB to see what's happening, but I got none the wiser. This slowdown does not happen on a Windows machine (different CPU, GPU and everything).

julia> versioninfo()
Julia Version 1.11.7
Commit f2b3dbda30a (2025-09-08 12:10 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 16 × AMD Ryzen 7 1700X Eight-Core Processor
  WORD_SIZE: 64
  LLVM: libLLVM-16.0.6 (ORCJIT, znver1)
Threads: 16 default, 2 interactive, 8 GC (on 16 virtual cores)
Environment:
  JULIA_NUM_THREADS = 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions