# Monitoring GPU activity asynchronously (read data from the GPU)

**URL:** <https://discourse.julialang.org/t/monitoring-gpu-activity-asynchronously-read-data-from-the-gpu/65496>\
**Category:** General Usage\
**Tags:** cuda\
**Created:** [July 29, 2021, 2:36pm UTC](https://discourse.julialang.org/t/monitoring-gpu-activity-asynchronously-read-data-from-the-gpu/65496 "2021-07-29T14:36:50Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gil](https://avatars.discourse-cdn.com/v4/letter/g/9fc29f/32.png) [@gil](https://discourse.julialang.org/u/gil)\
**Post date:** [July 29, 2021, 2:36pm UTC](https://discourse.julialang.org/t/monitoring-gpu-activity-asynchronously-read-data-from-the-gpu/65496/1 "2021-07-29T14:36:50Z")

</div>

Hi,  
Is there a way to continuously read a data array from the GPU (such as print it) while a kernel continues to update that data? in effect monitoring the kernel activity?  
for instance, I want a long-running kernel to do its calculations and put the best results in an array that can be shown during the run.  
Afterwards, maybe even calibrating (putting back) some parameters in real-time on the GPU to affect the calculations.  
Thanks,  
Gil

---

<div class="post-metadata">

**Author:** ![maleadt](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/maleadt/32/10097_2.png) [@maleadt](https://discourse.julialang.org/u/maleadt)\
**Post date:** [July 30, 2021, 8:59am UTC](https://discourse.julialang.org/t/monitoring-gpu-activity-asynchronously-read-data-from-the-gpu/65496/2 "2021-07-30T08:59:05Z")

</div>

Memory copies are stream-ordered operations, that mean they will execute after the kernel finishes. If you don’t want that, you can perform the copy on a different stream. The easiest way to do so, is by performing the copy from another task. See [CUDA.jl 3.0 | Tim Besard | JuliaCon2021 - YouTube](https://www.youtube.com/watch?v=fw0R5G8pB0U)
