EnzymeAD/Enzyme.jl
View on GitHub"could not find jl_wait fn to create shadow of jl_enq_work"
Open
#1,959 opened on Oct 10, 2024
help wanted
Repository metrics
- Stars
- (563 stars)
- PR merge metrics
- (Avg merge 5d 1h) (76 merged PRs in 30d)
Description
@boriskaus found this while trying to differentiate through Chmy.jl ( cc: @utkinis )
In particular, this is the put! on a Channel. Enzyme v0.13.8 and Julia 1.10 on MacOS
ERROR: LoadError: Enzyme execution failed.
Enzyme: could not find jl_wait fn to create shadow of jl_enq_work
Stacktrace:
[1] list_deletefirst!
@ ./linked_list.jl:95 [inlined]
[2] #schedule#673
@ ./task.jl:853 [inlined]
[3] augmented_julia__schedule_673_15453wrap
@ ./task.jl:0
[4] macro expansion
@ ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8839 [inlined]
[5] enzyme_call
@ ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8405 [inlined]
[6] AdjointThunk
@ ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8210 [inlined]
[7] runtime_generic_rev(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, tape::Enzyme.Compiler.Tape{…}, f::Base.var"##schedule#673", df::Nothing, primal_1::Bool, shadow_1_1::Nothing, primal_2::typeof(schedule), shadow_2_1::Nothing, primal_3::Task, shadow_3_1::Nothing, primal_4::Chmy.KernelLaunch.var"#14#17"{…}, shadow_4_1::Base.RefValue{…})
@ Enzyme.Compiler ~/.julia/packages/Enzyme/Vjlrr/src/rules/jitrules.jl:689
[8] schedule
@ ./task.jl:849 [inlined]
[9] put_unbuffered
@ ./channels.jl:396 [inlined]
[10] put_unbuffered
@ ./channels.jl:0 [inlined]
[11] diffejulia_put_unbuffered_15047_inner_1wrap
@ ./channels.jl:0
[12] macro expansion
@ ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8839 [inlined]
[13] enzyme_call(::Val{…}, ::Ptr{…}, ::Type{…}, ::Val{…}, ::Val{…}, ::Type{…}, ::Type{…}, ::Const{…}, ::Type{…}, ::Const{…}, ::MixedDuplicated{…}, ::Chmy.KernelLaunch.var"#14#17"{…}, ::@NamedTuple{…})
@ Enzyme.Compiler ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8405
[14] (::Enzyme.Compiler.AdjointThunk{Ptr{…}, Const{…}, MixedDuplicated{…}, Tuple{…}, 1, @NamedTuple{…}})(::Const{typeof(Base.put_unbuffered)}, ::Const{Channel{…}}, ::Vararg{Any})
@ Enzyme.Compiler ~/.julia/packages/Enzyme/Vjlrr/src/compiler.jl:8210
[15] runtime_generic_rev(activity::Type{…}, runtimeActivity::Val{…}, width::Val{…}, ModifiedBetween::Val{…}, tape::Enzyme.Compiler.Tape{…}, f::typeof(Base.put_unbuffered), df::Nothing, primal_1::Channel{…}, shadow_1_1::Nothing, primal_2::Chmy.KernelLaunch.var"#14#17"{…}, shadow_2_1::Base.RefValue{…})
@ Enzyme.Compiler ~/.julia/packages/Enzyme/Vjlrr/src/rules/jitrules.jl:682
[16] put!
@ ./channels.jl:342 [inlined]
[17] put!
@ ~/.julia/packages/Chmy/rFxgg/src/Workers.jl:54 [inlined]
[18] #13
@ ~/.julia/packages/Chmy/rFxgg/src/KernelLaunch.jl:147 [inlined]
[19] ntuple
@ ./ntuple.jl:49 [inlined]
[20] #12
@ ~/.julia/packages/Chmy/rFxgg/src/KernelLaunch.jl:146 [inlined]
[21] ntuple
@ ./ntuple.jl:48 [inlined]
[22] launch_with_bc
@ ~/.julia/packages/Chmy/rFxgg/src/KernelLaunch.jl:142 [inlined]