Skip to content

Commit d302f41

Browse files
authored
Update test.jl
1 parent 78895ed commit d302f41

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

  • DifferentiationInterface/test/Back/Mooncake

DifferentiationInterface/test/Back/Mooncake/test.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,22 @@ test_differentiation(
2828
logging = LOGGING,
2929
);
3030

31+
EXCLUDED = @static if VERSION v"1.11-" && VERSION v"1.12-"
32+
# testing only :hessian on 1.11 due to an opaque closure bug.
33+
# This is potentially the same issue as discussed in
34+
# https://github.com/chalk-lab/MistyClosures.jl/pull/12#issue-3278662295
35+
[FIRST_ORDER..., :hvp, :second_derivative],
36+
else
37+
[FIRST_ORDER...],
38+
end
39+
40+
# Test second-order differentiation (forward-over-reverse)
41+
test_differentiation(
42+
[SecondOrder(AutoMooncakeForward(; config=nothing), AutoMooncake(; config=nothing))],
43+
excluded=EXCLUDED
44+
logging=true,
45+
)
46+
3147
@testset "NamedTuples" begin
3248
ps = (; A = rand(5), B = rand(5))
3349
myfun(ps) = sum(ps.A .* ps.B)

0 commit comments

Comments
 (0)