I unexpectedly got this warning while using Flux with CuArrays.
โ Warning: Error requiring CuArrays from Flux:
โ LoadError: UndefVarError: cudnn_available not defined
โ Stacktrace:
โ [1] getproperty(::Module, ::Symbol) at ./sysimg.jl:13
โ [2] top-level scope at none:0
โ [3] include at ./boot.jl:317 [inlined]
โ [4] include_relative(::Module, ::String) at ./loading.jl:1038
โ [5] include at ./sysimg.jl:29 [inlined]
โ [6] include(::String) at /home/tejank10/.julia/dev/Flux/src/Flux.jl:1
โ [7] top-level scope at none:0
โ [8] eval at ./boot.jl:319 [inlined]
โ [9] eval at /home/tejank10/.julia/dev/Flux/src/Flux.jl:1 [inlined]
โ [10] (::getfield(Flux, Symbol("##103#107")))() at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:67
โ [11] err(::getfield(Flux, Symbol("##103#107")), ::Module, ::String) at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:38
โ [12] #102 at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:66 [inlined]
โ [13] withpath(::getfield(Flux, Symbol("##102#106")), ::String) at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:28
โ [14] (::getfield(Flux, Symbol("##101#105")))() at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:65
โ [15] #invokelatest#1 at ./essentials.jl:686 [inlined]
โ [16] invokelatest at ./essentials.jl:685 [inlined]
โ [17] #3 at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:19 [inlined]
โ [18] iterate at ./generator.jl:47 [inlined]
โ [19] collect_to!(::Array{Function,1}, ::Base.Generator{Array{Function,1},getfield(Requires, Symbol("##3#4"))}, ::Int64, ::Int64) at ./array.jl:656
โ [20] collect_to!(::Array{typeof(CUDAnative.cudaconvert),1}, ::Base.Generator{Array{Function,1},getfield(Requires, Symbol("##3#4"))}, ::Int64, ::Int64) at ./array.jl:667
โ [21] collect_to_with_first!(::Array{typeof(CUDAnative.cudaconvert),1}, ::Function, ::Base.Generator{Array{Function,1},getfield(Requires, Symbol("##3#4"))}, ::Int64) at ./array.jl:643
โ [22] _collect(::Array{Function,1}, ::Base.Generator{Array{Function,1},getfield(Requires, Symbol("##3#4"))}, ::Base.EltypeUnknown, ::Base.HasShape{1}) at ./array.jl:637
โ [23] map at ./array.jl:561 [inlined]
โ [24] loadpkg(::Base.PkgId) at /home/tejank10/.julia/packages/Requires/9Jse8/src/require.jl:19
โ [25] #invokelatest#1 at ./essentials.jl:686 [inlined]
โ [26] invokelatest at ./essentials.jl:685 [inlined]
โ [27] require(::Base.PkgId) at ./loading.jl:855
โ [28] macro expansion at ./logging.jl:311 [inlined]
โ [29] require(::Module, ::Symbol) at ./loading.jl:834
โ [30] eval(::Module, ::Any) at ./boot.jl:319
โ [31] eval_user_input(::Any, ::REPL.REPLBackend) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:85
โ [32] macro expansion at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:117 [inlined]
โ [33] (::getfield(REPL, Symbol("##28#29")){REPL.REPLBackend})() at ./task.jl:259
โ in expression starting at /home/tejank10/.julia/dev/Flux/src/cuda/cuda.jl:5
โ @ Requires ~/.julia/packages/Requires/9Jse8/src/require.jl:40
cuda.jl has a call to CuArrays.cudnn_available().
I tried searching for cudnn_available() in CuArrays, but could not find it.
Removed by this commit. We can fix this by making the check explicitly instead. Mind making a PR?
Thanks for the hint, Mike! I have submitted the fix.
The removal of that function has now been rolled out in v0.8.1 of CuArrays, so using Flux; using CuArrays is broken after updating all packages. It's a weird problem because Flux can't specify a version of CuArrays in REQUIRE since it doesn't _depend_ on CuArrays. Is there any way that we can specify that hidden dependency? It would be nice to at least get a warning message when using an unsupported version of CuArrays.
Same problem here. How to fix it?
(v1.0) pkg> status
Status `C:\Users\Masood\.julia\environments\v1.0\Project.toml`
[3a865a2d] CuArrays v0.8.1
[587475ba] Flux v0.6.7
Thank you!
You can roll CuArrays back to v0.8.0 for now. Or using the master branch of Flux will probably work thanks to the PR mentioned above, but I haven't tried it.
It would be nice to have a warning, but for now I've tagged a new release, so that should fix the immediate issue once it's merged.