Add exhaustive config option to intmm kernel #1392
Merged
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: