Skip to content

Commit 5abd3f2

Browse files
sharanryChrisRackauckas
authored andcommitted
Error on unsupported return type and relax tolerence on tests to avoid random failures
1 parent c14aeb2 commit 5abd3f2

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ext/LinearSolveEnzymeExt.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.init)}, :
2323
elseif RT <: Duplicated
2424
return Duplicated(res, dres)
2525
end
26+
error("Unsupported return type $RT")
2627
end
2728

2829
function EnzymeCore.EnzymeRules.forward(func::Const{typeof(LinearSolve.solve!)}, ::Type{RT}, linsolve::EnzymeCore.Annotation{LP}; kwargs...) where {RT, LP <: LinearSolve.LinearCache}

test/enzyme.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ for alg in (
193193
end |> collect
194194
@show en_jac
195195

196-
@test en_jac fd_jac rtol=1e-6
196+
@test en_jac fd_jac rtol=1e-4
197197

198198
function fA(A)
199199
prob = LinearProblem(A, b1)
@@ -213,5 +213,5 @@ for alg in (
213213
end |> collect
214214
@show en_jac
215215

216-
@test en_jac fd_jac rtol=1e-6
216+
@test en_jac fd_jac rtol=1e-4
217217
end

0 commit comments

Comments
 (0)