Skip to content

Commit 4265053

Browse files
sharanryChrisRackauckas
authored andcommitted
Fix bug in handling Keylov solvers
1 parent 5abd3f2 commit 4265053

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

ext/LinearSolveEnzymeExt.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.solve!)},
3434
if RT <: Const
3535
return res
3636
end
37-
if linsolve.alg isa LinearSolve.AbstractKrylovSubspaceMethod
37+
if linsolve.val.alg isa LinearSolve.AbstractKrylovSubspaceMethod
3838
error("Algorithm $(_linsolve.alg) is currently not supported by Enzyme rules on LinearSolve.jl. Please open an issue on LinearSolve.jl detailing which algorithm is missing the adjoint handling")
3939
end
4040
b = deepcopy(linsolve.val.b)

test/enzyme.jl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,7 @@ for alg in (
173173
RFLUFactorization(),
174174
# KrylovJL_GMRES(), fails
175175
)
176-
alg_str = string(alg)
177-
@show alg_str
176+
@show alg
178177
function fb(b)
179178
prob = LinearProblem(A, b)
180179

0 commit comments

Comments
 (0)