diff --git a/Manifest.toml b/Manifest.toml index 5ff81d828..565532d53 100644 --- a/Manifest.toml +++ b/Manifest.toml @@ -8,9 +8,9 @@ version = "1.0.0" [[Adapt]] deps = ["LinearAlgebra"] -git-tree-sha1 = "42c42f2221906892ceb765dbcb1a51deeffd86d7" +git-tree-sha1 = "27edd95a09fd428113ca019c092e8aeca2eb1f2d" uuid = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" -version = "2.3.0" +version = "3.0.0" [[Libdl]] uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb" diff --git a/Project.toml b/Project.toml index df2182f4f..3d5e588d6 100644 --- a/Project.toml +++ b/Project.toml @@ -12,7 +12,7 @@ Serialization = "9e88b42a-f829-5b0c-bbe9-9e923198166b" [compat] AbstractFFTs = "0.4, 0.5, 1.0" -Adapt = "2.0" +Adapt = "2.0, 3.0" julia = "1.5" [extras] diff --git a/src/host/broadcast.jl b/src/host/broadcast.jl index e182e27c4..4d2ddf7b1 100644 --- a/src/host/broadcast.jl +++ b/src/host/broadcast.jl @@ -19,8 +19,8 @@ abstract type AbstractGPUArrayStyle{N} <: AbstractArrayStyle{N} end # Wrapper types otherwise forget that they are GPU compatible # NOTE: don't directly use GPUArrayStyle here not to lose downstream customizations. -BroadcastStyle(W::Type{<:WrappedGPUArray})= BroadcastStyle(parent(W){eltype(W), ndims(W)}) -backend(W::Type{<:WrappedGPUArray}) = backend(parent(W){eltype(W), ndims(W)}) +BroadcastStyle(W::Type{<:WrappedGPUArray})= BroadcastStyle(Adapt.parent(W){Adapt.eltype(W), Adapt.ndims(W)}) +backend(W::Type{<:WrappedGPUArray}) = backend(Adapt.parent(W){Adapt.eltype(W), Adapt.ndims(W)}) # Ref is special: it's not a real wrapper, so not part of Adapt, # but it is commonly used to bypass broadcasting of an argument