On Mon, 14 Feb 2011 22:15:22 +0100, Tomasz Rybak <bogomips(a)post.pl> wrote:
Added to the FAQ, also decided to add to
see attached diff.
Actually, stop the presses. I just analyzed the situation in a bit more
detail. Turns out that detach() should get called automatically. It
isn't, because context_dependent_memoize-decorated functions hold onto
context refs. But now we have pycuda.tools.clear_context_caches() to
release those references, which, in my experiments, does the trick. Even
better, autoinit's cleanup calls this automatically for you.