Skip to content

Commit

Permalink
[EnzymeExt] Prefix AbstractKrylovSubspaceMethod to avoid undefvarerror
Browse files Browse the repository at this point in the history
  • Loading branch information
enigne committed Oct 25, 2023
1 parent 4ee3e1e commit 99ff84f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/LinearSolveEnzymeExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ function EnzymeCore.EnzymeRules.reverse(config, func::Const{typeof(LinearSolve.s
_linsolve.cacheval' \ dy
elseif _linsolve.cacheval isa Tuple && _linsolve.cacheval[1] isa Factorization
_linsolve.cacheval[1]' \ dy
elseif _linsolve.alg isa AbstractKrylovSubspaceMethod
elseif _linsolve.alg isa LinearSolve.AbstractKrylovSubspaceMethod

Check warning on line 147 in ext/LinearSolveEnzymeExt.jl

View check run for this annotation

Codecov / codecov/patch

ext/LinearSolveEnzymeExt.jl#L147

Added line #L147 was not covered by tests
# Doesn't modify `A`, so it's safe to just reuse it
invprob = LinearSolve.LinearProblem(transpose(_linsolve.A), dy)
solve(invprob;
Expand All @@ -163,4 +163,4 @@ function EnzymeCore.EnzymeRules.reverse(config, func::Const{typeof(LinearSolve.s
return (nothing,)
end

end
end

0 comments on commit 99ff84f

Please sign in to comment.