From 9b0f8aee174e7ced178a5a36d9759b70807f2977 Mon Sep 17 00:00:00 2001 From: Avik Pal Date: Tue, 24 Sep 2024 20:23:15 -0400 Subject: [PATCH] fix: handle AD materialization --- src/core/generalized_first_order.jl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/generalized_first_order.jl b/src/core/generalized_first_order.jl index aa42da8f4..891e4751c 100644 --- a/src/core/generalized_first_order.jl +++ b/src/core/generalized_first_order.jl @@ -202,6 +202,8 @@ function SciMLBase.__init( linesearch_ad = alg.forward_ad === nothing ? (alg.reverse_ad === nothing ? alg.jacobian_ad : alg.reverse_ad) : alg.forward_ad + linesearch_ad = get_concrete_forward_ad( + linesearch_ad, prob, False; check_forward_mode = false) linesearch_cache = init( prob, alg.linesearch, fu, u; stats, autodiff = linesearch_ad, kwargs...) GB = :LineSearch