-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Description
MWE:
using Flux, Cthulhu
@descend gradient((m, x)->sum(sin.(m(x))), d, x)
# [...]
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
• 96 pullback(f, args...)
96 pullback(f, args...)
96 pullback(f::var"#27#28", args::Tuple{Dense{typeof(identity), Matrix{Float32}, Vector{Float3…
97 sensitivity(y::Float32)
97 back::Zygote.var"#60#61"{Zygote.Pullback{Tuple{var"#27#28", Dense{typeof(identity), Matrix{Float32}…………………………
%11 = isnothing(::Tuple{…})::Core.Const(false)
98 map(_project, args::Tuple{Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, Matrix{Float3…………
↩
# [...]
42 pullback(f::var"#27#28", args::Tuple{Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, Matrix{Float32}}...) = pullback(f::var"#27#28", Context::Type{Zygote.Context}()::Zygote.Context{false}, args::Tuple{Dense{typeof(identity), Matrix{Float32}, Vector{Float32}}, Matrix{Float32}}...)
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
42 Context::Type{Zygote.Context}()
• 42 pullback(f::var"#27#28", Context::Type{Zygote.Context}()::Zygote.Context{false}…
# [...]
Select a call to descend into or ↩ to ascend. [q]uit. [b]ookmark.
Toggles: [w]arn, [h]ide type-stable statements, [t]ype annotations, [s]yntax highlight for Source/LLVM/Native.
Show: [S]ource code, [A]ST, [T]yped code, [L]LVM IR, [N]ative code
Actions: [E]dit source code, [R]evise and redisplay
• 44 _pullback(cx, f, args...)
44 _pullback(cx, f, args...)
44 _pullback(cx::Zygote.Context{false}, f::var"#27#28", args::Tuple{Dense{typeof(ident…
↩
ERROR: BoundsError: attempt to access 1-element Vector{Core.LineInfoNode} at index [0]
Stacktrace:
[1] getindex
@ ./essentials.jl:13 [inlined]
[2] getindex
@ ./abstractarray.jl:1297 [inlined]
[3] getline(lt::Vector{Core.LineInfoNode}, j::Int32)
@ TypedSyntax ~/.julia/packages/TypedSyntax/xKbe0/src/node.jl:672
[4] (::TypedSyntax.var"#append_targets_for_line!#17"{Core.CodeInfo, Int64})(mapped::Vector{JuliaSyntax.TreeNode{JuliaSyn
tax.SyntaxData}}, i::Int64, targets::Vector{JuliaSyntax.TreeNode{JuliaSyntax.SyntaxData}})
@ TypedSyntax ~/.julia/packages/TypedSyntax/xKbe0/src/node.jl:307
[5] (::TypedSyntax.var"#append_targets_for_arg!#18"{TypedSyntax.var"#append_targets_for_line!#17"{Core.CodeInfo, Int64}}
)(mapped::Vector{JuliaSyntax.TreeNode{JuliaSyntax.SyntaxData}}, i::Int64, arg::Any)
@ TypedSyntax ~/.julia/packages/TypedSyntax/xKbe0/src/node.jl:319
[6] map_ssas_to_source(src::Core.CodeInfo, rootnode::JuliaSyntax.TreeNode{JuliaSyntax.SyntaxData}, Δline::Int64)
@ TypedSyntax ~/.julia/packages/TypedSyntax/xKbe0/src/node.jl:430
[7] tsn_and_mappings(m::Method, src::Core.CodeInfo, rt::Any; warn::Bool, strip_macros::Bool, kwargs::Base.Pairs{Symbol,
Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ TypedSyntax ~/.julia/packages/TypedSyntax/xKbe0/src/node.jl:44
[8] get_typed_sourcetext(mi::Core.MethodInstance, src::Core.CodeInfo, rt::Any; warn::Bool)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/reflection.jl:350
[9] find_callsites(interp::Cthulhu.CthulhuInterpreter, CI::Core.CodeInfo, stmt_infos::Vector{Core.Compiler.CallInfo}, mi
::Core.MethodInstance, slottypes::Vector{Any}, optimize::Bool, annotate_source::Bool)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/reflection.jl:28
[10] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override
::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, v
erbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:496
[11] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override
::Nothing, debuginfo::Cthulhu.DInfo.DebugInfo, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, v
erbose::Nothing, remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool) (rep
eats 2 times)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:629
[12] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, curs::Cthulhu.CthulhuCursor; override
::Nothing, debuginfo::Symbol, optimize::Bool, interruptexc::Bool, iswarn::Bool, hide_type_stable::Bool, verbose::Nothing,
remarks::Bool, with_effects::Bool, inline_cost::Bool, type_annotations::Bool, annotate_source::Bool)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:629
[13] _descend(term::REPL.Terminals.TTYTerminal, interp::Cthulhu.CthulhuInterpreter, mi::Core.MethodInstance; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:765
[14] _descend(term::REPL.Terminals.TTYTerminal, args::Any; interp::Core.Compiler.NativeInterpreter, kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:781
[15] __descend_with_error_handling(args::Any; terminal::Any, kwargs::Base.Pairs{Symbol, V, Tuple{Vararg{Symbol, N}}, NamedTuple{names, T}} where {V, N, names, T<:Tuple{Vararg{Any, N}}})
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:239
[16] _descend_with_error_handling(f::Any, argtypes::Any; kwargs::Base.Pairs{Symbol, Bool, Tuple{Symbol}, NamedTuple{(:iswarn,), Tuple{Bool}}})
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:228
[17] descend_code_typed(::Any, ::Vararg{Any}; kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:173
[18] descend_code_typed(::Any, ::Any)
@ Cthulhu ~/.julia/packages/Cthulhu/e6txW/src/Cthulhu.jl:173
[19] top-level scope
@ REPL[21]:1
[20] top-level scope
@ ~/.julia/packages/Infiltrator/r3Hf5/src/Infiltrator.jl:710
[21] top-level scope
@ ~/.julia/packages/CUDA/ZdCxS/src/initialization.jl:155
Metadata
Metadata
Assignees
Labels
No labels