Skip to content

Commit 65fff23

Browse files
Fix CuArray adapt
1 parent 0f92e18 commit 65fff23

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "ArrayInterface"
22
uuid = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
3-
version = "2.8.6"
3+
version = "2.8.7"
44

55
[deps]
66
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"

src/ArrayInterface.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ using Requires
44
using LinearAlgebra
55
using SparseArrays
66

7+
Base.@pure __parameterless_type(T) = Base.typename(T).wrapper
8+
parameterless_type(x) = parameterless_type(typeof(x))
9+
parameterless_type(x::Type) = __parameterless_type(x)
10+
711
function ismutable end
812

913
"""

src/cuarrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ function Base.setindex(x::CuArrays.CuArray,v,i::Int)
99
end
1010

1111
function restructure(x::CuArrays.CuArray,y)
12-
reshape(adapt(typeof(x),y),size(x)...)
12+
reshape(Adapt.adapt(parameterless_type(x),y),size(x)...)
1313
end

0 commit comments

Comments
 (0)