We have an application where two processes are mapped to a same GPU. In each process, we call
cudaDeviceSynchronize() to check CUDA error messages. We saw weird GPU error from running the two processes. I am suspecting if calling
cudaDeviceSynchronize() simultaneously caused the GPU error. Maybe calling
cudaStreamSynchronize() is a better idea? Can someone confirm my guess?
I noticed this answer. From this, I understand that “device” is also a logic concept per process if MPS is not enabled. Then what if MPS is enabled?