Open vpuri3 opened 11 months ago
However,
julia> f = x -> sum(x.a)
#47 (generic function with 1 method)
julia> ForwardDiff.jacobian(x -> Zygote.gradient(f, x)[1], p)
4×4 Matrix{Float64}:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
julia> ForwardDiff.jacobian(x -> Zygote.gradient(f, x)[1], p |> cu)
4×4 CuArray{Float32, 2, CUDA.Mem.DeviceBuffer}:
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
0.0 0.0 0.0 0.0
Looks like it's a problem with Zygote's forward_jacobian