Skip to content

Commit 923eca4

Browse files
committed
Codecov
1 parent 606b895 commit 923eca4

2 files changed

Lines changed: 8 additions & 11 deletions

File tree

  • DifferentiationInterface

DifferentiationInterface/src/second_order/hvp.jl

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -172,16 +172,12 @@ function _prepare_hvp_aux(
172172
grad_buffer = similar(x)
173173
rewrap = Rewrap(contexts...)
174174
# Inner gradient
175-
inner_gradient_prep = let
176-
xo = overloaded_input(pushforward, shuffled_gradient, outer(backend), x, tx)
177-
prepare_gradient(f, inner(backend), xo, contexts...)
178-
end
179-
inner_gradient_in_prep = let
180-
xo = overloaded_input(
181-
pushforward, shuffled_gradient!, grad_buffer, outer(backend), x, tx
182-
)
183-
prepare_gradient(f, inner(backend), xo, contexts...)
184-
end
175+
xo = overloaded_input(pushforward, shuffled_gradient, outer(backend), x, tx)
176+
xoi = overloaded_input(
177+
pushforward, shuffled_gradient!, grad_buffer, outer(backend), x, tx
178+
)
179+
inner_gradient_prep = prepare_gradient(f, inner(backend), xo, contexts...)
180+
inner_gradient_in_prep = prepare_gradient(f, inner(backend), xoi, contexts...)
185181
# Outer pushforward
186182
new_contexts = (
187183
FunctionContext(f),

DifferentiationInterface/test/Core/SimpleFiniteDiff/test.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ LOGGING = get(ENV, "CI", "false") == "false"
1111

1212
backends = [ #
1313
AutoSimpleFiniteDiff(; chunksize=5),
14+
AutoForwardFromPrimitive(AutoSimpleFiniteDiff(; chunksize=4)),
1415
AutoReverseFromPrimitive(AutoSimpleFiniteDiff(; chunksize=4)),
1516
]
1617

@@ -68,7 +69,7 @@ end
6869
test_differentiation(
6970
second_order_hvp_backends;
7071
excluded=vcat(FIRST_ORDER, :hessian, :second_derivative),
71-
logging=true,
72+
logging=LOGGING,
7273
)
7374

7475
test_differentiation(backends, complex_scenarios(); logging=LOGGING)

0 commit comments

Comments
 (0)