-
Notifications
You must be signed in to change notification settings - Fork 902
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
[REVIEW] Preserve float16 upscaling #9069
Conversation
Codecov Report
@@ Coverage Diff @@
## branch-21.10 #9069 +/- ##
===============================================
Coverage ? 10.76%
===============================================
Files ? 114
Lines ? 19086
Branches ? 0
===============================================
Hits ? 2055
Misses ? 17031
Partials ? 0 Continue to review full report at Codecov.
|
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.
I think that's out of scope for this PR, but is definitely important to address. Let's see what others think about the discussion on #9069 before deciding whether to wait a little or move forward immediately on this PR. |
python/cudf/cudf/core/dtypes.py
Outdated
return np.dtype("object") | ||
except TypeError: | ||
pass | ||
else: | ||
if np_dtype.kind not in "biufUOMm": | ||
if np_dtype not in cudf._lib.types.np_to_cudf_types: |
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.
Can we make a more explicit constant in types.pyx
- SUPPORTED_NUMPY_DTYPES
or something of that sort?
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.
Sure, made the change and additional handling along with pytests related to pd/np/arrow inputs.
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 great - with one minor request!
rerun tests |
@gpucibot merge |
Fixes: #9065
This PR enables using
np.dtype
only for__cuda_array_interface__
scenario inas_column
. The dtype in this array interface is guaranteed to be numeric whichnp.dtype
can handle. Also there isfloat16
dtype upcasting logic already inplace below i.e., at line 1760.