-
Notifications
You must be signed in to change notification settings - Fork 25.7k
Added sparse-tensor copy logic to dispatcher #65304
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
- Only ported copy for sparse tensor to dispatcher. Everything else is the same - Duplicated code for named tensor handling in sparse tensor copy - Might change it later to handle named tensors using dispatcher
🔗 Helpful links
💊 CI failures summary and remediationsAs of commit fc729c6 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚 This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.Please report bugs/suggestions to the (internal) Dr. CI Users group. |
Codecov Report
@@ Coverage Diff @@
## master #65304 +/- ##
==========================================
- Coverage 66.45% 66.45% -0.01%
==========================================
Files 735 735
Lines 93906 93906
==========================================
- Hits 62402 62401 -1
- Misses 31504 31505 +1 |
| bool non_blocking) { | ||
| // TODO: Once copy_ is fully migrated to use dispatcher, handle named | ||
| // inference using dispatcher instead of doing it everywhere | ||
| auto maybe_outnames = namedinference::compute_broadcast_outnames(self, src); |
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.
Is this making copy sparse more correct than it was before? Because in the old code it seems like names were just not propagated for sparse at all. I think I'd probably prefer that, mostly because it's not worth gooping up the code here.
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.
And then maybe you can use copy_sparse_to_sparse_; so instead of double dispatch (go to wrapper, than go to copy sparse to sparse), just inline the dispatch table of copy_sparse_to_sparse into copy.
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.
Uh....I thought the sparse flow was going through name propagation. It went through copy_ which did name prop and called copy_impl containing all implementations.
Please correct me if I'm wrong
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.
Blast, you're right
|
@ezyang has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator. |
Issue #61122