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
signature.asc
Description: PGP signature
_______________________________________________ PyOpenCL mailing list -- pyopencl@tiker.net To unsubscribe send an email to pyopencl-le...@tiker.net