How can I change the memory copy pattern with Unified Memory?

When I used Unified Memory with managed, and check visual profiler.

A lot of memory copying occurs(HtoD, DtoH both), So I want to control them.

I think there are some functions that automatically copy data according to the situation

in the Unified memory environment then I change those functions.

I found some header only. Is there any way to access the driver api functions?

If you are using a pascal device, the cudaMemPrefetchAsync call may be of interest:

http://stackoverflow.com/questions/39782746/why-is-nvidia-pascal-gpus-slow-on-running-cuda-kernels-when-using-cudamallocmana/40011988#40011988

this copying is perfromed by driver rather than user-controlled functions