JuliaGPU / Adapt.jl

Other
86 stars 24 forks source link

ERROR:Mutating arrays, backpass for adapt Float64 -> Float32 #43

Open KirillZubov opened 3 years ago

KirillZubov commented 3 years ago
using Zygote, Adapt #v3.3.0
f(x,p) = sum(sin.(adapt(typeof(p),x).* p))
x = [1.5,2.0]
function testf(p)
    f(x,p)
end
p = [1.5f0,2.0f0]
dp1 = Zygote.gradient(testf,p)
ERROR: Mutating arrays is not supported
maleadt commented 3 years ago

I'm not sure what the issue is here; this MWE uses Zygote, and reports a Zygote error. Please provide an Adapt-only MWE and describe the issue / the expected behavior.