How can I get the PID onGPU of the current program in code?

I want to get the process number of the current program in my code. Is there any related interface?