pyopencl
pyopencl copied to clipboard
SVM deallocation should wait for completion of operations on them
(Normal Buffer
s do that implicitly.)
- For in-order queues, a simple solution would be holding a reference to the queue that was last used to operate on the SVM, and using that to
enqueue_release
when it goes out of scope. - For out-of-order queues, we could hold on to a bounded number of events, waiting on the ones that get booted out.
- Should this be mandatory or optional behavior?
#447 is a very similar problem that can probably reuse the solution for this.