While profiling application with nvprof I found both PtoP and DtoD memcpy. I am not sure about the difference between these two.

While profiling application with nvprof I found both PtoP and DtoD memcpy. I am not sure about the difference between these two.

Device to device (DtoD) is a copy within a single GPU.
Peer to Peer (PtoP) is from one GPU to another.
The latter only happens in multi-GPU systems.
And for other transfers host refers to CPU, device refers to GPU.
The naming device to device transfer predates a lot of the work on multiple GPUs, otherwise the naming might have been a little different.