Collecting events and metrics with CUPTI from a separate process?

I know CUPTI is the interface to collect events and metrics of a GPU-accelerated application.
However, is it required that the profiling process that uses CUPTI must be the same process of the target application to be profiled? Say the target process is from third-party and only binary is available, can I launch a separate profiling process to get all the events/metrics of the target process via CUPTI? If yes, is are there any restrictions?

you can use nvprof to do this

I found nvprof fail to profile the third-party app in my case, (trapped in a kernel replaying deadloop).
So I have to use CUPTI for profiling it, not sure calling CUPTI from a separate process will cause any trouble or limitation.