Dot operators of hcat failed for CuArray


I’m trying to combining elements with the same locations from two arrays. It’s easy to do that with dot hcat like this.

a = randn(5,2)
b = randn(5,2)

When I store my arrays in GPU as CuArray, it won’t work, and seems that element-wise procedure could be done in CPU only.

a = gpu(randn(5,2))
b = gpu(randn(5,2))

I was wondering whether I missed anything here and many thanks for any advices.

This makes a 5×2 Matrix{Matrix{Float64}}. I don’t think arrays of arrays work well on the GPU, can you use tuple.(a,b) or cat(a,b; dims=3) instead?

Many thanks for your suggestions and I just realized that arrays of arrays won’t work on the GPU.