OpenCL, half vs float performance

c, c++, gpgpu, gpu, opencl

Solution

ARM CPUs and GPUs have native support for `half` in their ALUs so you'll get close to double speed, plus substantial savings in energy consumption. Edit: The same goes for PowerVR GPUs.

Desktop hardware only supports `half` in the load/store and texturing units, AFAIK. Even so, I'd expect `half` textures to perform better than `float` textures or buffers on any GPU. Particularly if you can make some clever use of texture filtering.

Problem

I'm currently working on an application that requires large amounts of variables to be stored and processed (~4gb in float) Since precision of the individual variables are of less importance (I know that they'll be bounded), I saw that I could use OpenCL's half instead of floats, since that would really decrease the amount of memory. My question is twofold. Is there any performance hit to using half instead of float (I'd image graphics cards being built for float operations) Is there a performance hit for mixing floats and half's in calculations? (i.e, a float times a half.) Sincerily, Andreas Falkenstrøm Mieritz

Original source