Skip to content

Commit eeb4a17

Browse files
committed
fix: speed up Mooncake by avoiding tuple broadcasting
1 parent f8ffd05 commit eeb4a17

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/forward_onearg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function DI.value_and_pushforward(
4747
return y, dy
4848
end
4949
y = first(ys_and_ty[1])
50-
ty = last.(ys_and_ty)
50+
ty = map(last, ys_and_ty)
5151
return y, ty
5252
end
5353

DifferentiationInterface/ext/DifferentiationInterfaceMooncakeExt/onearg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function DI.value_and_pullback(
5555
y, _copy_output(new_dx)
5656
end
5757
y = first(ys_and_tx[1])
58-
tx = last.(ys_and_tx)
58+
tx = map(last, ys_and_tx)
5959
return y, tx
6060
end
6161

0 commit comments

Comments
 (0)