[C++] Enable hardware support for arrow::util::Float16 on GCC and Clang
- Dominant language
- C++
- Stars
- 17.1k
- Forks
- 4.3k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 88
Description
### Describe the enhancement requested
`arrow::util::Float16` is a software simulation of the IEEE 754 `float16` (2008) standard. However, some architectures provide hardware support, such as [ARM](https://developer.arm.com/documentation/100067/0610/Other-Compiler-specific-Features/Half-precision-floating-point-data-types) and [x86_64 AVX512-FP16](https://www.intel.com/content/www/us/en/content-details/669773/intel-avx-512-fp16-instruction-set-for-intel-xeon-processor-based-products-technology-guide.html) microarchitectures. Furthermore, [GCC](https://gcc.gnu.org/onlinedocs/gcc/Half-Precision.html) and [Clang](https://clang.llvm.org/docs/LanguageExtensions.html#half-precision-floating-point) provide support via `_Float16`. However, there is currently no support in [MSVC](https://github.com/microsoft/STL/issues/2956#issuecomment-1405936780).
Additionally, I found that [Google Highway](https://github.com/google/highway/blob/52a2d98d07852c5d69284e175666e5f8cc7d8285/hwy/base.h#L1284-L1425) provides such support.
@Kou, do you think it is worth investigating further and enabling this for Arrow?
### Component(s)
C++
Contributor guide
Assessment
This issue has not been assessed yet.