apache / apache/arrow

[C++] Enable hardware support for arrow::util::Float16 on GCC and Clang

Open
#49,179 17 comments 0 reactions 1 assignee Claimed by @andishgar View on GitHub
Component: C++ Type: enhancement
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.