Skip to content

Commit

Permalink
Fix bug in handling Keylov solvers
Browse files Browse the repository at this point in the history
  • Loading branch information
sharanry authored and ChrisRackauckas committed Nov 7, 2023
1 parent 5abd3f2 commit 4265053
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ext/LinearSolveEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.solve!)},
if RT <: Const
return res
end
if linsolve.alg isa LinearSolve.AbstractKrylovSubspaceMethod
if linsolve.val.alg isa LinearSolve.AbstractKrylovSubspaceMethod
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")
end
b = deepcopy(linsolve.val.b)
Expand Down
3 changes: 1 addition & 2 deletions test/enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,7 @@ for alg in (
RFLUFactorization(),
# KrylovJL_GMRES(), fails
)
alg_str = string(alg)
@show alg_str
@show alg
function fb(b)
prob = LinearProblem(A, b)

Expand Down

0 comments on commit 4265053

Please sign in to comment.