-
Notifications
You must be signed in to change notification settings - Fork 918
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
Wrap custom iterator result #17251
Wrap custom iterator result #17251
Conversation
@galipremsagar could you add a test that shows the undesirable fallback behavior of iter? You should be able to do this by monkey-patching If that turns out to be too much work we can just document it, but I want to make it as obvious as possible to future devs why this is necessary. |
I agree, I'll add a test and document the reason behind the custom iterator existence. |
This PR also closes #14481 right? |
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.
A question and tiny suggestions
Co-authored-by: Matthew Murray <41342305+Matt711@users.noreply.github.com>
Going ahead and merging this PR. @vyasr incase you have additional comments let me know I can address in a follow-up. |
/merge |
No worries, this looks great thanks! |
Description
Fixes: #17165
Fixes: #14481
This PR properly wraps the result of custom iterator.
I think
custom_iter
has to exist. Here is why, invoking any sort ofiteration
on GPU objects will raise errors and thus in the end we fall-back to CPU. Instead of trying to move the objects from host to device memory (if the object is on host memory only), we will avoid a CPU-to-GPU transfer.Checklist