Getting data from device while kernel is still running

Hi,
I have a long-running kernel and want to monitor (on the host) some values while it is still running.
How do I do it in an efficient way? without stopping or delaying the running kernel?
Thanks,
GHK

Like this: GitHub - gmarkall/numba-kernel-progress: A progress bar controlled by a running CUDA kernel compiled with Numba :slight_smile: