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
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.