AMDGPU.jl icon indicating copy to clipboard operation
AMDGPU.jl copied to clipboard

Implement copy!()

Open torrance opened this issue 3 years ago • 3 comments

Given two arrays, eg. arr and arr_d, ensure copy!(arr_d, arr) does the right thing. Currently it complains on scalar indexing.

This should also work for both device to host, and device to device copies too.

This is implemented in CUDA.jl.

torrance avatar Mar 30 '22 03:03 torrance

This should already work: https://github.com/JuliaGPU/AMDGPU.jl/blob/bd8b4c400bd440c571beb33f9921be28323ce573/src/array.jl#L178-L214

Can you provide an MWE of where this doesn't work?

jpsamaroo avatar Mar 30 '22 14:03 jpsamaroo

Those snippets are copyto!(), not copy!(), right?

torrance avatar Mar 30 '22 14:03 torrance

What's the difference between copy! and copyto!? The docstring makes it sound very similar to copyto!.

jpsamaroo avatar Apr 01 '22 14:04 jpsamaroo

Scalar indexing no longer happens.

pxl-th avatar Dec 02 '23 18:12 pxl-th