multi GPU questions

I have a few questions about multi GPU programming.

  1. What is equivalent to “cudaSetDevice()” in driver mode?

  2. What’s the overhead of calling “cuCtxSetContext”? How expensive is it?

  3. When page-locked mapped memory is created, can all GPU
    devices access it directly or only the device which allocated it?

Thanks.

  1. cuCtxSetContext
  2. basically nothing
  3. all GPUs can access it if it is allocated with the portable flag OR you are running with unified virtual addressing enabled