Refactor CPU embedding_bag implementation (#18734)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/18734
ghimport-source-id: e0e50d4b47f2fb8c86e464aacb950521d601f8d3
Reviewed By: cpuhrsch
Differential Revision: D14851413
Pulled By: zou3519
fbshipit-source-id: 8ac4e4de590a363e9807dc552fe4ca52b92652ed