[wip] split to_device into collection + execution#3274
Draft
jameszianxuTT wants to merge 1 commit intomainfrom
Draft
[wip] split to_device into collection + execution#3274jameszianxuTT wants to merge 1 commit intomainfrom
jameszianxuTT wants to merge 1 commit intomainfrom
Conversation
Contributor
Author
|
Would like to think a bit more on whether this is a good solution, since it adds a chunk of complexity to the nice .to_device() that we had before. However, these kinds of bugs are subtle, so it might be worth catching Another alternative is having this alias set up in a different way in |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3274 +/- ##
=======================================
Coverage 28.33% 28.33%
=======================================
Files 33 33
Lines 4094 4094
=======================================
Hits 1160 1160
Misses 2934 2934 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ticket
One possible solution to #3218. While a local patch could resolve this for now, I think the investigation in #3218 shows that we need to be more careful when moving aliased objects to device.
Problem description
Provide context for the problem.
What's changed
Only move objects .to(device) once. This prevents an object and its aliases from being moved .to(device) separately creating separate objects, leading to broken shard spec application
Checklist