-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Description
Turns out Flatten.jl has something similar: Flatten.modify(CuArray, obj, Array). Doesn't use rules, instead eagerly tries to reconstruct objects by calling constructure. That doesn't always work of course:
julia> Flatten.modify(CuArray, view(rand(2,2),:,:), Array)
ERROR: MethodError: no method matching SubArray(::CuArray{Float64,2}, ::Tuple{Base.Slice{Base.OneTo{Int64}},Base.Slice{Base.OneTo{Int64}}}, ::Int64, ::Int64)
Furthermore, we currently need the WrappedArray dispatch rules, but once we have Base.AbstractWrappedArray (JuliaLang/julia#31563) we should investigate using this.
Metadata
Metadata
Assignees
Labels
No labels