Could you post the c++ code as well? This doesn't make much sense...
On 11 Apr 2014 16:21, "Kai Ruhl" <[email protected]> wrote:
> I have a *very* specific bug in pyopencl: When I use round(88.9f) with
> pyopencl from git (2014-04-08) on a Nvidia Ti780, it will give me 88.0
> instead of 89.0.
>
> - If I change the gfx card to my older GTX590, it will work.
> - If I round doubles instead of floats, it works on both cards.
> - If I write a test in C++, it works on both cards.
>
> Can anyone with a Ti780 confirm this bug?
>
>
>
> Side info: I have compiled pyopencl with ENABLE_GL=True and
> CL_PRETEND_VERSION="1.1" due to missing clCreateSubDevices in nvidia
> OpenCL.
> OS is Ubuntu 14.04.
>
> My test is:
>
> import pyopencl as cl
> import numpy as np
> ctx = cl.create_some_context()
> que = cl.CommandQueue(ctx)
> cl_prg = cl.Program(ctx, "__kernel void doit(__global float *a) { a[0] =
> round(88.9f); }").build()
> a = np.zeros(1, dtype=np.float32); A = cl.Buffer(ctx,
> cl.mem_flags.READ_WRITE | cl.mem_flags.COPY_HOST_PTR, hostbuf=a)
> cl_prg.doit(que, [1], None, A); que.finish()
> cl.enqueue_copy(que, a, A)
> print a[0]
>
>
>
> _______________________________________________
> PyOpenCL mailing list
> [email protected]
> http://lists.tiker.net/listinfo/pyopencl
>
_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl