OK, I figured it out. It seems that either (a) standard algebraic
computations such as 2*a will be cast to double in some cases or (b)
this happens in cases like powf(a, 2). I replaced all numbers with a
float number (e.g. 2.0f) and that error is not raised anymore.

-Thomas

On Wed, Jun 29, 2011 at 11:22 AM, Thomas Wiecki <thomas_wie...@brown.edu> wrote:
> Hi,
>
> I always got these warnings while compiling, but now it seems they
> lead to a compile error:
> pycuda.driver.CompileError: nvcc said it demoted types in source code
> it compiled--this is likely not what you want.
>
> My function is an elementwise kernel (so c code), all input arguments
> and variables are floats. In the function I use logf, expf, sinf,
> floorf, fmaxf etc. Would any of these return a double? How can I find
> the perpetrator?
>
> Thanks,
> Thomas
>

_______________________________________________
PyCUDA mailing list
PyCUDA@tiker.net
http://lists.tiker.net/listinfo/pycuda

Reply via email to