Skip to content

Commit

Permalink
fix: remaining tests from the migration
Browse files Browse the repository at this point in the history
  • Loading branch information
avik-pal committed Oct 3, 2024
1 parent a25aec4 commit b2d061a
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
4 changes: 4 additions & 0 deletions src/core/generalized_first_order.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@ function SciMLBase.__init(
linesearch_ad = alg.forward_ad === nothing ?
(alg.reverse_ad === nothing ? alg.jacobian_ad :
alg.reverse_ad) : alg.forward_ad
if linesearch_ad !== nothing && iip && !DI.check_inplace(linesearch_ad)
@warn "$(linesearch_ad) doesn't support in-place problems."
linesearch_ad = nothing
end
linesearch_ad = get_concrete_forward_ad(
linesearch_ad, prob, False; check_forward_mode = false)
linesearch_cache = init(
Expand Down
16 changes: 11 additions & 5 deletions test/gpu/core_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,19 @@

prob = NonlinearProblem(linear_f, u0)

SOLVERS = (NewtonRaphson(), LevenbergMarquardt(; linsolve = QRFactorization()),
LevenbergMarquardt(; linsolve = KrylovJL_GMRES()), PseudoTransient(),
Klement(), Broyden(; linesearch = LiFukushimaLineSearch()),
SOLVERS = (
NewtonRaphson(),
LevenbergMarquardt(; linsolve = QRFactorization()),
LevenbergMarquardt(; linsolve = KrylovJL_GMRES()),
PseudoTransient(),
Klement(),
Broyden(; linesearch = LiFukushimaLineSearch()),
LimitedMemoryBroyden(; threshold = 2, linesearch = LiFukushimaLineSearch()),
DFSane(), TrustRegion(; linsolve = QRFactorization()),
DFSane(),
TrustRegion(; linsolve = QRFactorization()),
TrustRegion(; linsolve = KrylovJL_GMRES(), concrete_jac = true), # Needed if Zygote not loaded
nothing)
nothing
)

@testset "[IIP] GPU Solvers" begin
for alg in SOLVERS
Expand Down

0 comments on commit b2d061a

Please sign in to comment.