Copy with CuArrays and `allowscalar(false)`

Hi,

I am using CuArrays but the following operation seems unsupported:

using CuArrays
x=rand(10) |> cu;
CuArrays.allowscalar(false)
V[:,1] .= x;

It gives:

ERROR: scalar getindex is disabled

Using copy! from link is troublesome because a CuArray does not have ptr in its struct.

Is there a way around?

Thank you for your help.

That’s a bug, it should use the buf field. Probably not covered by the tests.

Should I open an issue in CuArrays?

Yeah. Adapting the code should be pretty easy though, just look at the preceding functions. I can have a look in a couple of days, better open an issue not to lose track though.

@rveltz, @maleadt I just run into the same problem when trying to prepare some high-level CuArrays example code. Has this been solved already meanwhile (I had to downgrade the CUDA packages due to some issues, so I don’t know if it is fixed in the newest versions)? Could you put here the link to the corresponding issue?

Your issue is probably not related to this one, which has been fixed. Please open a bug report with the specific invocation that triggers scalar iteration.

@maleadt: you are absolutely right; it is a different issue. I created a bug report:
https://github.com/JuliaGPU/CuArrays.jl/issues/534