Skip to content

Commit

Permalink
Permit autodiff thunk to use provided RT
Browse files Browse the repository at this point in the history
  • Loading branch information
William Moses committed Dec 15, 2024
1 parent 95c3fcc commit fbc05f7
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/Enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1381,10 +1381,13 @@ result, ∂v, ∂A

TT = Tuple{args...}

primal_tt = Tuple{map(eltype, args)...}
rt0 = Compiler.primal_return_type(mode, eltype(FA), primal_tt)

rt = Compiler.remove_innerty(A2){rt0}
rt = if A2 isa UnionAll
primal_tt = Tuple{map(eltype, args)...}
rt0 = Compiler.primal_return_type(mode, eltype(FA), primal_tt)
A2{rt0}
else
A2
end

primal_ptr = Compiler.deferred_codegen(
FA,
Expand Down

0 comments on commit fbc05f7

Please sign in to comment.