Skip to content

Commit

Permalink
Only test on 1.9+
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Mar 27, 2024
1 parent b2835c3 commit 7b3961b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/libraries/enzyme.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
using Enzyme

@static if isdefined(Base, :get_extension)

function square_kernel!(x)
i = threadIdx().x
x[i] *= x[i]
Expand Down Expand Up @@ -29,3 +31,5 @@ dA2 .= 3
Enzyme.autodiff(Forward, square!, BatchDuplicated(A, (dA, dA2)))
@test all(dA .≈ (2:2:64))
@test all(dA2 .≈ 3*(2:2:64))

end

0 comments on commit 7b3961b

Please sign in to comment.