Skip to content

Commit

Permalink
add test for Checkpointing.jl failure
Browse files Browse the repository at this point in the history
  • Loading branch information
vchuravy committed Dec 10, 2021
1 parent c80944d commit 7956b45
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -564,3 +564,26 @@ end

main()
end

@testset "Arrays are double pointers" begin
@noinline function func_scalar(X)
return X
end

function timsteploop_scalar(FH1)
G = Float64[FH1]
k1 = @inbounds func_scalar(G[1])
return k1
end
@test Enzyme.autodiff(timsteploop_scalar, Active(2.0))[1] 1.0

@noinline function func(X)
return @inbounds X[1]
end
function timsteploop(FH1)
G = Float64[FH1]
k1 = func(G)
return k1
end
@test Enzyme.autodiff(timsteploop, Active(2.0))[1] 1.0
end

0 comments on commit 7956b45

Please sign in to comment.