Skip to content

Fix distributed/rpc/rnn unused import, typos, formatting #875

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

Merged
merged 1 commit into from
Jan 26, 2021

Conversation

pbelevich
Copy link
Contributor

No description provided.

@pbelevich pbelevich force-pushed the distributed_rpc_rnn_fix branch from 22f4299 to bc734a6 Compare January 24, 2021 20:26
@@ -41,11 +42,15 @@ class EmbeddingTable(nn.Module):
def __init__(self, ntoken, ninp, dropout):
super(EmbeddingTable, self).__init__()
self.drop = nn.Dropout(dropout)
self.encoder = nn.Embedding(ntoken, ninp).cuda()
self.encoder = nn.Embedding(ntoken, ninp)
if torch.cuda.is_available():
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we add this it will allow GPU-less users to run the example and it will work as before for GPU owners

@pbelevich pbelevich requested a review from mrshenli January 25, 2021 22:58
@pbelevich pbelevich marked this pull request as ready for review January 25, 2021 22:58
Copy link
Contributor

@mrshenli mrshenli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing and improving!!

@pbelevich pbelevich merged commit 5751edd into pytorch:master Jan 26, 2021
YinZhengxun pushed a commit to YinZhengxun/mt-exercise-02 that referenced this pull request Mar 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants