forked from facebookincubator/velox
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NaN handling in comparison functions (facebookincubator#10165)
Summary: Pull Request resolved: facebookincubator#10165 This change ensures that comparison functions treat all NaN bit representations as equal and greater than infinity. Summary of changes: Currently, numerical primitive types, including floating points, have an optimized SIMD implementation. However, this relies on low-level instructions that follow IEEE floating point semantics, where NaN compared to any other number, including itself, returns false. There is no trivial way to implement NaN checking and handling using SIMD, so for now, we are falling back to the regular non-SIMD version that employs comparators supporting NaN handling in the intended way. Additionally, this change currently handles this by adding a special case in the ComparisonSimdFunction vector function instead of registering the SimpleFunction for floating types. This is because registering an additional/different function to handle floating types is causing a regression in an internal integration which is still under investigation. Reviewed By: kgpai, kagamiori Differential Revision: D58471982
- Loading branch information
1 parent
63cceca
commit 48a2cde
Showing
5 changed files
with
229 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.