Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion test/ad/adjoints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2834,13 +2834,17 @@ end
),
)
names = (Regex("kernel is a .*$(nameof(W))"), r"coupling is a .*Symmetric")
# On Julia 1.12 Enzyme reverse doubles the cotangents read through
# `Symmetric` of a sparse matrix, without the package
# (https://github.com/EpiAware/ComposableRecurrences.jl/issues/931#issuecomment-7409355615).
broken = (false, backend isa AutoEnzyme && VERSION < v"1.13")
empty!(CR._PLAIN_NOTED)
empty!(CR._PLAIN_SEEN)
@testset "named container $i" for (i, model) in enumerate(told)
l = Loss(model)
calls = CR._PULLBACK_CALLS[]
got = @test_logs (:info, names[i]) match_mode = :any gradient(l, backend, θ)
@test got ≈ ForwardDiff.gradient(l, θ) rtol = 1.0e-8
@test got ≈ ForwardDiff.gradient(l, θ) rtol = 1.0e-8 broken = broken[i]
@test CR._PULLBACK_CALLS[] == calls
@test_logs gradient(l, backend, θ)
end
Expand Down
Loading