Traceur.jl
Traceur.jl copied to clipboard
[Traceur + Zygote] Errors when attempting to run `@trace` on second derivative
Summary
Traceur + Zygote + nested differentiation = :(
Minimum working example
I've tested this on Julia 1.2.0-rc2.0
and 1.3.0-alpha.0
.
Julia 1.2:
julia> using InteractiveUtils, Pkg
julia> InteractiveUtils.versioninfo()
Julia Version 1.2.0-rc2.0
Commit 9248bf7687 (2019-07-08 19:42 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.6.0)
CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
julia> Pkg.status()
Status `~/.julia/environments/v1.2/Project.toml`
[37b6cedf] Traceur v0.3.0
[e88e6eb3] Zygote v0.3.2
julia> using Traceur, Zygote
julia> g(x) = 7x^2 + 5x + 3
g (generic function with 1 method)
julia> g(10)
753
julia> g'(10)
145
julia> g''(10)
14
julia> @trace g(10)
753
julia> @trace g'(10)
┌ Warning: getindex returns Union{Val{2}, getfield(Zygote, Symbol("##118#back#86")){getfield(Zygote, Symbol("##84#85"))}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Int64, getfield(Zygote, Symbol("##1504#back#572")){getfield(Zygote, Symbol("##570#571")){Int64,Int64}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Int64, typeof(∂(literal_pow))}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Int64, getfield(Zygote, Symbol("##1708#back#642")){getfield(Zygote, Symbol("##638#640")){Tuple{Int64,Int64,Int64}}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Any
└ @ tuple.jl:24
145
julia> @trace g''(10)
┌ Warning: getindex returns Union{typeof(g), getfield(Zygote, Symbol("##251#back#144")){getfield(Zygote, Symbol("#back#143")){:f,Zygote.Context,getfield(Zygote, Symbol("##34#35")){typeof(g)},typeof(g)}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Tuple{typeof(g)}, getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{typeof(∂(Zygote.Context)), Zygote.Context}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}, Tuple{Zygote.Context,typeof(g)}}
└ @ tuple.jl:24
┌ Warning: dynamic dispatch to (Core.apply_type(Base.Val, x))()
└ @ essentials.jl:-1
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##190#back#111")){getfield(Zygote, Symbol("##107#109")){1,1}}, Int64}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}, Tuple{Zygote.Context,DataType}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Val{2}, getfield(Zygote, Symbol("##238#back#137")){getfield(Zygote, Symbol("##135#136")){getfield(Zygote, Symbol("##118#back#86")){getfield(Zygote, Symbol("##84#85"))},Tuple{Tuple{}}}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##273#back#154")){Zygote.Jnew{getfield(Zygote, Symbol("##84#85")),Nothing,false}}, getfield(Zygote, Symbol("##84#85"))}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Tuple{Val{2},getfield(Zygote, Symbol("##84#85"))}, getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Tuple{}, Tuple{Zygote.Context,DataType}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{DataType, Zygote.Context}
└ @ tuple.jl:24
┌ Warning: dynamic dispatch to (Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2))
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 1)
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 1), 2))
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:-1
┌ Warning: dynamic dispatch to (Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2))
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 1)
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(__context__, Zygote.adjoint, (getfield)((getfield)(args, 1), 1), (getfield)((getfield)(args, 1), 2)), 1), 2))
└ @ ~/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:-1
┌ Warning: getindex returns Union{Tuple{Val{2},getfield(Zygote, Symbol("##84#85"))}, getfield(Zygote, Symbol("##238#back#137")){getfield(Zygote, Symbol("##135#136")){typeof(∂(adjoint)),Tuple{Tuple{Nothing,Nothing},Tuple{}}}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Val{2}, getfield(Zygote, Symbol("##84#85"))}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("#back#119")){getfield(Zygote, Symbol("##190#back#111")){getfield(Zygote, Symbol("##107#109")){2,1}}}, Tuple{Val{2},Int64}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##190#back#111")){getfield(Zygote, Symbol("##107#109")){2,1}}, Core.Compiler.UseRef}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("#back#120")){getfield(Zygote, Symbol("##190#back#111")){getfield(Zygote, Symbol("##107#109")){2,2}}}, Tuple{getfield(Zygote, Symbol("##84#85")),Int64}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##273#back#154")){Zygote.Jnew{getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef},Nothing,false}}, getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}, Tuple{Core.Compiler.UseRef,getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef}}}
└ @ tuple.jl:24
┌ Warning: dynamic dispatch to (Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2})
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1)
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 2))
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}())
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1)
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 2)
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{1}())
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}())
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true))
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1)
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 2)
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}())
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: dynamic dispatch to Zygote.adjoint(ctx, Zygote.__new__, Core.apply_type(Zygote.:(##118#back#86), Core.typeof(Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true))), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true))
└ @ ~/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:-1
ERROR: ┌ Warning: dynamic dispatch to (typeof(∂(_forward)))(Base.tuple(Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{1}()), 2, true), %new(Core.apply_type(Zygote.:(##238#back#137), Core.typeof(%new(Core.apply_type(Zygote.:(##135#136), Core.typeof(Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 2)), 1)), Tuple{Tuple{Nothing,Nothing},Tuple{}}), Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 2)), 1), ((nothing, nothing), ())))), %new(CMethodError: no method matching literal_pow(::typeof(^), ::Int64, ::Core.Compiler.UseRef)
Closest candidates are:
literal_pow(::typeof(^), ::Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8, Complex{#s75} where #s75<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, Rational{#s74} where #s74<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}}, ::Val{0}) at intfuncs.jl:242
literal_pow(::typeof(^), ::Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8, Complex{#s75} where #s75<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, Rational{#s74} where #s74<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}}, ::Val{1}) at intfuncs.jl:243
literal_pow(::typeof(^), ::Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8, Complex{#s75} where #s75<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}, Rational{#s74} where #s74<:Union{Float32, Float64, Int16, Int32, Int64, Int8, UInt16, UInt32, UInt64, UInt8}}, ::Val{2}) at intfuncs.jl:244
...ore.apply_type(Zygote.:(##135#136), Core.typeof(Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 2)), 1)), Tuple{Tuple{Nothing,Nothing},Tuple{}}), Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 2, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 2)), 1), ((nothing, nothing), ()))), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_
Stacktrace:iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 2, true), %new(Core.apply_type(Zygote.:(##273#back#154), Core.typeof(Base.getfield(Zygote.adjoint(ctx, Zygote.__new__, Core.apply_type(Zygote.:(##118#back#86), Core.typeof(Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Z
ygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true))), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true)), 2))), Base.getfield(Zygote.adjoint(ctx, Zygote.__new__, Core.apply_type(Zygote.:(##118#back#86), Core.typeof(Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Va [1] l{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true))), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 1), Val{1}()), 1, true)), 2)), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indecallxed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 2, true), Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 2), getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}(identity), getfield(Zygote, Symbol("##178#back#105")){typeof(identity)}(identity), Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{2}(), Base.getfield(Zygote._forward(ctx, Zygote.literal_getproperty, Base.getindex(Zygote._forward(ctx, Zygote.literal_indexed_iterate, Core.getfield(Base.indexed_iterate((Zygote._forward)(ctx, Zygote.adjoint, Base.getfield(args, 1), Val{2}), 1), 1), Val{1}()), 1), Val{2}()), 1, true)), 2)))
└ @ ~/.julia/packages/Zy at gote/fuj2C/src/compiler/interface2.jl:-1
┌ Warning: getindex returns Union{typeof(∂(_forward)), Tuple{Core.Compiler.UseRef,getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef}}}
└ @ tuple.jl:24
┌ Warning: getindex returns Union{Core.Compiler.UseRef, getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef}}
└ @ tuple.jl:24
/Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:447┌ Warning: getindex returns Union{getfield(Zygote, Symbol("##190#back#111")){getfield(Zygote, Symbol("##107#109")){2,2}}, getfield(Zygote, Symbol("##118#back#86")){Core.Compiler.UseRef}}
└ @ tuple.jl:24
[inlined]
[2] fallback at /Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:445 [inlined]
[3] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Base.literal_pow), ::typeof(^), ::Int64, ::Core.Compiler.UseRef) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:481
[4] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Function, ::Int64, ::Core.Compiler.UseRef) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[5] macro expansion at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:0 [inlined]
[6] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:6 [inlined]
[7] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Base.literal_pow), ::typeof(^), ::Int64, ::Core.Compiler.UseRef) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[8] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Int64, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[9] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:260 [inlined]
[10] adjoint at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:126 [inlined]
[11] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote.adjoint), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Base.literal_pow), ::Tuple{typeof(^),Int64,Core.Compiler.UseRef}) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[12] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(^),Int64,Core.Compiler.UseRef}) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[13] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Base.literal_pow), ::Tuple{typeof(^),Int64,Core.Compiler.UseRef}) at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:44
[14] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(^),Int64,Core.Compiler.UseRef}) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[15] macro expansion at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:0 [inlined]
[16] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface2.jl:6 [inlined]
[17] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Base.literal_pow), ::typeof(^), ::Int64, ::Core.Compiler.UseRef) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[18] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Zygote.Context, ::Function, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[19] g at ./REPL[5]:1 [inlined]
[20] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[21] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Zygote.Context, ::Function, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[22] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:260 [inlined]
[23] adjoint at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:126 [inlined]
[24] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote.adjoint), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Zygote._forward), ::Tuple{Zygote.Context,typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[25] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{Zygote.Context,typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[26] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Zygote._forward), ::Tuple{Zygote.Context,typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:44
[27] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{Zygote.Context,typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[28] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:31 [inlined]
[29] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Zygote._forward), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[30] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[31] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:260 [inlined]
[32] adjoint at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:126 [inlined]
[33] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote.adjoint), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Zygote._forward), ::Tuple{typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[34] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[35] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Core._apply), ::typeof(Zygote._forward), ::Tuple{typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:44
[36] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[37] forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:37 [inlined]
[38] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(forward), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[39] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[40] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/context.jl:260 [inlined]
[41] adjoint at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/lib.jl:126 [inlined]
[42] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote.adjoint), ::Zygote.Context, ::typeof(Core._apply), ::typeof(forward), ::Tuple{typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[43] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[44] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(Core._apply), ::typeof(forward), ::Tuple{typeof(g)}, ::Tuple{Int64}) at /Users/dilum/.julia/packages/Zygote/fuj2C/src/lib/grad.jl:44
[45] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Tuple{typeof(g)}, ::Vararg{Any,N} where N) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[46] gradient at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:46 [inlined]
[47] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(gradient), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[48] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Zygote.Context, ::Function, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[49] #34 at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50 [inlined]
[50] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[51] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[52] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:31 [inlined]
[53] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(Zygote._forward), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[54] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[55] forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:37 [inlined]
[56] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(forward), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[57] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[58] gradient at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:46 [inlined]
[59] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::typeof(gradient), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[60] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[61] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::getfield(Zygote, Symbol("##34#35")){getfield(Zygote, Symbol("##34#35")){typeof(g)}}, ::Int64) at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50
[62] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[63] #7 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:88 [inlined]
[64] recurse(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#373")),Nothing,Nothing}, ::getfield(Main, Symbol("##7#8"))) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[65] #trace#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Traceur.trace), ::Function, ::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51
[66] #warntrace#21 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51 [inlined]
[67] warntrace(::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:54
Julia 1.3:
julia> using InteractiveUtils, Pkg
julia> InteractiveUtils.versioninfo()
Julia Version 1.3.0-alpha.0
Commit 6c11e7c2c4 (2019-07-23 01:46 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin18.6.0)
CPU: Intel(R) Core(TM) i5-4278U CPU @ 2.60GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, haswell)
julia> Pkg.status()
Status `~/.julia/environments/v1.3/Project.toml`
[37b6cedf] Traceur v0.3.0
[e88e6eb3] Zygote v0.3.2
julia> using Traceur, Zygote
[ Info: Precompiling Traceur [37b6cedf-1f77-55f8-9503-c64b63398394]
[ Info: Precompiling Zygote [e88e6eb3-aa80-5325-afca-941959d7151f]
julia> g(x) = 7x^2 + 5x + 3
g (generic function with 1 method)
julia> g(10)
753
julia> g'(10)
145
julia> g''(10)
14
julia> @trace g(10)
753
julia> @trace g'(10)
ERROR: ERROR COMPILING (typeof(Zygote._forward), Zygote.Context, typeof(g), Int64) IN CONTEXT Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}:
AssertionError: code_info.edges === nothing
118-element Array{Base.StackTraces.StackFrame,1}:
reflect(::Tuple, ::UInt64) at overdub.jl:83
reflect at overdub.jl:46 [inlined]
__overdub_generator__(::Type, ::Type, ::NTuple{4,DataType}) at overdub.jl:497
(::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at boot.jl:524
get_staged(::Core.MethodInstance) at utilities.jl:92
retrieve_code_info at utilities.jl:103 [inlined]
Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Bool, ::Core.Compiler.Params) at inferencestate.jl:113
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:482
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_ext(::Core.MethodInstance, ::Core.Compiler.Params) at typeinfer.jl:577
typeinf_ext(::Core.MethodInstance, ::UInt64) at typeinfer.jl:608
overdub(::Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::Function, ::Int64) at trace.jl:47
#5 at trace.jl:88 [inlined]
recurse(::Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Main, Symbol("##5#6"))) at overdub.jl:0
#trace#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Traceur.trace), ::Function, ::Function) at trace.jl:51
#warntrace#21 at trace.jl:51 [inlined]
warntrace(::Function) at trace.jl:54
top-level scope at trace.jl:88
eval(::Module, ::Any) at boot.jl:330
eval_user_input(::Any, ::REPL.REPLBackend) at REPL.jl:86
macro expansion at REPL.jl:118 [inlined]
(::getfield(REPL, Symbol("##26#27")){REPL.REPLBackend})() at task.jl:292
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:507 [inlined]
[3] macro expansion at /Users/dilum/.julia/packages/Cassette/IwsFs/src/Cassette.jl:0 [inlined]
[4] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/Cassette.jl:11 [inlined]
[5] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[6] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[7] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:31 [inlined]
[8] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(Zygote._forward), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[9] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[10] forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:37 [inlined]
[11] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(forward), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[12] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[13] gradient at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:46 [inlined]
[14] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(gradient), ::typeof(g), ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[15] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[16] #34 at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50 [inlined]
[17] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[18] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[19] #5 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:88 [inlined]
[20] recurse(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Main, Symbol("##5#6"))) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[21] #trace#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Traceur.trace), ::Function, ::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51
[22] #warntrace#21 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51 [inlined]
[23] warntrace(::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:54
[24] top-level scope at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:88
julia> @trace g''(10)
ERROR: ERROR COMPILING (typeof(Zygote._forward), Zygote.Context, getfield(Zygote, Symbol("##34#35")){typeof(g)}, Int64) IN CONTEXT Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}:
AssertionError: code_info.edges === nothing
118-element Array{Base.StackTraces.StackFrame,1}:
reflect(::Tuple, ::UInt64) at overdub.jl:83
reflect at overdub.jl:46 [inlined]
__overdub_generator__(::Type, ::Type, ::NTuple{4,DataType}) at overdub.jl:497
(::Core.GeneratedFunctionStub)(::Any, ::Vararg{Any,N} where N) at boot.jl:524
get_staged(::Core.MethodInstance) at utilities.jl:92
retrieve_code_info at utilities.jl:103 [inlined]
Core.Compiler.InferenceState(::Core.Compiler.InferenceResult, ::Bool, ::Core.Compiler.Params) at inferencestate.jl:113
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:482
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
invoke_tfunc(::Any, ::Any, ::Any, ::Core.Compiler.InferenceState) at tfuncs.jl:1144
builtin_tfunction(::Any, ::Array{Any,1}, ::Union{Nothing, Core.Compiler.InferenceState}, ::Core.Compiler.Params) at tfuncs.jl:1334
builtin_tfunction at tfuncs.jl:1283 [inlined]
abstract_call(::Any, ::Nothing, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:663
abstract_apply(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:581
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:637
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_edge(::Method, ::Any, ::Core.SimpleVector, ::Core.Compiler.InferenceState) at typeinfer.jl:491
abstract_call_method(::Method, ::Any, ::Core.SimpleVector, ::Bool, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:396
abstract_call_gf_by_type(::Any, ::Array{Any,1}, ::Any, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:93
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState, ::Int64) at abstractinterpretation.jl:846
abstract_call(::Any, ::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:636
abstract_eval_call(::Array{Any,1}, ::Array{Any,1}, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:875
abstract_eval(::Any, ::Array{Any,1}, ::Core.Compiler.InferenceState) at abstractinterpretation.jl:945
typeinf_local(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1202
typeinf_nocycle(::Core.Compiler.InferenceState) at abstractinterpretation.jl:1258
typeinf(::Core.Compiler.InferenceState) at typeinfer.jl:12
typeinf_ext(::Core.MethodInstance, ::Core.Compiler.Params) at typeinfer.jl:577
typeinf_ext(::Core.MethodInstance, ::UInt64) at typeinfer.jl:608
overdub(::Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::Function, ::Int64) at trace.jl:47
#7 at trace.jl:88 [inlined]
recurse(::Cassette.Context{getfield(Traceur, Symbol("##TraceurCtx#Name")),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Main, Symbol("##7#8"))) at overdub.jl:0
#trace#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Traceur.trace), ::Function, ::Function) at trace.jl:51
#warntrace#21 at trace.jl:51 [inlined]
warntrace(::Function) at trace.jl:54
top-level scope at trace.jl:88
eval(::Module, ::Any) at boot.jl:330
eval_user_input(::Any, ::REPL.REPLBackend) at REPL.jl:86
macro expansion at REPL.jl:118 [inlined]
(::getfield(REPL, Symbol("##26#27")){REPL.REPLBackend})() at task.jl:292
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] macro expansion at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:507 [inlined]
[3] macro expansion at /Users/dilum/.julia/packages/Cassette/IwsFs/src/Cassette.jl:0 [inlined]
[4] overdub at /Users/dilum/.julia/packages/Cassette/IwsFs/src/Cassette.jl:11 [inlined]
[5] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(Zygote._forward), ::Zygote.Context, ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[6] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[7] _forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:31 [inlined]
[8] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(Zygote._forward), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[9] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[10] forward at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:37 [inlined]
[11] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(forward), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[12] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[13] gradient at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:46 [inlined]
[14] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::typeof(gradient), ::getfield(Zygote, Symbol("##34#35")){typeof(g)}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[15] overdub at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47 [inlined]
[16] #34 at /Users/dilum/.julia/packages/Zygote/fuj2C/src/compiler/interface.jl:50 [inlined]
[17] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Zygote, Symbol("##34#35")){getfield(Zygote, Symbol("##34#35")){typeof(g)}}, ::Int64) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[18] overdub(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::Function, ::Int64) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:47
[19] #7 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:88 [inlined]
[20] recurse(::Cassette.Context{nametype(TraceurCtx),Traceur.Trace,Nothing,getfield(Cassette, Symbol("##PassType#401")),Nothing,Nothing}, ::getfield(Main, Symbol("##7#8"))) at /Users/dilum/.julia/packages/Cassette/IwsFs/src/overdub.jl:0
[21] #trace#20(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::typeof(Traceur.trace), ::Function, ::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51
[22] #warntrace#21 at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:51 [inlined]
[23] warntrace(::Function) at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:54
[24] top-level scope at /Users/dilum/.julia/packages/Traceur/OKJwj/src/trace.jl:88
I confirmed same kind of behaviour with some functions, for example the one that has print
statement at some point of the function body.
I've just done the new @trace
macro implementation using Vinyl.jl to achieve better performance, and it somehow solves the issues as well:
With the implementation I confirmed I can trace your whole g
function even though it took horrible amount of time.
Honestly I'm not too sure what causes these issues though.
~~I'll give Vinyl.@trace
a try and see what happens~~
No, I meant I refactored Traceur.@trace
using Vinyl.jl.
I'll make a PR on this in near days and then you can try on the branch.
Ahhh I see. Sounds good, I'll try once you make the PR
Bump @aviatesk
Any update on this?
@aviatesk Could you share your code for refactoring Traceur.@trace
using Vinyl.jl.?
@DilumAluthge Sorry for super late reply. You can find my attempt to use Vinyl on this branch.
IMHO I'm currently not so interested in this change, since interpreter-based overdubs didn't improve the tracing time well. It seems to be able to get rid of bugs within Cassette (maybe also related to this issue), but I've not tried to dig into the details around that.
But you may find it interesting. If you find some performance pitfalls in my implementation, I really want to hear that.