TuringLang / IRTracker.jl

Dynamically track IR as a graph, using source transformations
31 stars 5 forks source link

Another argument confusion #9

Closed phipsgabler closed 5 years ago

phipsgabler commented 5 years ago

Happens when calling test4:

ERROR: LoadError: Can't track typeof(getindex) with args Tuple{Int64,Int64}, typeof(iterate)
Stacktrace:
 [1] error(::String, ::Type, ::String, ::String) at ./error.jl:42
 [2] track(::typeof(getindex), ::Tuple{Int64,Int64}, ::typeof(iterate)) at /home/philipp/.julia/packages/IRTools/pgYVw/src/reflection/dynamo.jl:44
 [3] macro expansion at /home/philipp/git/DynamicComputationGraphs/src/tracker.jl:25 [inlined]
 [4] record!(::Main.DynamicComputationGraphs.GraphTape, ::Main.DynamicComputationGraphs.VarIndex, ::Expr, ::typeof(getindex), ::Tuple{Int64,Int64}, ::typeof(iterate)) at /home/philipp/git/DynamicComputationGraphs/src/tracker.jl:12
 [5] track(::typeof(Base.vect), ::Int64, ::Int64) at ./array.jl:130
 [6] macro expansion at /home/philipp/git/DynamicComputationGraphs/src/tracker.jl:25 [inlined]
 [7] record!(::Main.DynamicComputationGraphs.GraphTape, ::Main.DynamicComputationGraphs.VarIndex, ::Expr, ::typeof(Base.vect), ::Int64, ::Int64) at /home/philipp/git/DynamicComputationGraphs/src/tracker.jl:12
 [8] test4 at /home/philipp/git/DynamicComputationGraphs/src/DynamicComputationGraphs.jl:38 [inlined]
 [9] track(::typeof(Main.DynamicComputationGraphs.test4), ::Int64) at /home/philipp/.julia/packages/IRTools/pgYVw/src/reflection/dynamo.jl:0
 [10] top-level scope at /home/philipp/git/DynamicComputationGraphs/src/DynamicComputationGraphs.jl:41
 [11] include at ./boot.jl:328 [inlined]
 [12] include_relative(::Module, ::String) at ./loading.jl:1094
 [13] include(::Module, ::String) at ./Base.jl:31
 [14] exec_options(::Base.JLOptions) at ./client.jl:295
 [15] _start() at ./client.jl:464
in expression starting at /home/philipp/git/DynamicComputationGraphs/src/DynamicComputationGraphs.jl:41

This time, it's not so much that internals are leaked by wrongly plugging things together, as in #8, but probably by reference to the wrong SSA variable at some point, I guess.