title: CUDA process life time
body: <p>It seems I didn't understand something essential about CUDA. I am using a C++ GUI application to start some kernels on a dual GPU card. When I start the host process, no  process is listed by <code>nvidia-smi</code>. This is expected because the host process waits until I click a button before it uses CUDA and starts the kernels. If I push the button, the two kernels run fine on both GPUs, exit and return the expected results. The host process then is listed two times by <code>nvidia-smi</code>, once for each GPU. Both processes are visible in <code>nvidia-smi</code> until I exit the host process.</p>
  <p>I am a bit confused since there is no such thing as a <code>cudaOpen()</code> or <code>cudaClose()</code> function (or a similar function pair).</p>
  <p>Which CUDA API call(s) cause a process to be listed by <code>nvidia-smi</code>? Which CUDA API call(s) cause a process to be dropped from the list?</p>