Hi Jan,

On Mon, 22 Nov 2010 09:04:03 +0100, "Meinke, Jan" <[email protected]> 
wrote:
> I have a problem with PyOpenCL using the ATI Stream SDK 2.2. I have a
> double precision ndarray a. I'm casting it to single precision using
> 
> a.astype(np.float32) before I transfer it to the device. If I allocate
> the buffer a_dev using the COPY_HOST_PTR flag and
> hostbuf=a.astype(np.float32) everything works fine, but if I first
> allocate memory and then use enqueue_write_buffer to transfer the
> data, the first couple of entries on the device contain junk. Starting
> with a_dev[4] (32 bit) or a_dev[8] (64 bit) everything is correct
> again. The problem occurs no matter if the device is a CPU or GPU. It
> does not show up with the NVIDIA SDK.

Are both the computation and the transfer in the same command queue? Are
you passing 'True' for is_blocking? (Alternatively--do you wait for the
write to complete?) Can you post sample code to reproduce?

HTH,
Andreas

Attachment: pgpFas5Kh5clk.pgp
Description: PGP signature

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

Reply via email to