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

Implement jl_call convention for 1.9 #492

Closed
vchuravy opened this issue Oct 5, 2022 · 2 comments
Closed

Implement jl_call convention for 1.9 #492

vchuravy opened this issue Oct 5, 2022 · 2 comments
Assignees

Comments

@vchuravy
Copy link
Member

vchuravy commented Oct 5, 2022

Test threw exception
  Expression: 0.5 ≈ (Enzyme.autodiff(dyn_mwe, Active, Active(1.0), Const((1, 2))))[1]
  AssertionError: ("jl_call calling convention not implemented yet",   %6 = call noalias nonnull {} addrspace(10)* ({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)*, {} addrspace(10)*, ...) @julia.call({} addrspace(10)* ({} addrspace(10)*, {} addrspace(10)**, i32)* noundef nonnull @ijl_new_structv, {} addrspace(10)* nonnull %5) #18, !dbg !21)
  Stacktrace:
    [1] jlcall_augfwd(B::Ptr{LLVM.API.LLVMOpaqueBuilder}, OrigCI::Ptr{LLVM.API.LLVMOpaqueValue}, gutils::Ptr{Nothing}, normalR::Ptr{Ptr{LLVM.API.LLVMOpaqueValue}}, shadowR::Ptr{Ptr{LLVM.API.LLVMOpaqueValue}}, tapeR::Ptr{Ptr{LLVM.API.LLVMOpaqueValue}})
      @ Enzyme.Compiler ~/work/Enzyme.jl/Enzyme.jl/src/compiler.jl:1305
@wsmoses
Copy link
Member

wsmoses commented Oct 5, 2022

I can do that right now, but the actual issue isn't this specifically, but that 1.9 creates a type unstable newstructv call, which we dont handle in any version. This isn't the case for lower versions.

@wsmoses
Copy link
Member

wsmoses commented Oct 5, 2022

ERROR: LoadError: Enzyme: Not yet implemented augmented forward for jl_new_struct
Stacktrace:
 [1] Val
   @ ./essentials.jl:793
 [2] Val
   @ ./essentials.jl:795
 [3] dyn_mwe
   @ ~/git/Enzyme.jl/dval.jl:5
 [4] dyn_mwe
   @ ~/git/Enzyme.jl/dval.jl:0
Stacktrace:
 [1] top-level scope
   @ show.jl:1128
in expression starting at /home/wmoses/git/Enzyme.jl/dval.jl:7

@wsmoses wsmoses closed this as completed Oct 6, 2022
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