I upgraded packages and upgraded Julia to 1.5.2.
The old error still sometimes occur, and there is a new error pops up.
ERROR: LoadError: CUDNNError: CUDNN_STATUS_NOT_SUPPORTED (code 9)
Stacktrace:
[1] throw_api_error(::CUDA.CUDNN.cudnnStatus_t) at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\error.jl:19
[2] macro expansion at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\error.jl:30 [inlined]
[3] cudnnGetRNNWorkspaceSize(::Ptr{Nothing}, ::CUDA.CUDNN.RNNDesc{Float32}, ::Int64, ::Array{CUDA.CUDNN.TensorDesc,1}, ::Base.RefValue{UInt64}) at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\utils\call.jl:93
[4] macro expansion at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\utils\call.jl:121 [inlined]
[5] cudnnRNNBackwardData(::CUDA.CUDNN.RNNDesc{Float32}, ::Int64, ::Array{CUDA.CUDNN.TensorDesc,1}, ::CUDA.CuArray{Float32,2}, ::Array{CUDA.CUDNN.TensorDesc,1}, ::CUDA.CuArray{Float64,2}, ::Ptr{Nothing}, ::CUDA.CuPtr{Nothing}, ::Ptr{Nothing}, ::CUDA.CuPtr{Nothing}, ::CUDA.CUDNN.FilterDesc, ::CUDA.CuArray{Float32,1}, ::CUDA.CUDNN.TensorDesc, ::CUDA.CuArray{Float32,2}, ::Ptr{Nothing}, ::CUDA.CuPtr{Nothing}, ::Array{CUDA.CUDNN.TensorDesc,1}, ::CUDA.CuArray{Float64,2}, ::CUDA.CUDNN.TensorDesc, ::CUDA.CuArray{Float32,2}, ::Ptr{Nothing}, ::CUDA.CuPtr{Nothing}, ::CUDA.CuArray{UInt8,1}) at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\rnn.jl:139
[6] backwardData at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\rnn.jl:157 [inlined]
[7] backwardData at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\rnn.jl:163 [inlined]
[8] (::CUDA.CUDNN.var"#490#491"{CUDA.CUDNN.RNNDesc{Float32},CUDA.CuArray{Float32,2},CUDA.CuArray{Float32,1},CUDA.CuArray{UInt8,1},CUDA.CuArray{Float32,2}})(::CUDA.CuArray{Float64,2}, ::Nothing) at C:\Users\jack\.julia\packages\CUDA\dZvbp\lib\cudnn\rnn.jl:189
[9] #9 at C:\Users\jack\.julia\packages\Flux\05b38\src\cuda\curnn.jl:73 [inlined]
[10] #407#back at C:\Users\jack\.julia\packages\ZygoteRules\6nssF\src\adjoint.jl:49 [inlined]
[11] #150 at C:\Users\jack\.julia\packages\Zygote\c0awc\src\lib\lib.jl:191 [inlined]
[12] (::Zygote.var"#1693#back#152"{Zygote.var"#150#151"{Flux.CUDAint.var"#407#back#11"{Flux.CUDAint.var"#9#10"{Zygote.Context,Flux.GRUCell{CUDA.CuArray{Float32,2},CUDA.CuArray{Float32,1}},CUDA.CuArray{Float32,1},CUDA.CUDNN.var"#490#491"{CUDA.CUDNN.RNNDesc{Float32},CUDA.CuArray{Float32,2},CUDA.CuArray{Float32,1},CUDA.CuArray{UInt8,1},CUDA.CuArray{Float32,2}}}},Tuple{Tuple{Nothing},Tuple{Nothing}}}})(::Tuple{Nothing,CUDA.CuArray{Float64,2}}) at C:\Users\jack\.julia\packages\ZygoteRules\6nssF\src\adjoint.jl:49
[13] Recur at C:\Users\jack\.julia\packages\Flux\05b38\src\layers\recurrent.jl:36 [inlined]
[14] (::typeof(∂(λ)))(::CUDA.CuArray{Float64,2}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[15] applychain at C:\Users\jack\.julia\packages\Flux\05b38\src\layers\basic.jl:36 [inlined]
[16] (::typeof(∂(applychain)))(::CUDA.CuArray{Float64,2}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[17] Chain at C:\Users\jack\.julia\packages\Flux\05b38\src\layers\basic.jl:38
[inlined]
[18] (::typeof(∂(λ)))(::CUDA.CuArray{Float64,2}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[19] #1071 at C:\Users\jack\.julia\packages\Zygote\c0awc\src\lib\broadcast.jl:140 [inlined]
[20] (::Base.var"#3#4"{Zygote.var"#1071#1078"})(::Tuple{typeof(∂(λ)),CUDA.CuArray{Float64,2}}) at .\generator.jl:36
[21] iterate at .\generator.jl:47 [inlined]
[22] collect(::Base.Generator{Base.Iterators.Zip{Tuple{Array{typeof(∂(λ)),1},Array{Union{Nothing, CUDA.CuArray{Float64,2}},1}}},Base.var"#3#4"{Zygote.var"#1071#1078"}}) at .\array.jl:686
[23] map at .\abstractarray.jl:2248 [inlined]
[24] (::Zygote.var"#1070#1077"{Tuple{Array{CUDA.CuArray{Float32,2},1}},Val{2},Array{typeof(∂(λ)),1}})(::Array{Union{Nothing, CUDA.CuArray{Float64,2}},1}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\lib\broadcast.jl:140
[25] #3862#back at C:\Users\jack\.julia\packages\ZygoteRules\6nssF\src\adjoint.jl:49 [inlined]
[26] (::Zygote.var"#150#151"{Zygote.var"#3862#back#1081"{Zygote.var"#1070#1077"{Tuple{Array{CUDA.CuArray{Float32,2},1}},Val{2},Array{typeof(∂(λ)),1}}},Tuple{Tuple{Nothing,Nothing,Nothing},Tuple{}}})(::Array{Union{Nothing, CUDA.CuArray{Float64,2}},1}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\lib\lib.jl:191
[27] #1693#back at C:\Users\jack\.julia\packages\ZygoteRules\6nssF\src\adjoint.jl:49 [inlined]
[28] broadcasted at .\broadcast.jl:1257 [inlined]
[29] eval_model at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:20 [inlined]
[30] (::typeof(∂(eval_model)))(::Array{Union{Nothing, CUDA.CuArray{Float64,2}},1}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[31] model_output at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:26 [inlined]
[32] (::typeof(∂(model_output)))(::CUDA.CuArray{Float32,2}) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[33] loss at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:37 [inlined]
[34] (::typeof(∂(loss)))(::Float32) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[35] #14 at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:49 [inlined]
[36] (::typeof(∂(λ)))(::Float32) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface2.jl:0
[37] (::Zygote.var"#54#55"{Params,Zygote.Context,typeof(∂(λ))})(::Float32) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface.jl:177
[38] gradient(::Function, ::Params) at C:\Users\jack\.julia\packages\Zygote\c0awc\src\compiler\interface.jl:54
[39] train(::Chain{Tuple{Flux.Recur{Flux.GRUCell{CUDA.CuArray{Float32,2},CUDA.CuArray{Float32,1}}},Dense{typeof(relu),CUDA.CuArray{Float32,2},CUDA.CuArray{Float32,1}}}}, ::Int64, ::Int64) at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:49
[40] top-level scope at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:69
[41] include_string(::Function, ::Module, ::String, ::String) at .\loading.jl:1091
[42] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at .\essentials.jl:710
[43] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at .\essentials.jl:709 [44] inlineeval(::Module, ::String, ::Int64, ::Int64, ::String; softscope::Bool) at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\eval.jl:83
[45] (::VSCodeServer.var"#43#45"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool})() at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\eval.jl:45
[46] withpath(::VSCodeServer.var"#43#45"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool}, ::String) at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\repl.jl:118
[47] (::VSCodeServer.var"#42#44"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool,Bool})() at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\eval.jl:43
[48] hideprompt(::VSCodeServer.var"#42#44"{VSCodeServer.ReplRunCodeRequestParams,String,Int64,Int64,String,Module,Bool,Bool}) at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\repl.jl:36
[49] repl_runcode_request(::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint,Base.PipeEndpoint}, ::VSCodeServer.ReplRunCodeRequestParams) at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\eval.jl:23
[50] dispatch_msg(::VSCodeServer.JSONRPC.JSONRPCEndpoint{Base.PipeEndpoint,Base.PipeEndpoint}, ::VSCodeServer.JSONRPC.MsgDispatcher, ::Dict{String,Any}) at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\JSONRPC\src\typed.jl:66
[51] macro expansion at c:\Users\jack\.vscode\extensions\julialang.language-julia-1.0.8\scripts\packages\VSCodeServer\src\VSCodeServer.jl:95 [inlined]
in expression starting at c:\Users\jack\TerminateGoogleDrive\TretarData\forex\julia_temp\rnn_discourse.jl:69
The new error seems related to Cuda does not handle nothing
well.