replace torch.Tensor with torch.empty#1578
Merged
Merged
Conversation
d862458 to
59a4ff1
Compare
crcrpar
reviewed
Feb 10, 2023
Collaborator
crcrpar
left a comment
There was a problem hiding this comment.
Thank you, looks good
Just so you know, we're going to remove apex/amp and apex/RNN.
|
BUG! |
hubertlu-tw
pushed a commit
to ROCm/apex
that referenced
this pull request
Feb 27, 2023
* replace torch.Tensor with torch.empty * nit * nit
hubertlu-tw
added a commit
to ROCm/apex
that referenced
this pull request
Mar 1, 2023
…cy on six (#107) * replace torch.Tensor with torch.empty (NVIDIA#1578) * replace torch.Tensor with torch.empty * nit * nit * torch.empty() must have args (NVIDIA#1584) * use `torch.tensor` to create a tensor with initializer values (NVIDIA#1588) * use `torch.tensor` with init values Signed-off-by: Masaki Kozuki <[email protected]> * Update apex/contrib/sparsity/sparse_masklib.py * remove torch._six Signed-off-by: Masaki Kozuki <[email protected]> * retire `torch._six` as per the upstream commit of `b005ec62b9`. Signed-off-by: Masaki Kozuki <[email protected]> * use std collections.abc Signed-off-by: Masaki Kozuki <[email protected]> --------- Signed-off-by: Masaki Kozuki <[email protected]> --------- Signed-off-by: Masaki Kozuki <[email protected]> Co-authored-by: Nouamane Tazi <[email protected]> Co-authored-by: Masaki Kozuki <[email protected]>
yuanzhedong
pushed a commit
to yuanzhedong/apex
that referenced
this pull request
Jul 14, 2023
* replace torch.Tensor with torch.empty * nit * nit
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.
Use
torch.emptyto initialize tensors instead oftorch.Tensorwhich uses the new constructor.One benefit for this is that we can pass device and dtype directly to
torch.emptywhereas we can't fortorch.Tensor