Skip to content

Commit

Permalink
check_grad -> test_grad
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Mar 17, 2024
1 parent 60c0cd4 commit 767349e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/ext_enzyme/enzyme.jl
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function gradient_ez(f, x...)
return g
end

function check_grad(g1, g2; broken=false)
function test_grad(g1, g2; broken=false)
fmap_with_path(g1, g2) do kp, x, y
:state kp && return # ignore RNN and LSTM state
if x isa AbstractArray{<:Number}
Expand All @@ -59,8 +59,8 @@ function test_enzyme_grad(loss, model, x)
grads_flux = Flux.gradient(loss, model, x) |> cpu
grads_enzyme = gradient_ez(loss, model, x) |> cpu

# check_grad(grads_flux, grads_enzyme)
check_grad(grads_fd, grads_enzyme)
# test_grad(grads_flux, grads_enzyme)
test_grad(grads_fd, grads_enzyme)
end

@testset "gradient_ez" begin
Expand Down

0 comments on commit 767349e

Please sign in to comment.