-
Notifications
You must be signed in to change notification settings - Fork 54
add device kwarg to astype API #665
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
Conversation
Co-authored-by: Athan <[email protected]>
kgryte
left a comment
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.
LGTM.
leofang
left a comment
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.
LGTM too. One possible nit: IIRC we discussed about raising exceptions for casting to unsupported dtypes by a certain device. Do we want to address it in this PR, or another?
I'd like to have @oleksandr-pavlyk to take a look if possible.
|
@leofang Ah, you're right. We do need to address the condition where the requested device does not support the desired dtype. Although, this applies more generally to all creation functions supporting the |
|
Yup sounds good |
|
Thanks for the PR, LGTM as well. |
kgryte
left a comment
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.
LGTM. Thanks, @steff456!
|
As this PR has three approvals, will go ahead and merge. We'll submit a follow-up PR to add guidance concerning what should happen when a device does not support an array data type when using |
This PR,
devicekwarg toastypeAPI in the DRAFT versionIt fixes #647 (comment)