Skip to content

Commit 397cabd

Browse files
gix gpu_grad_test
1 parent a9618af commit 397cabd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/cuda/layers.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ function gpu_gradtest(name::String, layers::Vector, x_cpu = nothing, args...; te
5959
end
6060
@test gs_gpu isa Flux.Zygote.Grads
6161
for (p_cpu, p_gpu) in zip(ps_cpu, ps_gpu)
62-
if isnothing(xg_cpu)
63-
@test isnothing(xg_gpu)
62+
if isnothing(gs_cpu[p_cpu])
63+
@test isnothing(gs_gpu[p_gpu])
6464
else
6565
@test gs_gpu[p_gpu] isa Flux.CUDA.CuArray
6666
if test_cpu

0 commit comments

Comments
 (0)