fp16 <-> fp32

Hi,

In all release notes the benefits of fp16 and fp32 conversions are mentioned. I would be very interested in such a function but could not find any documentation about this feature. There were questions already how this conversion should be done but no answers yet.

I’m aware that there are driver API functions for texture operations but i’m more interested in the promoted feature in the release notes :-).

__float_as_int and __int_as_float are not doing quite the right thing – float:4byte int:4byte; and something like float_as_short does not exist or at least i haven’t found it yet…

Appreciate any help or information…

Best,
Manuel

You’re right, we need to add these to the documentation. The functions are:

unsigned short __float2half_rn(float f)
float __half2float(unsigned short h)

You can find them in “device_functions.h”.

Ahhhh ok. Thank you very much…

Best,

Manuel