apache / apache/arrow

[C++] Make `float16` part of `FloatingPointTypes()`

Open
#51,311 1 comment 0 reactions 0 assignees 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

`FloatingPointTypes()` currently contains only `float32()` and `float64()`, so `float16` is also absent from `NumericTypes()` and `PrimitiveTypes()`.

As a result, every kernel registration loop and test suite that iterates over those lists skips `float16`, and support for it has to be added type by type instead. Several kernel families explicitly reject `HalfFloatType` with `Status::NotImplemented` today.

`float16` should probably be a member of `FloatingPointTypes()`, consistent with the other floating point types.

### Component(s)

C++

Contributor guide

Open the contributing guide

Research direction

Start by locating the C++ definitions of FloatingPointTypes(), NumericTypes(), and PrimitiveTypes(), then inspect the kernel registration loops and test suites that iterate over them. Check how HalfFloatType is handled where kernels return Status::NotImplemented. Done means float16 is included consistently and the affected registrations and tests cover it without requiring type-by-type additions.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
data
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
68/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.