Skip to content

Add sparse marlin 2:4 gemm op #733

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Aug 23, 2024
Merged

Conversation

Diogo-V
Copy link
Contributor

@Diogo-V Diogo-V commented Aug 22, 2024

Description

This PR is a more concise version of #621 where only the gemm op and surrounding functions are implemented for a 2:4 sparse marlin kernel.

What was done:

  • Tests to validate the gemm op as well as with opcheck() to check if torch.compile will work out of the box with it
  • Implemented functions to pack an int4 quantized tensor into a sparse marlin representation
  • Implemented functions to reverse the above process (to be later used when dequantize() is called)

Notes:

  • The cuda kernel was extracted from this repo

cc @jcaip

Copy link

pytorch-bot bot commented Aug 22, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/733

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 8699877 with merge base 0ed3090 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 22, 2024
@jcaip jcaip self-requested a review August 23, 2024 16:52
Copy link
Contributor

@jcaip jcaip left a comment

Choose a reason for hiding this comment

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

Thanks @Diogo-V!

@jcaip jcaip merged commit 614c667 into pytorch:main Aug 23, 2024
16 checks passed
@msaroufim
Copy link
Member

that was fast haha, 1 shot green ci ;)

@Diogo-V
Copy link
Contributor Author

Diogo-V commented Aug 23, 2024

Glad I could be of help!
Now, I have to maintain the streak ;)

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants