What's the expected behavior of calling cudaGetDevice when the process has no cuda context?

you can file a bug for documentation concerns.