Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Overdubbing rand or randn lead to error: "this intrinsic must be compiled to be called" #144

Closed
DilumAluthge opened this issue Aug 29, 2019 · 3 comments

Comments

@DilumAluthge
Copy link
Contributor

This is on Julia master and Cassette#master.

Example 1

julia> using Cassette

julia> Cassette.@context Ctx
Cassette.Context{nametype(Ctx),M,T,P,B,H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, IdDict{Module,Dict{Symbol,Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag} where M

julia> function Cassette.overdub(ctx::Ctx, f, args...)
           if Cassette.canrecurse(ctx, f, args...)
               Cassette.recurse(ctx, f, args...)
           else
               Cassette.fallback(ctx, f, args...)
           end
       end

julia> function foo()
           rand()
       end
foo (generic function with 1 method)

julia> Cassette.@overdub Ctx() foo()
ERROR: this intrinsic must be compiled to be called
Stacktrace:
 [1] call at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:447 [inlined]
 [2] fallback at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:445 [inlined]
 [3] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::String, ::Type, ::Type, ::Ptr{Int64}) at ./REPL[3]:5
 [4] getindex at ./atomics.jl:347 [inlined]
 [5] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(getindex), ::Base.Threads.Atomic{Int64}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [6] overdub at ./REPL[3]:3 [inlined]
 [7] lock at ./locks-mt.jl:35 [inlined]
 [8] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::Base.Threads.SpinLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [9] overdub at ./REPL[3]:3 [inlined]
 [10] lock at ./condition.jl:74 [inlined]
 [11] overdub at ./REPL[3]:3 [inlined]
 [12] lock at ./lock.jl:68 [inlined]
 [13] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::ReentrantLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [14] overdub at ./REPL[3]:3 [inlined]
 [15] lock at ./stream.jl:224 [inlined]
 [16] overdub at ./REPL[3]:3 [inlined]
 [17] print at ./strings/io.jl:45 [inlined]
 [18] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(print), ::Base.TTY, ::String, ::Char) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [19] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Base.TTY, ::String, ::Char) at ./REPL[3]:3
 [20] println at ./strings/io.jl:75 [inlined]
 [21] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(println), ::Base.TTY, ::String) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [22] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Base.TTY, ::String) at ./REPL[3]:3
 [23] make_seed at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:251 [inlined]
 [24] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.make_seed)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [25] overdub at ./REPL[3]:3 [inlined]
 [26] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:288 [inlined]
 [27] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.seed!), ::Random.MersenneTwister) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [28] overdub at ./REPL[3]:3 [inlined]
 [29] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:412 [inlined]
 [30] overdub at ./REPL[3]:3 [inlined]
 [31] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [32] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Type{Random.MersenneTwister}, ::Nothing) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [33] overdub at ./REPL[3]:3 [inlined]
 [34] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [35] overdub at ./REPL[3]:3 [inlined]
 [36] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:302 [inlined]
 [37] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng), ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [38] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Int64) at ./REPL[3]:3
 [39] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:296 [inlined]
 [40] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [41] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [42] rand at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:253 [inlined]
 [43] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(rand)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [44] overdub at ./REPL[3]:3 [inlined]
 [45] foo at ./REPL[4]:2 [inlined]
 [46] overdub at ./REPL[3]:3 [inlined]
 [47] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::var"##4#5") at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:664
 [48] top-level scope at REPL[5]:1
caused by [exception 1]
this intrinsic must be compiled to be called
Stacktrace:
 [1] call at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:447 [inlined]
 [2] fallback at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:445 [inlined]
 [3] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::String, ::Type, ::Type, ::Ptr{Int64}) at ./REPL[3]:5
 [4] getindex at ./atomics.jl:347 [inlined]
 [5] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(getindex), ::Base.Threads.Atomic{Int64}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [6] overdub at ./REPL[3]:3 [inlined]
 [7] lock at ./locks-mt.jl:35 [inlined]
 [8] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::Base.Threads.SpinLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [9] overdub at ./REPL[3]:3 [inlined]
 [10] lock at ./condition.jl:74 [inlined]
 [11] overdub at ./REPL[3]:3 [inlined]
 [12] lock at ./lock.jl:68 [inlined]
 [13] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::ReentrantLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [14] overdub at ./REPL[3]:3 [inlined]
 [15] macro expansion at ./lock.jl:182 [inlined]
 [16] unsafe_read at ./iostream.jl:374 [inlined]
 [17] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(unsafe_read), ::IOStream, ::Ptr{UInt8}, ::UInt64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [18] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::IOStream, ::Ptr{UInt8}, ::UInt64) at ./REPL[3]:3
 [19] unsafe_read at ./io.jl:669 [inlined]
 [20] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(unsafe_read), ::IOStream, ::Ptr{UInt32}, ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [21] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(read!), ::IOStream, ::Array{UInt32,1}) at ./REPL[3]:3
 [22] overdub at ./REPL[3]:3 [inlined]
 [23] rand! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:51 [inlined]
 [24] overdub at ./REPL[3]:3 [inlined]
 [25] rand! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:264 [inlined]
 [26] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.rand!), ::Random.RandomDevice, ::Array{UInt32,1}, ::Type{UInt32}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [27] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(rand), ::Random.RandomDevice, ::Type{UInt32}, ::Int64) at ./REPL[3]:3 (repeats 2 times)
 [28] overdub at ./REPL[3]:3 [inlined]
 [29] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:288 [inlined]
 [30] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.seed!), ::Random.MersenneTwister) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [31] overdub at ./REPL[3]:3 [inlined]
 [32] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:412 [inlined]
 [33] overdub at ./REPL[3]:3 [inlined]
 [34] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [35] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Type{Random.MersenneTwister}, ::Nothing) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [36] overdub at ./REPL[3]:3 [inlined]
 [37] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [38] overdub at ./REPL[3]:3 [inlined]
 [39] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:302 [inlined]
 [40] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng), ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [41] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Int64) at ./REPL[3]:3
 [42] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:296 [inlined]
 [43] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [44] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [45] rand at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:253 [inlined]
 [46] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(rand)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [47] overdub at ./REPL[3]:3 [inlined]
 [48] foo at ./REPL[4]:2 [inlined]
 [49] overdub at ./REPL[3]:3 [inlined]
 [50] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::var"##4#5") at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:664

Example 2

julia> using Cassette

julia> Cassette.@context Ctx
Cassette.Context{nametype(Ctx),M,T,P,B,H} where H<:Union{Cassette.DisableHooks, Nothing} where B<:Union{Nothing, IdDict{Module,Dict{Symbol,Cassette.BindingMeta}}} where P<:Cassette.AbstractPass where T<:Union{Nothing, Cassette.Tag} where M

julia> function Cassette.overdub(ctx::Ctx, f, args...)
           if Cassette.canrecurse(ctx, f, args...)
               Cassette.recurse(ctx, f, args...)
           else
               Cassette.fallback(ctx, f, args...)
           end
       end

julia> function foo()
           randn()
       end
foo (generic function with 1 method)

julia> Cassette.@overdub Ctx() foo()
ERROR: this intrinsic must be compiled to be called
Stacktrace:
 [1] call at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:447 [inlined]
 [2] fallback at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:445 [inlined]
 [3] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::String, ::Type, ::Type, ::Ptr{Int64}) at ./REPL[3]:5
 [4] getindex at ./atomics.jl:347 [inlined]
 [5] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(getindex), ::Base.Threads.Atomic{Int64}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [6] overdub at ./REPL[3]:3 [inlined]
 [7] lock at ./locks-mt.jl:35 [inlined]
 [8] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::Base.Threads.SpinLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [9] overdub at ./REPL[3]:3 [inlined]
 [10] lock at ./condition.jl:74 [inlined]
 [11] overdub at ./REPL[3]:3 [inlined]
 [12] lock at ./lock.jl:68 [inlined]
 [13] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::ReentrantLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [14] overdub at ./REPL[3]:3 [inlined]
 [15] lock at ./stream.jl:224 [inlined]
 [16] overdub at ./REPL[3]:3 [inlined]
 [17] print at ./strings/io.jl:45 [inlined]
 [18] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(print), ::Base.TTY, ::String, ::Char) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [19] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Base.TTY, ::String, ::Char) at ./REPL[3]:3
 [20] println at ./strings/io.jl:75 [inlined]
 [21] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(println), ::Base.TTY, ::String) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [22] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Base.TTY, ::String) at ./REPL[3]:3
 [23] make_seed at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:251 [inlined]
 [24] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.make_seed)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [25] overdub at ./REPL[3]:3 [inlined]
 [26] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:288 [inlined]
 [27] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.seed!), ::Random.MersenneTwister) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [28] overdub at ./REPL[3]:3 [inlined]
 [29] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:412 [inlined]
 [30] overdub at ./REPL[3]:3 [inlined]
 [31] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [32] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Type{Random.MersenneTwister}, ::Nothing) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [33] overdub at ./REPL[3]:3 [inlined]
 [34] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [35] overdub at ./REPL[3]:3 [inlined]
 [36] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:302 [inlined]
 [37] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng), ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [38] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Int64) at ./REPL[3]:3
 [39] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:296 [inlined]
 [40] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [41] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [42] randn at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/normal.jl:39 [inlined]
 [43] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(randn)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [44] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [45] foo at ./REPL[4]:2 [inlined]
 [46] overdub at ./REPL[3]:3 [inlined]
 [47] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::var"##4#5") at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:664
 [48] top-level scope at REPL[5]:1
caused by [exception 1]
this intrinsic must be compiled to be called
Stacktrace:
 [1] call at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:447 [inlined]
 [2] fallback at /Users/dilum/.julia/packages/Cassette/YCOeN/src/context.jl:445 [inlined]
 [3] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::String, ::Type, ::Type, ::Ptr{Int64}) at ./REPL[3]:5
 [4] getindex at ./atomics.jl:347 [inlined]
 [5] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(getindex), ::Base.Threads.Atomic{Int64}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [6] overdub at ./REPL[3]:3 [inlined]
 [7] lock at ./locks-mt.jl:35 [inlined]
 [8] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::Base.Threads.SpinLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [9] overdub at ./REPL[3]:3 [inlined]
 [10] lock at ./condition.jl:74 [inlined]
 [11] overdub at ./REPL[3]:3 [inlined]
 [12] lock at ./lock.jl:68 [inlined]
 [13] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(lock), ::ReentrantLock) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [14] overdub at ./REPL[3]:3 [inlined]
 [15] macro expansion at ./lock.jl:182 [inlined]
 [16] unsafe_read at ./iostream.jl:374 [inlined]
 [17] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(unsafe_read), ::IOStream, ::Ptr{UInt8}, ::UInt64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [18] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::IOStream, ::Ptr{UInt8}, ::UInt64) at ./REPL[3]:3
 [19] unsafe_read at ./io.jl:669 [inlined]
 [20] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(unsafe_read), ::IOStream, ::Ptr{UInt32}, ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [21] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(read!), ::IOStream, ::Array{UInt32,1}) at ./REPL[3]:3
 [22] overdub at ./REPL[3]:3 [inlined]
 [23] rand! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:51 [inlined]
 [24] overdub at ./REPL[3]:3 [inlined]
 [25] rand! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:264 [inlined]
 [26] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.rand!), ::Random.RandomDevice, ::Array{UInt32,1}, ::Type{UInt32}) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [27] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(rand), ::Random.RandomDevice, ::Type{UInt32}, ::Int64) at ./REPL[3]:3 (repeats 2 times)
 [28] overdub at ./REPL[3]:3 [inlined]
 [29] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:288 [inlined]
 [30] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.seed!), ::Random.MersenneTwister) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [31] overdub at ./REPL[3]:3 [inlined]
 [32] seed! at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/Random.jl:412 [inlined]
 [33] overdub at ./REPL[3]:3 [inlined]
 [34] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [35] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Type{Random.MersenneTwister}, ::Nothing) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [36] overdub at ./REPL[3]:3 [inlined]
 [37] MersenneTwister at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:137 [inlined]
 [38] overdub at ./REPL[3]:3 [inlined]
 [39] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:302 [inlined]
 [40] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng), ::Int64) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [41] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function, ::Int64) at ./REPL[3]:3
 [42] default_rng at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/RNGs.jl:296 [inlined]
 [43] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(Random.default_rng)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [44] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [45] randn at /Users/dilum/dev/forks-DilumAluthge/julia/usr/share/julia/stdlib/v1.4/Random/src/normal.jl:39 [inlined]
 [46] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::typeof(randn)) at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:0
 [47] overdub(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::Function) at ./REPL[3]:3
 [48] foo at ./REPL[4]:2 [inlined]
 [49] overdub at ./REPL[3]:3 [inlined]
 [50] recurse(::Cassette.Context{nametype(Ctx),Nothing,Nothing,Cassette.var"##PassType#404",Nothing,Nothing}, ::var"##4#5") at /Users/dilum/.julia/packages/Cassette/YCOeN/src/overdub.jl:664
@DilumAluthge
Copy link
Contributor Author

This is related to JunoLab/Traceur.jl#35

@DilumAluthge
Copy link
Contributor Author

It may also be related to #138

@vchuravy
Copy link
Member

yeah dub of #138

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants