Make dim divisible by 4 requirement more explicit #490
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.
Summary:
Problem
User report here
https://fb.prod.workplace.com/groups/1069285536500339/permalink/5254923157936535/
Error stack, P512815141
PyTorch batched embedding table op requires dim to be divisible by 4.
The particular error is asserting one table is having dim=1.
Code pointer to the assertion, https://fburl.com/code/rucb3gzn
Improvement
Make the assertion more actionable to users.
Include table names to users know which model config to look at.
Solution
Verify and assert here instead, because here we still have context about table_names.
https://fburl.com/code/5ukomhpt
Differential Revision: D37496262