[FBGEMM_GPU Question] When should I use FusedEmbeddingBagCollection over EmbeddingBagCollection?
JacoCheung opened this issue · comments
Junzhang commented
There is a benchmark under torchrec repo which compares EmbeddingBagCollection backed by nn.EmbeddingBag and FusedEmbeddingBagCollection backed by FBGEMM. However, AFAIK, there should be a non-fused EmbeddingBagCollection backed by FBGEMM
To my knowledge, there should be:
- EmbeddingBagCollection backed by nn.EmbeddingBag
- EmbeddingBagCollection backed by FBGEMM (The underlying implementation should ShardedEmbeddingBagCollection)
- FusedEmbeddingBagCollection backed by FBGEMM (It also can be sharded, but the sharder is not present in the torchrec benchmark.)
I have few questions:
- To leverage FBGEMM kernel, the EmbeddingBagCollection must be used together with sharder, right?
- In DLRM repo, the EmbeddingBagCollection rather than FusedEmbeddingBagCollection is used. So I wonder when should I use FusedEmbeddingBagCollection.
- I'm curious if there is any performance result of non-fused EmbeddingBagCollection backed by FBGEMM.
Thanks!