 <p>After using the GPU, you should <a href="http://www.mathworks.com/help/distcomp/reset.html" rel="nofollow">reset the gpu</a> with <code>reset</code> which will </p> <pre><code>dev = gpuDevice(gpu_id); % Do lots of stuff reset(dev) </code></pre> <p>Or you could release the device using empty (<code>[]</code>) inputs</p> <pre><code>gpuDevice([]) </code></pre>