Skip to content

Commit 58275d7

Browse files
committed
fix: deepcopy :P
1 parent 8aa273f commit 58275d7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Enzyme.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ function overload_autodiff(
299299
mode::CMode, f::FA, args::Vararg{Annotation,Nargs}
300300
) where {CMode<:Mode,FA<:Annotation,Nargs}
301301
# need to guess the correct activity here. Execute the function, we will DCE it
302-
res = call_with_reactant(f.val, [x.val for x in args]...)
302+
# XXX: DONT MERGE
303+
res = call_with_reactant(deepcopy(f.val), [deepcopy(x.val) for x in args]...)
303304
return overload_autodiff(
304305
mode, f, Enzyme.guess_activity(Core.Typeof(res), mode), args...
305306
)

0 commit comments

Comments
 (0)