Revert "Avoid unnecessary copy in TensorSource (#8849)"#9379
Merged
jeffhataws merged 1 commit intomasterfrom Jun 18, 2025
Merged
Revert "Avoid unnecessary copy in TensorSource (#8849)"#9379jeffhataws merged 1 commit intomasterfrom
jeffhataws merged 1 commit intomasterfrom
Conversation
This reverts commit 8dc5b49.
0c2c622 to
fd8a1b4
Compare
ysiraichi
approved these changes
Jun 18, 2025
Collaborator
ysiraichi
left a comment
There was a problem hiding this comment.
LGTM.
I will say that it's really odd that this is the thing that's hanging. If copy=False, it just means that this tensor.to(...) call might be a no-op. I don't really see how that would cause hanging.
pgmoka
approved these changes
Jun 18, 2025
acolicTT
added a commit
to tenstorrent/pytorch-xla
that referenced
this pull request
Feb 23, 2026
Whenever tensor is transfered to our runtime from torch_xla, tensor is copied. This causes unnecessary data duplication on our side. This change disables tensor copy if it can be borrowed. Note that PJRT expects data to be contiguous in memory, which is not always true on pytorch side, so copies can not be completely avoided. Since this change has been checked in before and later reverted, we need to test whether this will work in our environment. Please take a look at these for more info: pytorch#8849 pytorch#9379 pytorch#9378
acolicTT
added a commit
to tenstorrent/pytorch-xla
that referenced
this pull request
Feb 23, 2026
Whenever tensor is transfered to our runtime from torch_xla, tensor is copied. This causes unnecessary data duplication on our side. This change disables tensor copy if it can be borrowed. Note that PJRT expects data to be contiguous in memory, which is not always true on pytorch side, so copies can not be completely avoided. Since this change has been checked in before and later reverted, we need to test whether this will work in our environment. Please take a look at these for more info: pytorch#8849 pytorch#9379 pytorch#9378
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.
This reverts commit 8dc5b49.
See #9378