Skip to content

Commit

Permalink
Update enzyme.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored and maleadt committed Dec 10, 2024
1 parent 4192cf8 commit 363d900
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions test/extensions/enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,7 @@ sumabs2(x) = sum(abs2.(x))
@testset "Reverse sum abs2" begin
x = CuArray([1.0, 2.0, 3.0, 4.0])
dx = CuArray([0., 0.0, 0.0, 0.0])
f(x) = sum(abs2.(x))
Enzyme.autodiff(Reverse, f, Active, Duplicated(x, dx))
Enzyme.autodiff(Reverse, sumabs2, Active, Duplicated(x, dx))
@test all(dx .≈ 2 .* x)
end

Expand Down

0 comments on commit 363d900

Please sign in to comment.