[PyTorch][3/N] Enable the rest forward spec options for ShardedEmbedding and ShardedEmbeddingBag. (#67799)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/67799
We have enabled the sharding embedding and embedding bag in https://github.com/pytorch/pytorch/pull/67188 and https://github.com/pytorch/pytorch/pull/66604. We now want to enable as many parameters as defined in doc as possible: https://pytorch.org/docs/stable/generated/torch.nn.functional.embedding_bag.html, https://pytorch.org/docs/stable/generated/torch.nn.functional.embedding.html.
For the ones that we don't support we just throw exception.
Last but not least, we use get to get params instead of directly using the key.
ghstack-source-id: 143987066
Test Plan: Unit test & CI
Reviewed By: pritamdamania87
Differential Revision: D31985333
fbshipit-source-id: 3794241b81eecc815bc4390679d0bb0323f4ae72