Skip to content

Commit

Permalink
Apply suggestions from reviewdog
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
mhauru and github-actions[bot] authored Jun 28, 2024
1 parent 2163ec4 commit 8654475
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions test/ad/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -35,31 +35,35 @@ function test_ad(f, x, broken=(); rtol=1e-6, atol=1e-6)
if :EnzymeReverse in broken
@test(
collect(et, Enzyme.gradient(Enzyme.Forward, f, x)) finitediff,
rtol = rtol, atol = atol
rtol = rtol,
atol = atol
)
@test_broken(
Enzyme.gradient(Enzyme.Reverse, f, x) finitediff, rtol = rtol, atol = atol
)
elseif :EnzymeForward in broken
@test_broken(
collect(et, Enzyme.gradient(Enzyme.Forward, f, x)) finitediff,
rtol = rtol, atol = atol
rtol = rtol,
atol = atol
)
@test(
Enzyme.gradient(Enzyme.Reverse, f, x) finitediff, rtol = rtol, atol = atol
)
elseif :Enzyme in broken
@test_broken(
collect(et, Enzyme.gradient(Enzyme.Forward, f, x)) finitediff,
rtol = rtol, atol = atol
rtol = rtol,
atol = atol
)
@test_broken(
Enzyme.gradient(Enzyme.Reverse, f, x) finitediff, rtol = rtol, atol = atol
)
else
@test(
collect(et, Enzyme.gradient(Enzyme.Forward, f, x)) finitediff,
rtol = rtol, atol = atol
rtol = rtol,
atol = atol
)
@test(
Enzyme.gradient(Enzyme.Reverse, f, x) finitediff, rtol = rtol, atol = atol
Expand Down

0 comments on commit 8654475

Please sign in to comment.