Future-proofing Embedding.cu against heuristic changes#9851
Closed
mcarilli wants to merge 0 commit intopytorch:masterfrom
mcarilli:master
Closed
Future-proofing Embedding.cu against heuristic changes#9851mcarilli wants to merge 0 commit intopytorch:masterfrom mcarilli:master
mcarilli wants to merge 0 commit intopytorch:masterfrom
mcarilli:master
Conversation
soumith
approved these changes
Jul 26, 2018
Contributor
facebook-github-bot
left a comment
There was a problem hiding this comment.
weiyangfb has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Collaborator
|
@pytorchbot retest this please |
Contributor
Collaborator
Author
|
No worries, as long as the changes make it in eventually. |
facebook-github-bot
pushed a commit
that referenced
this pull request
Aug 28, 2018
zdevito
pushed a commit
to zdevito/ATen
that referenced
this pull request
Aug 28, 2018
Summary: - rebase of pytorch/pytorch#9851 Pull Request resolved: pytorch/pytorch#10959 Differential Revision: D9542292 Pulled By: weiyangfb fbshipit-source-id: ce51864d203c8ed89da3817f1da020a0ee932960
PenghuiCheng
pushed a commit
to PenghuiCheng/pytorch
that referenced
this pull request
Sep 11, 2018
Summary: - rebase of pytorch#9851 Pull Request resolved: pytorch#10959 Differential Revision: D9542292 Pulled By: weiyangfb fbshipit-source-id: ce51864d203c8ed89da3817f1da020a0ee932960
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.
Currently, the heuristic in aten/native/cuda/Embedding.cu only chooses my embedding_backward_feature_kernel if ntokens <= 768.
@FDecaYed pointed out that my bounds checking logic fails if the kernel is launched with ntokens > 1024. Currently, this never occurs, but this PR applies his fix so that the kernel does support ntokens > 1024, allowing the "768" heuristic to be adjusted in the future without breaking anything.
THCUNN/LookupTable.cu uses the same kernel, with the same heuristic. I didn't apply the fix here because I strongly suspect this is dead code (at least, I was unable to find a Python-side exposure for it). Do you mind if we attempt stripping this file out, as a separate PR?