[PyOpenCL] Problem with transfer with cast to float32 using ATI Stream SDK

Andreas Kloeckner lists at informa.tiker.net
Mon Nov 22 16:22:41 PST 2010


Hi Jan,

On Mon, 22 Nov 2010 17:17:04 +0100, Jan Meinke <j.meinke at fz-juelich.de> 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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.tiker.net/pipermail/pyopencl/attachments/20101122/70c112b9/attachment.pgp>


More information about the PyOpenCL mailing list