-
Notifications
You must be signed in to change notification settings - Fork 915
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix string to double conversion and row equivalent comparison #7410
Fix string to double conversion and row equivalent comparison #7410
Conversation
…orrectly handles inf and nan.
…sue-5225 # Conflicts: # cpp/benchmarks/CMakeLists.txt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent.
Looks like you reformatted the CMakeLists.txt file.
You should change that back please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cmake lgtm
…sue-5225 # Conflicts: # cpp/benchmarks/CMakeLists.txt
…rk.cpp Co-authored-by: David <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Thanks for doing this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Couple suggestions, mostly related to data generation.
…generate columns of strings by calling to cudf::strings::to_floats
@gpucibot merge. |
@ttnghia you can't merge if CI is not passing... |
@gpucibot rerun tests |
I see. Thanks Mark. |
# Conflicts: # cpp/benchmarks/CMakeLists.txt
@gpucibot merge. |
@gpucibot merge |
This is a part of #7410 and depends on it. The java tests when they were first written, for what ever reason, did not use the correct string representation for several values including double max. They ended up testing that the code was broken, which is not the right thing to do. This updates those to have the correct values, but also has a comment about why the ideal value to test for overflow into `Inf` and `-Inf` is not ideal, but is a work around for small issues with the parsing code still. Authors: - Robert (Bobby) Evans (@revans2) - Nghia Truong (@ttnghia) Approvers: - Jason Lowe (@jlowe) URL: #7473
This PR fixes #5225 and fixes #5731 along with several improvements. In particular:
stod
inconvert_floats.cu
, which incorrectly usesmax_mantissa
, thus produces incorrect results as mentioned in the issue [BUG] discrepency in casting String to double #5225. Note that this PR still cannot produce perfectly matched results withstd::atof
, since handling float values nearinf
is very difficult.corresponding_rows_not_equivalent
which didn't handleinf
andnan
, thus it returned "equivalent" when comparing a valid float number withinf
.std::atof
results for comparison.