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

Call to dot with tagged input results in misplaced "replaceglobalref" #136

Open
shashi opened this issue Jul 7, 2019 · 0 comments
Open

Comments

@shashi
Copy link

shashi commented Jul 7, 2019

MRE:

using Cassette
import Cassette: tag
Cassette.@context TestCtx

struct Input end

Cassette.metadatatype(::Type{<:TestCtx}, ::DataType) = Input

using LinearAlgebra

ctx = TestCtx()
ctx = Cassette.enabletagging(ctx, dot)

julia> Cassette.overdub(ctx, dot, tag(rand(4), ctx, Input()),rand(4))
ERROR: error compiling overdub: unsupported or misplaced expression "replaceglobalref" in function overdub
Stacktrace:
 [1] overdub(::Cassette.Context{nametype(TestCtx),Nothing,Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},getfield(Cassette, Symbol("##PassType#365")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::typeof(LinearAlgebra.BLAS.dot), ::Cassette.Tagged{Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},Array{Float64,1},Input,Array{Cassette.Meta{Input,Cassette.NoMetaMeta},1},Cassette.Context{nametype(TestCtx),Nothing,Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},getfield(Cassette, Symbol("##PassType#365")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}, ::Array{Float64,1}) at ./gcutils.jl:87
 [2] dot at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.1/LinearAlgebra/src/matmul.jl:9 [inlined]
 [3] overdub(::Cassette.Context{nametype(TestCtx),Nothing,Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},getfield(Cassette, Symbol("##PassType#365")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}, ::typeof(dot), ::Cassette.Tagged{Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},Array{Float64,1},Input,Array{Cassette.Meta{Input,Cassette.NoMetaMeta},1},Cassette.Context{nametype(TestCtx),Nothing,Cassette.Tag{nametype(TestCtx),0xa78b434112261993,Nothing},getfield(Cassette, Symbol("##PassType#365")),IdDict{Module,Dict{Symbol,Cassette.BindingMeta}},Nothing}}, ::Array{Float64,1}) at /home/shashi/.julia/dev/Cassette/src/overdub.jl:0
 [4] top-level scope at none:0
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

1 participant