Login  Register

Re: Kernel not processing half of the elements on GPU, works fine on CPU

Posted by Michael Bien on May 17, 2011; 5:57pm
URL: https://forum.jogamp.org/Kernel-not-processing-half-of-the-elements-on-GPU-works-fine-on-CPU-tp2941599p2953497.html

  yep i saw your post on the message board already :)

if you want to switch between double and single precision take a look at
the multi device demo and how the kernel was written.
https://github.com/mbien/jocl-demos/blob/master/src/com/jogamp/opencl/demos/fractal/Mandelbrot.cl

it uses doubles in host code (java app) and sets
kernel.setForce32BitArgs(true) for double->float conversion in the
kernel.putArg() methods. (+ it recompiles the program with different
compiler options)

best regards,
michael

On 05/17/2011 07:42 PM, Giovanni Idili [via jogamp] wrote:

>
> Thanks for having a look - after posting on the kronos forums about
> http://www.khronos.org/message_boards/viewtopic.php?f=37&t=3894 another
> issue I was having  I was forced to switch to floats (apparently my GPU
> doesn't support doubles). After that it seems to work OK. I am kind of
> thinking that the issue was caused by lack of double support too, but it's
> very strange nonetheless, and I don't understand why were half of the stuff
> being processed correctly. Weird!
>
> Now everything is working OK anyway ... but I already have another question
> that I will post soon :)
>