# How to copy array back from GPU do CPU?

**URL:** <https://discourse.julialang.org/t/how-to-copy-array-back-from-gpu-do-cpu/110802>\
**Category:** GPU\
**Created:** [February 26, 2024, 6:56pm UTC](https://discourse.julialang.org/t/how-to-copy-array-back-from-gpu-do-cpu/110802 "2024-02-26T18:56:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gregstrq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregstrq/32/20620_2.png) [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Post date:** [February 26, 2024, 6:56pm UTC](https://discourse.julialang.org/t/how-to-copy-array-back-from-gpu-do-cpu/110802/1 "2024-02-26T18:56:44Z")

</div>

Let’s say I have a done a computation on a GPU.  
How do I copy this data back to the CPU, so that I can play around with it on CPU (like make the plots) and save it to disk (more important for me)?

---

<div class="post-metadata">

**Author:** ![carstenbauer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/carstenbauer/32/4981_2.png) [@carstenbauer](https://discourse.julialang.org/u/carstenbauer)\
**Post date:** [February 26, 2024, 8:02pm UTC](https://discourse.julialang.org/t/how-to-copy-array-back-from-gpu-do-cpu/110802/2 "2024-02-26T20:02:30Z")

</div>

Just convert from CuArray to Array.

---

<div class="post-metadata">

**Author:** ![Gregstrq](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gregstrq/32/20620_2.png) [@Gregstrq](https://discourse.julialang.org/u/Gregstrq)\
**Post date:** [February 26, 2024, 8:59pm UTC](https://discourse.julialang.org/t/how-to-copy-array-back-from-gpu-do-cpu/110802/3 "2024-02-26T20:59:45Z")

</div>

Nice, thank you. I have tried to copy from gpu array to the cpu one, to no avail.
