title: How can I flush GPU memory using CUDA (physical reset is unavailable)
body: <p>My CUDA program crashed during execution, before memory was flushed. As a result, device memory remained occupied.</p>
  
  <p>I'm running on a GTX 580, for which <code>nvidia-smi --gpu-reset</code> is not supported.</p>
  
  <p>Placing <code>cudaDeviceReset()</code> in the beginning of the program is only affecting the current context created by the process and doesn't flush the memory allocated before it.</p>
  
  <p>I'm accessing a Fedora server with that GPU remotely, so physical reset is quite complicated. </p>
  
  <p>So, the question is - Is there any way to flush the device memory in this situation?</p>