Repository navigation
Add auto-tuning for sparse semi-structured MM operator - #123742
alexsamardzic wants to merge 27 commits into
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/123742
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 7efb13c with merge base 546c53b ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
|
Note that the generated kernels will still sometimes fail because of alignment issues, am investigating this. |
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
cc voznesenskym penguinwu EikanWang jgong5 Guobing-Chen XiaobingSuper zhuhaozhe blzheng wenzhe-nrv jiayisunx peterbell10 ipiszy yf225 chenyang78 kadeng muchulee8 aakhundov ColinPeppler amjames desertfire chauhang [ghstack-poisoned]
|
This PR is ready for a review now. |
| M = A_size[-2] | ||
| N = B_size[-1] | ||
| if K != A_size[-1]: | ||
| if K != A_size[-1] and K != 2 * A_size[-2]: |
There was a problem hiding this comment.
Why does K have to equal twice the size of the first dimension of A on this line?
There was a problem hiding this comment.
For sparse semi-structured MM, matrix A here contains only non-zero elements of original matrix, that has two zero elements out of each four successive elements (among rows). So I want to do a quick check here for both regular and sparse MM.
| X (IRNode): The X input tensor. | ||
| W (IRNode): The W input tensor. | ||
| Bias (IRNode): The bias tensor. | ||
| Meta (IRNode): The meta tensor. |
There was a problem hiding this comment.
What is a meta tensor in this context? Is it an optional argument or mandatory even for non-sparse GEMMs?
There was a problem hiding this comment.
It's again about sparse semi-structured MM: in this case, "meta" tensor encodes which two elements, out of each four successive elements of the original matrix, are actually provided through matrix A.
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: 1 jobs have failed, first few of them are: trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable) Details for Dev Infra teamRaised by workflow job |
|
@pytorchbot merge -i |
Merge startedYour change will be merged while ignoring the following 3 checks: trunk / macos-py3-arm64 / test (default, 1, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (default, 2, 3, macos-m1-stable), trunk / macos-py3-arm64 / test (default, 3, 3, macos-m1-stable) Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: Command Details for Dev Infra teamRaised by workflow job |
|
@alexsamardzic Looks like there's a land-time merge conflict. You might want to rebase. CI will have to run again.- |
Rebased, CI running now. |
|
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):
cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler @amjames @desertfire @chauhang