-
Notifications
You must be signed in to change notification settings - Fork 314
Add exhaustive config option to intmm kernel #1392
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
Merged
Merged
Conversation
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
Summary: similar to pytorch/pytorch#126220 we added exhaustive option for int8mm and scaled_mm kernels in torchao Note that there seems to be native int8mm and scaled_mm support in pytorch: https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm.py#L305 for int8mm and https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm_scaled.py#L575 for scaled mm maybe we should use that at some point. Test Plan: ``` cd benchmarks TORCHAO_AUTOTUNER_ENABLE=1 python intmm.py --file_path intmm_shapes.csv TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_SEARCH_SPACE=EXHAUSTIVE TORCHAO_AUTOTUNER_ENABLE=1 python intmm.py --file_path intmm_shapes.csv ``` Reviewers: Subscribers: Tasks: Tags:
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/1392
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit 29d6032 with merge base 8a805d0 ( BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cpuhrsch
approved these changes
Dec 10, 2024
amdfaa
pushed a commit
that referenced
this pull request
Jan 10, 2025
* Add exhaustive config option to intmm kernel Summary: similar to pytorch/pytorch#126220 we added exhaustive option for int8mm and scaled_mm kernels in torchao Note that there seems to be native int8mm and scaled_mm support in pytorch: https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm.py#L305 for int8mm and https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm_scaled.py#L575 for scaled mm maybe we should use that at some point. Test Plan: ``` cd benchmarks TORCHAO_AUTOTUNER_ENABLE=1 python intmm.py --file_path intmm_shapes.csv TORCHINDUCTOR_MAX_AUTOTUNE_GEMM_SEARCH_SPACE=EXHAUSTIVE TORCHAO_AUTOTUNER_ENABLE=1 python intmm.py --file_path intmm_shapes.csv ``` Reviewers: Subscribers: Tasks: Tags: * remove unused * enable all autoquant qtensor * guard float8 qtensor subclass * guard exhaustive config torch version
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: not user facing
Use this tag if you don't want this PR to show up in release notes
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:
similar to pytorch/pytorch#126220 we added exhaustive option for int8mm and scaled_mm kernels in torchao
Note that there seems to be native int8mm and scaled_mm support in pytorch: https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm.py#L305 for int8mm and https://github.com/pytorch/pytorch/blob/0610b9730e27d066e26396a2d655ba0d98c2012d/torch/_inductor/kernel/mm_scaled.py#L575 for scaled mm maybe we should use that at some point. We can do this later as there are slight differences right now.
Also added all options for autoquant.
Test Plan:
ran autoquant-all and
TORCHAO_AUTOTUNER_ENABLE=1
on sam:TORCHAO_AUTOTUNER_ENABLE=1
give a slight boost.exhaustive mode is taking too long so it probably makes more sense to use it with https://github.com/pytorch/ao/tree/main/torchao/prototype/quantization/mixed_precision
Reviewers:
Subscribers:
Tasks:
Tags: