Got it! Thank you.

Really deserves some info in the doc.

Yves

> Le 22 oct. 2019 à 23:39, Andreas Kloeckner <li...@informa.tiker.net> a écrit :
> 
> Yves Surrel <y...@surrel.org> writes:
>> Hi
>> 
>> 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:
> https://gist.github.com/inducer/d3b103f755322afe0c876998408afba5
> 
> 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.
> 
> HTH,
> Andreas
> _______________________________________________
> PyOpenCL mailing list -- pyopencl@tiker.net
> To unsubscribe send an email to pyopencl-le...@tiker.net
_______________________________________________
PyOpenCL mailing list -- pyopencl@tiker.net
To unsubscribe send an email to pyopencl-le...@tiker.net

Reply via email to