Skip to content

Commit

Permalink
chore: move error message back
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaLGandhi committed Jun 27, 2024
1 parent 783cc82 commit 26d1465
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions src/concrete_solve.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1105,21 +1105,6 @@ function DiffEqBase._concrete_solve_adjoint(
sol, forward_sensitivity_backpass
end

const ENZYME_TRACKED_REAL_ERROR_MESSAGE = """
`Enzyme` is not compatible with `ReverseDiffAdjoint` nor with `TrackerAdjoint`.
Either choose a different adjoint method like `GaussAdjoint`,
or use a different AD system like `ReverseDiff`.
For more details, on these methods see
https://docs.sciml.ai/SciMLSensitivity/stable/.
"""

struct EnzymeTrackedRealError <: Exception
end

function Base.showerror(io::IO, e::EnzymeTrackedRealError)
println(io, ENZYME_TRACKED_REAL_ERROR_MESSAGE)
end

function DiffEqBase._concrete_solve_adjoint(
prob::Union{SciMLBase.AbstractDiscreteProblem,
SciMLBase.AbstractODEProblem,
Expand Down Expand Up @@ -1158,6 +1143,21 @@ function DiffEqBase._concrete_solve_adjoint(
p)
end

const ENZYME_TRACKED_REAL_ERROR_MESSAGE = """
`Enzyme` is not compatible with `ReverseDiffAdjoint` nor with `TrackerAdjoint`.
Either choose a different adjoint method like `GaussAdjoint`,
or use a different AD system like `ReverseDiff`.
For more details, on these methods see
https://docs.sciml.ai/SciMLSensitivity/stable/.
"""

struct EnzymeTrackedRealError <: Exception
end

function Base.showerror(io::IO, e::EnzymeTrackedRealError)
println(io, ENZYME_TRACKED_REAL_ERROR_MESSAGE)
end

function DiffEqBase._concrete_solve_adjoint(
prob::Union{SciMLBase.AbstractDiscreteProblem,
SciMLBase.AbstractODEProblem,
Expand Down

0 comments on commit 26d1465

Please sign in to comment.