Hi Jan,

On Mon, 22 Nov 2010 17:17:04 +0100, Jan Meinke <[email protected]> wrote:
>     cl.enqueue_write_buffer(queue, a_dev, orig.astype(np.float32))

This is your bug. The memory that e_w_b reads from has to be kept alive
until the transfer finishes. In this case, the garbage collector throws
it away right after you start the transfer.

I'm wondering whether we should default cl.enqueue_write_buffer's
is_blocking to True, which would eliminate this whole class of
problems. FWIW, I've been bitten by this same issue. Opinions? Ideas on
how to do this without breaking API? (Rename e_w_b?)

HTH,
Andreas

Attachment: pgpihnEWVYtZe.pgp
Description: PGP signature

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to