This repository was archived by the owner on Mar 12, 2021. It is now read-only.

Description
similar gives an Array not a CuArray, when acting on a PermutedDimsArray:
julia> similar(PermutedDimsArray(cu(rand(2,2)), (2,1)), 3,3)
3×3 Array{Float32,2}:
...
julia> similar(cu(rand(2,2))', 3,3) # Adjoint is fine
3×3 CuArray{Float32,2,Nothing}:
I'm not certain but it looks like LinearAlgebra may un-wrap Adjoint before calling similar, in which case the difference isn't originating in any JuliaGPU package. Where should the correction live?
Build log, etc
julia> Pkg.build()
Building NNlib → `~/.julia/packages/NNlib/FAI3o/deps/build.log`
false
julia> versioninfo()
Julia Version 1.3.0
Commit 46ce4d7933 (2019-11-26 06:09 UTC)
Platform Info:
OS: macOS (x86_64-apple-darwin19.0.0)
CPU: Intel(R) Core(TM) i7-8700 CPU @ 3.20GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_NUM_THREADS = 12
(cu) pkg> st
Status `~/trash/cu/Project.toml`
[3895d2a7] CUDAapi v4.0.0 #master (https://github.com/JuliaGPU/CUDAapi.jl.git)
[c5f51814] CUDAdrv v6.2.2 #master (https://github.com/JuliaGPU/CUDAdrv.jl.git)
[be33ccc6] CUDAnative v3.0.2 #master (https://github.com/JuliaGPU/CUDAnative.jl.git)
[3a865a2d] CuArrays v2.0.1 [`~/.julia/dev/CuArrays`]
[0c68f7d7] GPUArrays v3.1.0 #master (https://github.com/JuliaGPU/GPUArrays.jl.git)
[872c559c] NNlib v0.6.6
julia> CuArrays.version()
v"10.1.243"