[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#68871: Can't use od to print half-precision floats
From: |
Pádraig Brady |
Subject: |
bug#68871: Can't use od to print half-precision floats |
Date: |
Thu, 1 Feb 2024 18:05:10 +0000 |
User-agent: |
Mozilla Thunderbird |
On 01/02/2024 12:43, Rozenberg, Eyal (Consultant) wrote:
If I try to use the od utility to print half-precision (FP16) floating-point
values, I get:
$ od -t f2 myfloats.bin
od: invalid type string 'f2';
this system doesn't provide a 2-byte floating point type
I'm not exactly sure what "this system" means, but that should work and print
out my floats.
Eyal
PS - This is my first bug-coreutils post, please be gentle.
I just had a read of these:
https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2018/p0192r4.html
On the face of it it seems that various 16 bit floating point formats have
consolidated,
and we could add support for _Float16 in od.
I see gnulib already enables __STDC_WANT_IEC_60559_TYPES_EXT__
so we should be able to do something like the attached.
This is just off the top of my head, and I haven't tested
or thought about this much at all.
Any testing your could do would be appreciated.
thanks,
Pádraig
od-f16.patch
Description: Text Data
- bug#68871: Can't use od to print half-precision floats, Rozenberg, Eyal (Consultant), 2024/02/01
- bug#68872: Can't use od to print half-precision floats, Rozenberg, Eyal (Consultant), 2024/02/01
- bug#68871: Can't use od to print half-precision floats,
Pádraig Brady <=
- bug#68871: Can't use od to print half-precision floats, Paul Eggert, 2024/02/01
- bug#68871: Can't use od to print half-precision floats, Paul Eggert, 2024/02/01
- bug#68871: Can't use od to print half-precision floats, Pádraig Brady, 2024/02/01
- bug#68871: Can't use od to print half-precision floats, Paul Eggert, 2024/02/01
- bug#68871: Can't use od to print half-precision floats, Rozenberg, Eyal (Consultant), 2024/02/02
- bug#68871: Can't use od to print half-precision floats, Pádraig Brady, 2024/02/04
- bug#68871: Can't use od to print half-precision floats, Paul Eggert, 2024/02/04
- bug#68871: Can't use od to print half-precision floats, Pádraig Brady, 2024/02/05