Skip to content

Add support for Int4GroupwisePreshuffleTensor for fbgemm #2421

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

jerryzh168
Copy link
Contributor

@jerryzh168 jerryzh168 commented Jun 22, 2025

Stacked PRs:


Add support for Int4GroupwisePreshuffleTensor for fbgemm

Summary:
Note: slice is not working yet, others are working

Test Plan:
python test/dtypes/test_int4_groupwise_preshuffle.py

Reviewers:

Subscribers:

Tasks:

Tags:

Copy link

pytorch-bot bot commented Jun 22, 2025

🔗 Helpful Links

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

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

❌ 1 New Failure

As of commit e664a1e with merge base 5a50667 (image):

NEW FAILURE - The following job has failed:

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

jerryzh168 added a commit that referenced this pull request Jun 22, 2025
Note: slice is not working yet, others are working

Test Plan:
python test/dtypes/test_int4_groupwise_preshuffle.py

Reviewers:

Subscribers:

Tasks:

Tags:

stack-info: PR: #2421, branch: jerryzh168/stack/1
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/1 branch from 565e596 to 65a1373 Compare June 22, 2025 04:28
@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 Jun 22, 2025
@jerryzh168 jerryzh168 changed the title Summary: Add Int4GroupwisePreshuffleTensor for fbgemm Jun 22, 2025
@jerryzh168 jerryzh168 added the topic: new feature Use this tag if this PR adds a new feature label Jun 22, 2025
@jerryzh168 jerryzh168 changed the title Add Int4GroupwisePreshuffleTensor for fbgemm Summary: Jun 22, 2025
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/1 branch from 65a1373 to 8dcecf4 Compare June 22, 2025 04:35
@jerryzh168 jerryzh168 changed the title Summary: Add support for Int4GroupwisePreshuffleTensor for fbgemm Jun 22, 2025
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/1 branch 3 times, most recently from 44b79dd to 6ce4c7b Compare June 24, 2025 22:25
@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/1 branch from 6ce4c7b to 027648f Compare June 24, 2025 22:28
if importlib.util.find_spec("fbgemm_gpu") is None:
quantize_int4_preshuffle = None
else:
from fbgemm_gpu.experimental.gen_ai.quantize import quantize_int4_preshuffle
Copy link
Contributor

Choose a reason for hiding this comment

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

is this a prototype API? If yes, should the torchao version also be prototype? what does "experimental" mean in the folder structure here?

Copy link
Contributor Author

@jerryzh168 jerryzh168 Jun 25, 2025

Choose a reason for hiding this comment

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

it is stable and production ready, and used in production. it's just bad naming according to @jwfromm, and they have a plan to get rid of it

@jerryzh168 jerryzh168 force-pushed the jerryzh168/stack/1 branch 5 times, most recently from ccd2cba to 69a215e Compare June 27, 2025 19:51
Summary:
Note: slice is not working yet, others are working

Test Plan:
python test/dtypes/test_int4_groupwise_preshuffle.py

Reviewers:

Subscribers:

Tasks:

Tags:

stack-info: PR: #2421, branch: jerryzh168/stack/1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in 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. topic: new feature Use this tag if this PR adds a new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants