Le 22 oct. 2019 à 23:39, Andreas Kloeckner
<lists(a)informa.tiker.net> a écrit :
Yves Surrel <yves(a)surrel.org> writes:
I have been using PyOpenCL for two years now, and I am familiar to using it.
However, I do not understand why the following code is blocking at the last line…
The doc states that is_blocking is « available on any copy involving host memory"…
Any clue will be much appreciated.
Consider this hacked version of your code:
What's happening is that the enqueue_copy returns a "NannyEvent" that,
upon destruction, waits for the transfer to complete. In your original
code, the returned NannyEvent gets deleted as cl.enqueue_copy returns,
which waits for the transfer, and causes the apparent hang. My modified
version demonstrates that, as long as you hang on to the event returned
by the transfer, there won't be a hang.
PyOpenCL mailing list -- pyopencl(a)tiker.net
To unsubscribe send an email to pyopencl-leave(a)tiker.net