Skip to content

Instantly share code, notes, and snippets.

@axsk
Created September 21, 2022 18:57
Show Gist options
  • Save axsk/94aa5f225f0378fbdb56d6e215af8d6c to your computer and use it in GitHub Desktop.
Save axsk/94aa5f225f0378fbdb56d6e215af8d6c to your computer and use it in GitHub Desktop.
strange zygote call from forwarddiff-ing a flux network
julia> JET.@report_opt u([1.],1.)
═════ 77 possible errors found ═════
┌ @ /home/htc/bzfsikor/code/OptImpSampling.jl/src/control.jl:137 dlogz = fgrad(#148, x)
│┌ @ /home/htc/bzfsikor/code/OptImpSampling.jl/src/ociso.jl:25 ForwardDiff.gradient(f, x)
││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:17 ForwardDiff.GradientConfig(f, x)
│││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/config.jl:121 ForwardDiff.Chunk(x)
││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/prelude.jl:26 #self#(x, ForwardDiff.DEFAULT_CHUNK_THRESHOLD)
│││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/prelude.jl:26 ForwardDiff.Chunk(ForwardDiff.length(x), threshold)
││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/prelude.jl:22 %13()
│││││││ runtime dispatch detected: %13::Type{ForwardDiff.Chunk{_A}} where _A()::ForwardDiff.Chunk
││││││└──────────────────────────────────────────────────────────────────────────
│││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/config.jl:121 #self#(f, x, ForwardDiff.Chunk(x))
││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/config.jl:121 #self#(f, x, _4, ForwardDiff.Tag(f, V))
│││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/config.jl:122 duals = ForwardDiff.similar(x, Core.apply_type(ForwardDiff.Dual, T, V, N))
││││││┌ @ array.jl:375 %1(Base.undef, %2)
│││││││ runtime dispatch detected: %1::Type{Vector{_A}} where _A(Base.undef, %2::Int64)::Vector
││││││└────────────────
│││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/config.jl:121 #self#(f, x, %3)
││││ runtime dispatch detected: #self#::Type{ForwardDiff.GradientConfig}(f::OptImpSampling.var"#148#150"{Float64, Flux.Chain{Tuple{Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}}}, Shiftscale, Int64}, x::Vector{Float64}, %3::ForwardDiff.Chunk)::ForwardDiff.GradientConfig{ForwardDiff.Tag{OptImpSampling.var"#148#150"{Float64, Flux.Chain{Tuple{Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}}}, Shiftscale, Int64}, Float64}, Float64}
│││└──────────────────────────────────────────────────────────────────────────
││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:17 #self#(f, x, ForwardDiff.GradientConfig(f, x))
│││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:17 #self#(f, x, cfg, Val{true}())
││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:19 ForwardDiff.vector_mode_gradient(f, x, cfg)
│││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:106 ydual = ForwardDiff.vector_mode_dual_eval!(f, cfg, x)
││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:36 ForwardDiff.seed!(xdual, x, cfg.seeds)
│││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:64 dual_inds = 1 ForwardDiff.:(:) N
││││││││┌ @ range.jl:3 promote(a, b)
│││││││││┌ @ promotion.jl:359 Base._promote(x, y)
││││││││││┌ @ promotion.jl:335 R = promote_type(T, S)
│││││││││││┌ @ promotion.jl:298 Base.promote_result(T, S, promote_rule(T, S), promote_rule(S, T))
││││││││││││┌ @ promotion.jl:315 typejoin(T, S)
│││││││││││││┌ @ promotion.jl:27 typejoin(a, b.body)
││││││││││││││┌ @ promotion.jl:31 typejoin(b.a, b.b)
│││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%125)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%125::Any)::Any
│││││││││││││││└───────────────────
│││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%195)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%195::Any)::Any
│││││││││││││││└───────────────────
│││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%266)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%266::Any)::Any
│││││││││││││││└───────────────────
│││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%285)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%285::Any)::Any
│││││││││││││││└───────────────────
│││││││││││││││┌ @ promotion.jl:112 %453.var
││││││││││││││││ runtime dispatch detected: (%453::Any).var::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ @ promotion.jl:113 %453.body
││││││││││││││││ runtime dispatch detected: (%453::Any).body::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%567, %569)
││││││││││││││││ runtime dispatch detected: Base.UnionAll(%567::Any, %569::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ @ promotion.jl:229 Base.unwrapva(%19)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%19::Any)::Any
│││││││││││││││└────────────────────
│││││││││││││││┌ @ promotion.jl:233 Base.unwrapva(%73)
││││││││││││││││ runtime dispatch detected: Base.unwrapva(%73::Any)::Any
│││││││││││││││└────────────────────
││││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%102)
│││││││││││││││ runtime dispatch detected: Base.unwrapva(%102::Any)::Any
││││││││││││││└───────────────────
││││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%172)
│││││││││││││││ runtime dispatch detected: Base.unwrapva(%172::Any)::Any
││││││││││││││└───────────────────
││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%243)
│││││││││││││││ runtime dispatch detected: Base.unwrapva(%243::Any)::Any
││││││││││││││└───────────────────
││││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%262)
│││││││││││││││ runtime dispatch detected: Base.unwrapva(%262::Any)::Any
││││││││││││││└───────────────────
││││││││││││││┌ @ promotion.jl:112 %430.var
│││││││││││││││ runtime dispatch detected: (%430::Any).var::Any
││││││││││││││└────────────────────
││││││││││││││┌ @ promotion.jl:113 %430.body
│││││││││││││││ runtime dispatch detected: (%430::Any).body::Any
││││││││││││││└────────────────────
││││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%544, %546)
│││││││││││││││ runtime dispatch detected: Base.UnionAll(%544::Any, %546::Any)::Any
││││││││││││││└────────────────────
│││││││││││││┌ @ promotion.jl:27 Base.UnionAll(%12, %14)
││││││││││││││ runtime dispatch detected: Base.UnionAll(%12::Any, %14::Any)::Any
│││││││││││││└───────────────────
│││││││││││││┌ @ promotion.jl:54 Base.unwrapva(%93)
││││││││││││││ runtime dispatch detected: Base.unwrapva(%93::Any)::Any
│││││││││││││└───────────────────
│││││││││││││┌ @ promotion.jl:64 Base.unwrapva(%163)
││││││││││││││ runtime dispatch detected: Base.unwrapva(%163::Any)::Any
│││││││││││││└───────────────────
│││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%234)
││││││││││││││ runtime dispatch detected: Base.unwrapva(%234::Any)::Any
│││││││││││││└───────────────────
│││││││││││││┌ @ promotion.jl:77 Base.unwrapva(%253)
││││││││││││││ runtime dispatch detected: Base.unwrapva(%253::Any)::Any
│││││││││││││└───────────────────
│││││││││││││┌ @ promotion.jl:112 %421.var
││││││││││││││ runtime dispatch detected: (%421::Any).var::Any
│││││││││││││└────────────────────
│││││││││││││┌ @ promotion.jl:113 %421.body
││││││││││││││ runtime dispatch detected: (%421::Any).body::Any
│││││││││││││└────────────────────
│││││││││││││┌ @ promotion.jl:117 Base.UnionAll(%535, %537)
││││││││││││││ runtime dispatch detected: Base.UnionAll(%535::Any, %537::Any)::Any
│││││││││││││└────────────────────
│││││││││┌ @ promotion.jl:360 Base.not_sametype(tuple(x, y), tuple(px, py))
││││││││││┌ @ promotion.jl:377 Base.sametype_error(x)
│││││││││││┌ @ promotion.jl:383 map(#43, input)
││││││││││││┌ @ tuple.jl:222 f(t[1])
│││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││┌ @ strings/io.jl:144 print(s, x)
││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││┌ @ show.jl:881 Base._show_type(io, Base.inferencebarrier(x))
││││││││││││││││││┌ @ show.jl:884 Base.show_type_name(io, typeassert(Base.unwrap_unionall(x), Base.DataType).name)
│││││││││││││││││││┌ @ show.jl:971 show(io, tn.module)
││││││││││││││││││││┌ @ show.jl:1103 Base.is_root_module(m)
│││││││││││││││││││││┌ @ lock.jl:221 lock(temp)
││││││││││││││││││││││┌ @ lock.jl:103 slowlock(rl)
│││││││││││││││││││││││┌ @ lock.jl:112 wait(c)
││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(ct.queue, ct)
│││││││││││││││││││││││││┌ @ linked_list.jl:145 isequal(h.value, val)
││││││││││││││││││││││││││┌ @ gcutils.jl:4 isequal(%1, v)
│││││││││││││││││││││││││││ runtime dispatch detected: isequal(%1::Any, v::Task)::Bool
││││││││││││││││││││││││││└────────────────
││││││││││││││││││││││││┌ @ condition.jl:126 Base.list_deletefirst!(%45, %39)
│││││││││││││││││││││││││ runtime dispatch detected: Base.list_deletefirst!(%45::Any, %39::Task)::Any
││││││││││││││││││││││││└────────────────────
│││││││││││││││││││││┌ @ lock.jl:225 unlock(temp)
││││││││││││││││││││││┌ @ lock.jl:133 _unlock(rl)
│││││││││││││││││││││││┌ @ lock.jl:139 notifywaiters(rl)
││││││││││││││││││││││││┌ @ lock.jl:143 = notify(cond_wait)
│││││││││││││││││││││││││┌ @ condition.jl:142 #self#(c, Base.nothing)
││││││││││││││││││││││││││┌ @ condition.jl:142 Base.:(var"#notify#586")(true, false, #self#, c, arg)
│││││││││││││││││││││││││││┌ @ condition.jl:142 notify(c, arg, all, error)
││││││││││││││││││││││││││││┌ @ condition.jl:148 Core.kwfunc(schedule)(NamedTuple{(:error,)}(tuple(error)), schedule, t, arg)
│││││││││││││││││││││││││││││┌ @ task.jl:789 Base.:(var"#schedule#613")(error, _3, t, arg)
││││││││││││││││││││││││││││││┌ @ task.jl:793 %10(%11, t)
│││││││││││││││││││││││││││││││ runtime dispatch detected: %10::typeof(Base.list_deletefirst!)(%11::Any, t::Task)::Any
││││││││││││││││││││││││││││││└───────────────
││││││││││││││││││┌ @ show.jl:886 Base.show_typealias(io, x)
│││││││││││││││││││┌ @ show.jl:721 alias = Base.make_typealias(properx)
││││││││││││││││││││┌ @ show.jl:531 mods = Base.modulesof!(Set{Module}(), x)
│││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, %20)
││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %20::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:507 Base.modulesof!(s, %30)
││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %30::Any)::Any
│││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:535 Base.uniontypes(Base.unwrap_unionall(x))
│││││││││││││││││││││┌ @ reflection.jl:931 Base._uniontypes(x, Base.Any[])
││││││││││││││││││││││┌ @ reflection.jl:929 Base._uniontypes(%1, ts)
│││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%1::Any, ts::Vector{Any})::Any
││││││││││││││││││││││└─────────────────────
││││││││││││││││││││││┌ @ reflection.jl:929 Base._uniontypes(%3, ts)
│││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(%3::Any, ts::Vector{Any})::Any
││││││││││││││││││││││└─────────────────────
│││││││││││││││││││││┌ @ reflection.jl:931 Base._uniontypes(x, %1)
││││││││││││││││││││││ runtime dispatch detected: Base._uniontypes(x::Any, %1::Vector{Any})::Vector{Any}
│││││││││││││││││││││└─────────────────────
││││││││││││││││││││┌ @ show.jl:566 applied = Base.rewrap_unionall(applied, p)
│││││││││││││││││││││┌ @ essentials.jl:273 Base.rewrap_unionall(%5, u)
││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%5::Any, u::UnionAll)::Any
│││││││││││││││││││││└─────────────────────
│││││││││││││││││││││┌ @ essentials.jl:273 Base.rewrap_unionall(%8, %9)
││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%8::Any, %9::UnionAll)::Any
│││││││││││││││││││││└─────────────────────
│││││││││││││││││││││┌ @ essentials.jl:265 Base.rewrap_unionall(t, %3)
││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(t::Any, %3::Any)::Any
│││││││││││││││││││││└─────────────────────
│││││││││││││││││││││┌ @ essentials.jl:265 Base.rewrap_unionall(t, %8)
││││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(t::Any, %8::Any)::Any
│││││││││││││││││││││└─────────────────────
││││││││││││││││││││┌ @ show.jl:566 Base.rewrap_unionall(%373, %371)
│││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%373::Any, %371::UnionAll)::Any
││││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:724 Base.show_typealias(io, alias[1], x, alias[2], wheres)
││││││││││││││││││││┌ @ show.jl:671 Base.show_typeparams(io, env, Core.svec(vars...), wheres)
│││││││││││││││││││││┌ @ show.jl:635 show(io, p)
││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││┌ @ show.jl:2450 show(io, b)
││││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, b::Any)::Any
│││││││││││││││││││││││└────────────────
│││││││││││││││││││││┌ @ show.jl:630 show(io, %262)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %262::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:633 show(io, %319)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %319::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:638 show(io, %204)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %204::Any)::Any
│││││││││││││││││││││└───────────────
││││││││││││││││││┌ @ show.jl:889 Base.show_datatype(io, x)
│││││││││││││││││││┌ @ show.jl:989 #self#(io, x, Base.TypeVar[])
││││││││││││││││││││┌ @ show.jl:1011 Base.show_typeparams(io, parameters, typeassert(Base.unwrap_unionall(x.name.wrapper), Base.DataType).parameters, wheres)
│││││││││││││││││││││┌ @ show.jl:635 show(io, p)
││││││││││││││││││││││┌ @ show.jl:2458 show_bound(io, lb)
│││││││││││││││││││││││┌ @ show.jl:2450 show(io, b)
││││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, b::Any)::Any
│││││││││││││││││││││││└────────────────
│││││││││││││││││││││┌ @ show.jl:630 show(io, %260)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %260::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:633 show(io, %316)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %316::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:638 show(io, %203)
││││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %203::Any)::Any
│││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:997 show(io, %22)
│││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %22::Any)::Any
││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:1005 show(io, %64)
│││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %64::Any)::Any
││││││││││││││││││││└────────────────
││││││││││││││││││┌ @ show.jl:892 Base.show_unionaliases(io, x)
│││││││││││││││││││┌ @ show.jl:812 Base.make_typealiases(properx)
││││││││││││││││││││┌ @ show.jl:733 mods = Base.modulesof!(Set{Module}(), x)
│││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, x.a)
││││││││││││││││││││││┌ @ show.jl:500 Base.modulesof!(s, %1)
│││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %1::Any)::Set{Module}
││││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:506 Base.modulesof!(s, %3)
││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %3::Any)::Any
│││││││││││││││││││││└───────────────
│││││││││││││││││││││┌ @ show.jl:507 Base.modulesof!(s, %12)
││││││││││││││││││││││ runtime dispatch detected: Base.modulesof!(s::Set{Module}, %12::Any)::Any
│││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:768 ul = Base.unionlen(applied)
│││││││││││││││││││││┌ @ reflection.jl:926 Base.unionlen(%1)
││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%1::Any)::Int64
│││││││││││││││││││││└─────────────────────
│││││││││││││││││││││┌ @ reflection.jl:926 Base.unionlen(%3)
││││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%3::Any)::Int64
│││││││││││││││││││││└─────────────────────
││││││││││││││││││││┌ @ show.jl:740 Base.rewrap_unionall(%42, x)
│││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%42::Any, x::Union)::Any
││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:768 Base.unionlen(%390)
│││││││││││││││││││││ runtime dispatch detected: Base.unionlen(%390::Any)::Int64
││││││││││││││││││││└───────────────
││││││││││││││││││││┌ @ show.jl:770 Base.rewrap_unionall(%414, %412)
│││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%414::Any, %412::UnionAll)::Any
││││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:812 Base.make_typealiases(%10)
││││││││││││││││││││ runtime dispatch detected: Base.make_typealiases(%10::Union{Type{Any}, Union})::Tuple{Vector{Core.SimpleVector}, Type}
│││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:820 Base.rewrap_unionall(%47, %10)
││││││││││││││││││││ runtime dispatch detected: Base.rewrap_unionall(%47::Any, %10::Union{Type{Any}, Union})::Any
│││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:825 show(io, %47)
││││││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, %47::Any)::Any
│││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:831 Base.show_typealias(io, %137, x, %127, %128)
││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %137::Any, x::Union, %127::Core.SimpleVector, %128::Vector{TypeVar})::Any
│││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:839 Base.show_typealias(io, %205, x, %195, %196)
││││││││││││││││││││ runtime dispatch detected: Base.show_typealias(io::IOBuffer, %205::Any, x::Union, %195::Core.SimpleVector, %196::Vector{TypeVar})::Any
│││││││││││││││││││└───────────────
││││││││││││││││││┌ @ show.jl:896 Base.show_delim_array(io, Base.uniontypes(x), {, ,, }, false)
│││││││││││││││││││┌ @ show.jl:1201 #self#(io, itr, op, delim, cl, delim_one, first(LinearIndices(itr)), last(LinearIndices(itr)))
││││││││││││││││││││┌ @ show.jl:1212 show(%5, %42)
│││││││││││││││││││││ runtime dispatch detected: show(%5::IOContext{IOBuffer}, %42::Any)::Any
││││││││││││││││││││└────────────────
││││││││││││││││││┌ @ show.jl:923 Base.show_datatype(io, x, wheres)
│││││││││││││││││││┌ @ show.jl:1010 Base.show_type_name(io, x.name)
││││││││││││││││││││┌ @ show.jl:970 Base.isvisible(%36, %84, %78)
│││││││││││││││││││││ runtime dispatch detected: Base.isvisible(%36::Symbol, %84::Module, %78::Any)::Bool
││││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:997 show(io, %22)
││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %22::Any)::Any
│││││││││││││││││││└───────────────
│││││││││││││││││││┌ @ show.jl:1005 show(io, %66)
││││││││││││││││││││ runtime dispatch detected: show(io::IOContext{IOBuffer}, %66::Any)::Any
│││││││││││││││││││└────────────────
││││││││││││││││││┌ @ show.jl:925 show(%254, %80)
│││││││││││││││││││ runtime dispatch detected: show(%254::IOContext{IOBuffer}, %80::Any)::Any
││││││││││││││││││└───────────────
│││││││││││││││││┌ @ show.jl:881 Base._show_type(io, )
││││││││││││││││││ runtime dispatch detected: Base._show_type(io::IOBuffer, ::Int64)::Nothing
│││││││││││││││││└───────────────
││││││││││││┌ @ tuple.jl:222 f(t[2])
│││││││││││││┌ @ promotion.jl:384 string(Base.typeof(x))
││││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││││┌ @ strings/io.jl:144 print(s, x)
││││││││││││││││┌ @ strings/io.jl:35 show(io, x)
│││││││││││││││││ runtime dispatch detected: show(io::IOBuffer, x::Type)::Any
││││││││││││││││└────────────────────
│││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:65 ForwardDiff.view(x, dual_inds)
││││││││┌ @ /home/htc/bzfsikor/.julia/packages/BandedMatrices/hjSYJ/src/generic/Band.jl:207 BandedMatrices.to_indices(A, tuple(I))
│││││││││┌ @ /home/htc/bzfsikor/.julia/packages/BandedMatrices/hjSYJ/src/generic/Band.jl:206 BandedMatrices.band_to_indices(A, BandedMatrices.axes(A), I[1])
││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/BandedMatrices/hjSYJ/src/generic/Band.jl:205 BandedMatrices.diagind(A, %1)
│││││││││││ runtime dispatch detected: BandedMatrices.diagind(A::Vector{Float64}, %1::Int64)::Union{}
││││││││││└───────────────────────────────────────────────────────────────────────────────────
│││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:65 Base.broadcasted(Core.apply_type(ForwardDiff.Dual, T, V, N), ForwardDiff.view(x, dual_inds), seeds)
││││││││┌ @ broadcast.jl:1304 Base.Broadcast.combine_styles(tuple(arg1′, arg2′), args′...)
│││││││││┌ @ broadcast.jl:436 Base.Broadcast.result_style(Base.Broadcast.combine_styles(c1), Base.Broadcast.combine_styles(c2))
││││││││││┌ @ broadcast.jl:460 Base.Broadcast.result_join(s1, s2, BroadcastStyle(s1, s2), BroadcastStyle(s2, s1))
│││││││││││┌ @ broadcast.jl:476 string("conflicting broadcast rules defined\n Broadcast.BroadcastStyle(::", S, ", ::", T, ") = ", U, "()\n Broadcast.BroadcastStyle(::", T, ", ::", S, ") = ", V, "()\nOne of these should be undefined (and thus return Broadcast.Unknown).")
││││││││││││┌ @ strings/io.jl:185 Base.print_to_string(xs...)
│││││││││││││┌ @ strings/io.jl:144 print(%83, %86)
││││││││││││││ runtime dispatch detected: print(%83::IOBuffer, %86::Any)::Any
│││││││││││││└─────────────────────
││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:37 f(xdual)
│││││││┌ @ /home/htc/bzfsikor/code/OptImpSampling.jl/src/control.jl:139 getfield(#self#, :chi)(x)
││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Flux/4k0Ls/src/layers/basic.jl:51 Flux._applychain(c.layers, x)
│││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Flux/4k0Ls/src/layers/basic.jl:53 337 = layers[1](x)
││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Flux/4k0Ls/src/layers/basic.jl:172 Base.broadcasted(Flux.:+, a.weight Flux.:* x, a.bias)
│││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:340 Zygote.map(#93, gs)
││││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:354 Zygote.map!(tuple(f, gsout, gs1), gss...)
│││││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:361 Base.Generator(%45, gss)
││││││││││││││ runtime dispatch detected: Base.Generator(%45::Zygote.var"#96#98", gss::Tuple{Zygote.Grads})::Base.Generator{Tuple{Zygote.Grads}}
│││││││││││││└─────────────────────────────────────────────────────────────────────────────────
│││││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:361 f(%50)
││││││││││││││ runtime dispatch detected: f::Zygote.var"#93#94"{typeof(+), Vector{Float32}}(%50::Any)::Any
│││││││││││││└─────────────────────────────────────────────────────────────────────────────────
││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:21 ForwardDiff.chunk_mode_gradient(f, x, cfg)
│││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:149 ForwardDiff.seed!(xdual, x, 1, seeds)
││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:79 #self#(duals, x, index, seeds, N)
│││││││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/apiutils.jl:81 Base.broadcasted(ForwardDiff.:+, seed_inds, offset)
││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:340 Zygote.map(#93, gs)
│││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:354 Zygote.map!(tuple(f, gsout, gs1), gss...)
││││││││││┌ @ /home/htc/bzfsikor/.julia/packages/Zygote/dABKa/src/compiler/interface.jl:361 f(%50)
│││││││││││ runtime dispatch detected: f::Zygote.var"#93#94"{typeof(+), Int64}(%50::Any)::Any
││││││││││└─────────────────────────────────────────────────────────────────────────────────
││┌ @ /home/htc/bzfsikor/.julia/packages/ForwardDiff/pDtsf/src/gradient.jl:17 #self#(f, x, %1)
│││ runtime dispatch detected: #self#::typeof(ForwardDiff.gradient)(f::OptImpSampling.var"#148#150"{Float64, Flux.Chain{Tuple{Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}}}, Shiftscale, Int64}, x::Vector{Float64}, %1::ForwardDiff.GradientConfig{ForwardDiff.Tag{OptImpSampling.var"#148#150"{Float64, Flux.Chain{Tuple{Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}, Flux.Dense{typeof(NNlib.σ), Matrix{Float32}, Vector{Float32}}}}, Shiftscale, Int64}, Float64}, Float64})::Any
││└───────────────────────────────────────────────────────────────────────────
┌ @ /home/htc/bzfsikor/code/OptImpSampling.jl/src/control.jl:142 %7 OptImpSampling.:* %6
│ runtime dispatch detected: (%7::Int64 OptImpSampling.:* %6::Any)::Any
└────────────────────────────────────────────────────────────────
@axsk
Copy link
Author

axsk commented Sep 21, 2022

axsk/OptImpSampling.jl@92c2bf2

using OptImpSampling: densenet, Shiftscale, optcontrol
model=densenet()
S=Shifscale(0.,0.)
u=optcontrol(model, S, 1, 1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment