Giving hint to Cuda unified memory

Hi all,

I am wondering that is there a way to give hint about data movement to cuda unified memory runtime ? For example in given workflow, I init and compute data in gpu. When computation is finished (after for loop), I will read data on the host. What would be cuda uma runtime behaviour ?

My workflow is
Init<<< >>> ()
for(0 … N)
Compute<<< >>>()

Thanks in advance

CUDA 8.0 introduces new hints for CUDA Unified Memory (UM). CUDA 7.5 has some UM hinting related to stream attach.

You may want to read the CUDA programming guide section on UM which currently will cover the stream attach mechanics.

For the new features in CUDA 8, I would suggest:

specifically, the cudaMemAdvise API.