Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

embedding group #16

Open
xiexbing opened this issue Oct 24, 2024 · 3 comments
Open

embedding group #16

xiexbing opened this issue Oct 24, 2024 · 3 comments

Comments

@xiexbing
Copy link

Can you explain how the embedding group can contribute to the better performance of embedding layer?

@tiankongdeguiji
Copy link
Collaborator

During training, TorchEasyRec's EmbeddingGroup leverages TorchRec's EmbeddingBagCollection and EmbeddingCollection to fusion a large number of feature embedding lookup operations into as few operations as possible.

During inference, TorchEasyRec's EmbeddingGroup further optimizes the embedding computation on the user side, reducing the required calculations from batch_size times to just once.

@xiexbing
Copy link
Author

for the training, how the fusion helps? more specifically, at low level, where the benefit comes from? e.g., does the fusion helps on the better utilization on the communication in the forward pass by better batching the communication data? does the fusion helps on reduce the number of cuda kernel launching on pooling in forward? please help provide details or point to the detailed documentations/papers.

@tiankongdeguiji
Copy link
Collaborator

the fusion helps on reduce the number of embedding lookup cuda kernel launching and better utilization on the communication.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants