[fitsbits] 16-bit floats {External}

Paul Hirst paul.hirst at noirlab.edu
Mon Jul 28 14:10:44 EDT 2025


FWIW, I recall discussion of 16-bit floats at an AO real time computing
meeting I was at a few years ago. The take home I got was that high end
GPUs support 16-bit floats, and they are especially advantageous in this
application as you're trying to do really fast matrix-vector-multiply
operations, and if you can keep the matrix in cache then you're no longer
memory bandwidth limited. Obviously, storing values at 16 bit rather than
32 gets you a factor of two advantage here. Point being I don't think it's
true in the general case that hardware support is not either already there
or coming.

But also I would argue that's not especially relevant. As pointed out
previously, the option to store 16-bit floats has applications in FITS as a
transport standard, irrespective of whether you end up converting them to
32 bit internally or not.

Aloha,
 Paul


On Mon, Jul 28, 2025 at 2:28 AM Richard J. Mathar via fitsbits <
fitsbits at listmgr.nrao.edu> wrote:

> There are two pairs of shoes here: i) support of the 16bit "half" float on
> processors is very unlikely to happen, because on every architecture in
> the past the
> designs went towards wider float types. (AI may change that ..?)
>
> ii) support of the 16bit float in libraries (C23 for example) is added by
> implementing
> parsers that expand these to 32bit "single precision" float and continuing
> artihmetics
> with the "single precision" floating point libraries. This is for example
> the
> current ARM status
>
> https://developer.arm.com/documentation/100067/0611/Other-Compiler-specific-Features/Half-precision-floating-point-data-types
> and the gcc handling
> https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
>
> iii) In the TIFF format there are rumors in
> https://pypi.org/project/tifffile/
> (see "Notes") that TIFF supports 16bit floats, but I suspect this claim is
> wrong;
> I have not found a TIFF documentation to support that view.
> If the TIFF file supports these floats, one may use the Foreign File
> Encapsulation
> Convention of https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
> to include TIFF images in FITS files. This is very efficient because
> TIFF supports a wide range of compression algorithms.
>
> In summary, even if the storage format is supported (as disk capacities
> and streaming bandswiths *are always* an issue), there will be a small
> run-time
> overhead by parsing the 16bit-floats in and out of their 32bit-float
> processor registers.
>
> Richard Mathar
> Heidelberg
>
> _______________________________________________
> fitsbits mailing list
> fitsbits at listmgr.nrao.edu
> https://listmgr.nrao.edu/mailman/listinfo/fitsbits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listmgr.nrao.edu/pipermail/fitsbits/attachments/20250728/8ea75401/attachment.html>


More information about the fitsbits mailing list