Skip to content

Instantly share code, notes, and snippets.

@appleparan
Created November 19, 2019 15:12
Show Gist options
  • Save appleparan/676d03e9de15092b0e7d3d6501c52517 to your computer and use it in GitHub Desktop.
Save appleparan/676d03e9de15092b0e7d3d6501c52517 to your computer and use it in GitHub Desktop.
#= /home/appleparan/src/DebugFlux/test_curnn.jl:12 =# Zygote.@code_adjoint(gradient((m->begin
#= /home/appleparan/src/DebugFlux/test_curnn.jl:12 =#
sum(m(x))
end), m)) = Zygote.Adjoint(1: (%4, %5 :: Zygote.Context, %1, %2, %3)
%6 = (ZygoteRules._pullback)(%5, tuple, %2)
%7 = (getindex)(%6, 1)
%8 = (getindex)(%6, 2) %9 = (ZygoteRules._pullback)(%5, Core._apply, ZygoteRules.pullback, %7, %3)
%10 = (getindex)(%9, 1) %11 = (getindex)(%9, 2)
%12 = (ZygoteRules._pullback)(%5, Base.indexed_iterate, %10, 1)
%13 = (getindex)(%12, 1)
%14 = (getindex)(%12, 2)
%15 = (ZygoteRules._pullback)(%5, getfield, %13, 1)
%16 = (getindex)(%15, 1)
%17 = (getindex)(%15, 2)
%18 = (ZygoteRules._pullback)(%5, getfield, %13, 2)
%19 = (getindex)(%18, 1)
%20 = (getindex)(%18, 2)
%21 = (ZygoteRules._pullback)(%5, Base.indexed_iterate, %10, 2, %19)
%22 = (getindex)(%21, 1)
%23 = (getindex)(%21, 2)
%24 = (ZygoteRules._pullback)(%5, getfield, %22, 1)
%25 = (getindex)(%24, 1)
%26 = (getindex)(%24, 2)
%27 = (ZygoteRules._pullback)(%5, Zygote.sensitivity, %16)
%28 = (getindex)(%27, 1)
%29 = (getindex)(%27, 2)
%30 = (ZygoteRules._pullback)(%5, %25, %28)
%31 = (getindex)(%30, 1)
%32 = (getindex)(%30, 2)
return %31, 1: (%1)
%2 = (@32)(%1)
%3 = (Zygote.gradindex)(%2, 1)
%4 = (Zygote.gradindex)(%2, 2)
%5 = (@29)(%4)
%6 = (Zygote.gradindex)(%5, 2)
%7 = (@26)(%3)
%8 = (Zygote.gradindex)(%7, 2)
%9 = (@23)(%8)
%10 = (Zygote.gradindex)(%9, 2)
%11 = (Zygote.gradindex)(%9, 4)
%12 = (@20)(%11)
%13 = (Zygote.gradindex)(%12, 2)
%14 = (@17)(%6)
%15 = (Zygote.gradindex)(%14, 2)
%16 = (Zygote.accum)(%13, %15)
%17 = (@14)(%16)
%18 = (Zygote.gradindex)(%17, 2)
%19 = (Zygote.accum)(%10, %18)
%20 = (@11)(%19)
%21 = (Zygote.gradindex)(%20, 3)
%22 = (Zygote.gradindex)(%20, 4)
%23 = (@8)(%21)
%24 = (Zygote.gradindex)(%23, 2)
%25 = (Zygote.tuple_va)(Val{1}(), nothing, %24, %22)
return %25)
ERROR: CUDNNError(code CUDNN_STATUS_BAD_PARAM, CUDNN_STATUS_BAD_PARAM)
Stacktrace:
[1] adjoint(::Zygote.Context, ::typeof(Core._apply), ::Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}, ::Tuple{Tuple{Tuple{CuArray{Float32,1,Nothing},CuArray{Float32,1,Nothing}}},Tuple{CuArray{Float32,1,Nothing}}}) at /home/applepar
an/.julia/packages/Zygote/8dVxG/src/lib/lib.jl:139
[2] _pullback(::Zygote.Context, ::typeof(Core._apply), ::Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}, ::Tuple{Tuple{Tuple{CuArray{Float32,1,Nothing},CuArray{Float32,1,Nothing}}},Tuple{CuArray{Float32,1,Nothing}}}) at /home/applep
aran/.julia/packages/ZygoteRules/6nssF/src/adjoint.jl:47
[3] _pullback(::Zygote.Context, ::Flux.Recur{Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}}, ::Tuple{CuArray{Float32,1,Nothing}}) at /home/appleparan/.julia/packages/Flux/MiPX3/src/layers/recurrent.jl:36
[4] _pullback(::Zygote.Context, ::getfield(Main, Symbol("##6#13")){CuArray{Float32,1,Nothing}}, ::Tuple{Flux.Recur{Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}}}) at /home/appleparan/src/DebugFlux/test_curnn.jl:13
[5] _pullback(::getfield(Main, Symbol("##6#13")){CuArray{Float32,1,Nothing}}, ::Tuple{Flux.Recur{Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}}}) at /home/appleparan/.julia/packages/Zygote/8dVxG/src/compiler/interface.jl:31
[6] pullback(::getfield(Main, Symbol("##6#13")){CuArray{Float32,1,Nothing}}, ::Tuple{Flux.Recur{Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}}}) at /home/appleparan/.julia/packages/Zygote/8dVxG/src/compiler/interface.jl:37
[7] gradient(::getfield(Main, Symbol("##6#13")){CuArray{Float32,1,Nothing}}, ::Tuple{Flux.Recur{Flux.LSTMCell{CuArray{Float32,2,Nothing},CuArray{Float32,1,Nothing}}}}) at /home/appleparan/.julia/packages/Zygote/8dVxG/src/compiler/interface.jl:46
[8] run_test() at /home/appleparan/src/DebugFlux/test_curnn.jl:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment