(SOLVED) Is a staging buffer created with cudaHostAlloc visible to all devices?

I have 3 GPUs.

I want to have 1 staging buffer with a size of 4 GB that I created with cudaHostAlloc while the device was set to 0 (zero). Can I safely pass the memory reference returned by cudaHostAlloc to the other devices?


You should be able to take a single allocation created with cudaHostAlloc and make it available simultaneously to all GPUs in the system.

@t3l, see: Portable Memory

Oh, I see. So if I create it with that flag it should be possible, even without having unified memory. Cool. I’ll try it out!