UndefVarError while importing CUDA

Hi all,

I have issues on importing CUDA package. Only active packages are Knet and CUDA. The error as follows when I run “import CUDA” :

Info: Precompiling CUDA [052768ef-5323-5732-b1bb-66c8b64840ba]
└ @ Base loading.jl:1278
ERROR: LoadError: LoadError: UndefVarError: finish_module! not defined
Stacktrace:
[1] getproperty(::Module, ::Symbol) at ./Base.jl:26
[2] top-level scope at /kuacc/users/hcoban15/.julia/packages/CUDA/mbPFj/src/compiler/gpucompiler.jl:14
[3] include(::Function, ::Module, ::String) at ./Base.jl:380
[4] include at ./Base.jl:368 [inlined]
[5] include(::String) at /kuacc/users/hcoban15/.julia/packages/CUDA/mbPFj/src/CUDA.jl:1
[6] top-level scope at /kuacc/users/hcoban15/.julia/packages/CUDA/mbPFj/src/CUDA.jl:52
[7] include(::Function, ::Module, ::String) at ./Base.jl:380
[8] include(::Module, ::String) at ./Base.jl:368
[9] top-level scope at none:2
[10] eval at ./boot.jl:331 [inlined]
[11] eval(::Expr) at ./client.jl:467
[12] top-level scope at ./none:3
in expression starting at /kuacc/users/hcoban15/.julia/packages/CUDA/mbPFj/src/compiler/gpucompiler.jl:14
in expression starting at /kuacc/users/hcoban15/.julia/packages/CUDA/mbPFj/src/CUDA.jl:52
Failed to precompile CUDA [052768ef-5323-5732-b1bb-66c8b64840ba] to /kuacc/users/hcoban15/.julia/compiled/v1.5/CUDA/oWw5k_IvUFl.ji.

Which version of CUDA.jl and GPUCompiler.jl?
It’s also recommended to upgrade to Julia 1.6.

I must use Julia 1.5.3.

The versions are CUDA v2.4.3 GPUCompiler v0.8.3

Works for me:

tim@taurus ~$ JULIA_VERSION=1.5 jl                                                                                                                                                                           
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.5.4 (2021-03-11)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(@v1.5) pkg> activate --temp
 Activating new environment at `/tmp/jl_u8TlT7/Project.toml`

(jl_u8TlT7) pkg> add CUDA
   Updating registry at `~/.julia/registries/General`
######################################################################## 100,0%
  Resolving package versions...
  Installed NNlib ────────── v0.7.19
  Installed ChainRulesCore ─ v0.9.45
  Installed TOML ─────────── v1.0.3
  Installed CUDA ─────────── v2.4.3
Updating `/tmp/jl_u8TlT7/Project.toml`
  [052768ef] + CUDA v2.4.3
Updating `/tmp/jl_u8TlT7/Manifest.toml`
  [052768ef] + CUDA v2.4.3
  [61eb1bfa] + GPUCompiler v0.8.3

julia> using CUDA

julia> CuArray([1]).+1
1-element CuArray{Int64,1}:
 2

julia> pathof(CUDA)
"/home/tim/.julia/packages/CUDA/mbPFj/src/CUDA.jl"

julia> pathof(CUDA.GPUCompiler)
"/home/tim/.julia/packages/GPUCompiler/uTpNx/src/GPUCompiler.jl"

shell> rg finish_module /home/tim/.julia/packages/CUDA/mbPFj/src/
/home/tim/.julia/packages/CUDA/mbPFj/src/compiler/gpucompiler.jl
14:function GPUCompiler.finish_module!(job::CUDACompilerJob, mod::LLVM.Module)
15:    invoke(GPUCompiler.finish_module!,

shell> rg finish_module /home/tim/.julia/packages/GPUCompiler/uTpNx/src
/home/tim/.julia/packages/GPUCompiler/uTpNx/src/spirv.jl
53:function finish_module!(job::CompilerJob{SPIRVCompilerTarget}, mod::LLVM.Module)

/home/tim/.julia/packages/GPUCompiler/uTpNx/src/interface.jl
144:finish_module!(::CompilerJob, mod::LLVM.Module) = return

/home/tim/.julia/packages/GPUCompiler/uTpNx/src/driver.jl
234:    finish_module!(job, ir)