-
-
Couldn't load subscription status.
- Fork 216
Open
Labels
Description
This test used to pass on julia < 1.12:
using Zygote, Test
julia> global_r = 1
1
julia> function pow_global(x, n)
global global_r
while n > 0
global_r *= x
n -= 1
end
return global_r
end
pow_global (generic function with 1 method)
julia> @test gradient(pow_global, 2, 3) == (12, nothing)Now the returned gradient is (nothing, nothing) instead.