-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
The current implementation of the TileArray constructor tries to take the pointer of an AbstractArray, which for a PermutedDimsArray around a CuArray errors:
julia> pointer(PermutedDimsArray(CUDA.rand(2, 3), (2, 1)))
ERROR: ArgumentError: Illegal conversion of a CUDA.DeviceMemory to a Ptr{Float32}
Stacktrace:
[1] convert(T::Type{Ptr{Float32}}, mem::CUDA.DeviceMemory)
@ CUDA ~/.julia/packages/CUDA/FJf6p/lib/cudadrv/memory.jl:16
[2] convert(::Type{Ptr{Float32}}, managed::CUDA.Managed{CUDA.DeviceMemory})
@ CUDA ~/.julia/packages/CUDA/FJf6p/src/memory.jl:583
[3] unsafe_convert(typ::Type{Ptr{Float32}}, x::CuArray{Float32, 2, CUDA.DeviceMemory})
@ CUDA ~/.julia/packages/CUDA/FJf6p/src/array.jl:464
[4] pointer(x::PermutedDimsArray{Float32, 2, (2, 1), (2, 1), CuArray{Float32, 2, CUDA.DeviceMemory}})
@ Base ./abstractarray.jl:1255
[5] top-level scope
@ REPL[8]:1Is this intentional, or a missing method in CUDA / GPUArrays? pointer(parent(A)) works as intended.
Metadata
Metadata
Assignees
Labels
No labels