Skip to content

Commit

Permalink
invalidation for inactive now works
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 4, 2024
1 parent 6ffb629 commit 45d8c41
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions test/ruleinvalidation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,14 @@ for m in methods(forward, Tuple{Any,Const{typeof(issue696)},Vararg{Any}})
end
@test autodiff(Forward, issue696, Duplicated(1.0, 1.0))[1] 2.0
@static if VERSION < v"1.11-"
@test_broken autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 2.0
@test_broken autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 2.0
else
@test autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 2.0
@test autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 2.0
end

# now test invalidation for `inactive`
inactive(::typeof(issue696), args...) = nothing
@test autodiff(Forward, issue696, Duplicated(1.0, 1.0))[1] 0.0
@static if VERSION < v"1.11-"
@test_broken autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 0.0
else
@test autodiff(Forward, call_issue696, Duplicated(1.0, 1.0))[1] 0.0
end

end # module

0 comments on commit 45d8c41

Please sign in to comment.