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

Proposal of how we might use sparse tensors for gradients #1484

Merged
merged 6 commits into from
Oct 26, 2021

Conversation

Dipet
Copy link
Contributor

@Dipet Dipet commented Oct 26, 2021

This is a simple solution to how we could use sparse gradients for the Embedding and EmbeddingBag.
When I was writing this code, I saw that your CSRTensor implementations looks like COO tensor in pytorch because pytorch CSRTensor has another API.

I created a new PR because the rebase operation went wrong in #1439

@jeffra
Copy link
Collaborator

jeffra commented Oct 26, 2021

Thank you @Dipet for your contribution, sorry for delay on our side reviewing this. I’ll take a closer look this afternoon.

Copy link
Collaborator

@jeffra jeffra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great, thank you @Dipet for the contribution. This CSR tensor was implemented a really long time ago and I don't believe back then torch had support for this properly. Really glad to see this feature be upgraded like this.

@jeffra jeffra enabled auto-merge (squash) October 26, 2021 20:49
@jeffra jeffra merged commit fcb3ca5 into microsoft:master Oct 26, 2021
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

Successfully merging this pull request may close these issues.

2 participants