ARROW-5830: [C++] Stop using memcmp in TensorEquals for tensors with float values#5166
ARROW-5830: [C++] Stop using memcmp in TensorEquals for tensors with float values#5166mrkn wants to merge 13 commits into
Conversation
302b81e to
63db11b
Compare
|
I think this pull-request is ready for code review. @wesm Could you please have a look? |
Codecov Report
@@ Coverage Diff @@
## master #5166 +/- ##
==========================================
+ Coverage 87.65% 89.27% +1.61%
==========================================
Files 1025 742 -283
Lines 146568 106041 -40527
Branches 1437 0 -1437
==========================================
- Hits 128480 94668 -33812
+ Misses 17726 11373 -6353
+ Partials 362 0 -362
Continue to review full report at Codecov.
|
|
I'm traveling this week but I will try to review. Note that I just opened https://issues.apache.org/jira/browse/ARROW-6359, your comments would be welcome |
|
@wesm I noticed that And I'll look at ARROW-6359. Thank you for telling me. |
|
I've finished working for |
pitrou
left a comment
There was a problem hiding this comment.
The size-based clause needs fixing as mentioned in the comments. Otherwise, LGTM.
|
Thank you @mrkn ! |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5166 +/- ##
==========================================
+ Coverage 87.65% 89.27% +1.61%
==========================================
Files 1025 742 -283
Lines 146568 106041 -40527
Branches 1437 0 -1437
==========================================
- Hits 128480 94668 -33812
+ Misses 17726 11373 -6353
+ Partials 362 0 -362 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
memcmpis an inappropriate way to examine the equality of float tensors because float tensors can have NaNs. In addition to fix this issue, I made the following fixes in this pull request:StridedIntegerTensorContentsEquals, that is renamed fromStridedTensorContentsEquals, to anonymous because it isn't referred from the outside of compare.ccTensor::Equalsbe false when two tensors has the different shapes.