g++13 fixed-width floating point implementations

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,


my name is Marc Marot-Lassauzaie, I have recently been using g++13 in order to use the 16-bit floating point formats bf16 and fp16 but unfortunately these aren't defined on some of the machines I've been working on and I'd like to know why that is and whether there is any possibility of resolving this.

Specifically, I have three machines that I've been working on: one is my personal work laptop and the other two are HPC-Clusters that I've been accessing for work purposes. On my personal machine as well as one of the clusters I've installed g++13.2 from source, on the other cluster g++13.1 comes installed as a module. On my machine all of the std::floatxx_t formats are defined and available via the "stdfloat"<https://en.cppreference.com/w/cpp/header/stdfloat> header and all of their corresponding predefined macros are defined. On both of the clusters neither of these are true.

The C-language type "_Float16" is available for all three machines, meaning I can make use of fp16 but I couldn't find any way to make bf16 work on either of the clusters.


My best guess is that the hardware of the clusters somehow doesn't support these types but all three machines have the same microarchitecture, running the command "uname -m" returns the value "x86_64" for all three. I have found on the changelog of the gcc 13 release series<https://gcc.gnu.org/gcc-13/changes.html> that the __bf16 type is supported only if SSE2 and above are enabled, which I assume is related to this issue.

Could you let me know based on which criteria g++13 activates or deactivates this feature, whether there is any way to make it available anyway (even if this involves emulation) or whether there is any other way of using bf16-floating types for C++?


Please let me know if anything is unclear or if you have any additional questions.

Best and thank you very much,
Marc M-L






[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux