Cuda select device and memory


Assume I have two GPUs

I select the first one using cudaselectdevice and copy some stuff to the GPU

Then I selected the second one and I copy some other stuff to the GPU

If I then select the first GPU again using cudaselectdevice and try to access what I copied in the beginning, will it still be there?

Thanks !

Yes, it will still be there. (wouldn’t this be easy enough just to try it and see?)

And the call is cudaSetDevice()