pytorch
0ec717c8 - Support int32 indices and offsets in nn.EmbeddingBag (#46758)

Commit
4 years ago
Support int32 indices and offsets in nn.EmbeddingBag (#46758) Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/46758 It's in general helpful to support int32 indices and offsets, especially when such tensors are large and need to be transferred to accelerator backends. Since it may not be very useful to support the combination of int32 indices and int64 offsets, here we enforce that these two must have the same type. Test Plan: unit tests Reviewed By: ngimel Differential Revision: D24470808 fbshipit-source-id: 94b8a1d0b7fc9fe3d128247aa042c04d7c227f0b
Author
Qi Zhou
Parents
Loading