Add support for fbgemm int4 mm kernel#2255
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2255
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit d2066dc with merge base b0cfeec ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
Thank you! community really needs this. |
9df9b49 to
3253e6a
Compare
drisspg
reviewed
May 27, 2025
drisspg
reviewed
May 27, 2025
drisspg
reviewed
May 27, 2025
drisspg
reviewed
May 27, 2025
drisspg
reviewed
May 28, 2025
drisspg
reviewed
May 28, 2025
drisspg
reviewed
May 28, 2025
drisspg
reviewed
May 28, 2025
drisspg
left a comment
Contributor
There was a problem hiding this comment.
Okay everything looks pretty good but the API for the FBGEMM config feels gross imo I know its a thin wrapper around their op but I think we can do better than io string
drisspg
approved these changes
May 28, 2025
drisspg
left a comment
Contributor
There was a problem hiding this comment.
Looks good, can you also add a serialization test entry, want to ensure we can seralize str eums
drisspg
reviewed
May 28, 2025
Summary: we also plan to expose some other kernels like fp8xint4 and bf16xfp8, fp8xfp8 to compare with existing torchao kernels Test Plan: test/dtypes/test_fbgemm_int4_tensor.py Reviewers: Subscribers: Tasks: Tags:
1d8b558 to
d9fdf72
Compare
liangel-02
pushed a commit
that referenced
this pull request
Aug 25, 2025
* Add support for fbgemm int4 mm kernel Summary: we also plan to expose some other kernels like fp8xint4 and bf16xfp8, fp8xfp8 to compare with existing torchao kernels Test Plan: test/dtypes/test_fbgemm_int4_tensor.py Reviewers: Subscribers: Tasks: Tags: * fix and test * fix dtype * use importlib * add links to fbgemm code * update io_dtype type * renaming * remove enum * serializability update * format * fix tests * skip fbgemm config tests for 2.5 and below
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
we also plan to expose some other kernels like fp8xint4 and bf16xfp8, fp8xfp8 to compare with existing torchao kernels
Test Plan:
test/dtypes/test_fbgemm_int4_tensor.py
H100, with compile:
Note: fbgemm-int4-128 does not work with compile yet since the fbgemm op does not have meta device implementation.
Reviewers:
Subscribers:
Tasks:
Tags: