Skip to content

Add alg_id argument to SemiSparseWeightConfig (#4238)#4238

Merged
jerryzh168 merged 1 commit intopytorch:mainfrom
RandySheriff:export-D99485146
Apr 7, 2026
Merged

Add alg_id argument to SemiSparseWeightConfig (#4238)#4238
jerryzh168 merged 1 commit intopytorch:mainfrom
RandySheriff:export-D99485146

Conversation

@RandySheriff
Copy link
Copy Markdown
Contributor

@RandySheriff RandySheriff commented Apr 3, 2026

Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

@RandySheriff RandySheriff requested a review from jerryzh168 as a code owner April 3, 2026 20:27
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 3, 2026

🔗 Helpful Links

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

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

✅ No Failures

As of commit c873eea with merge base d26bbae (image):
💚 Looks good so far! There are no failures yet. 💚

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

@meta-cla meta-cla 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 Apr 3, 2026
@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 3, 2026

@RandySheriff has exported this pull request. If you are a Meta employee, you can view the originating Diff in D99485146.

@RandySheriff RandySheriff added the module: inference quantize_ api inference flow label Apr 3, 2026
@meta-codesync meta-codesync bot changed the title Add alg_id argument to SemiSparseWeightConfig Add alg_id argument to SemiSparseWeightConfig (#4238) Apr 3, 2026
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 3, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
@RandySheriff RandySheriff requested a review from vkuzo as a code owner April 3, 2026 21:45
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 3, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
@RandySheriff
Copy link
Copy Markdown
Contributor Author

@pytorchbot retest this please

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Apr 3, 2026

❌ 🤖 pytorchbot command failed:

@pytorchbot: error: argument command: invalid choice: 'retest' (choose from 'merge', 'revert', 'rebase', 'label', 'drci', 'lint', 'fix-lint', 'apply-lint', 'cherry-pick')

usage: @pytorchbot [-h]
                   
                   {merge,revert,rebase,label,drci,lint,fix-lint,apply-lint,cherry-pick}
                   ...

Try @pytorchbot --help for more info.

@RandySheriff
Copy link
Copy Markdown
Contributor Author

@pytorchbot fix-lint

@jerryzh168
Copy link
Copy Markdown
Contributor

@pytorchbot fix-lint

this doesn't work in torchao right now btw, I'm trying to figure out how to get something like this work

RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 3, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 3, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~
https://www.internalfb.com/sandcastle/workflow/1247497096797230266

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
@RandySheriff RandySheriff force-pushed the export-D99485146 branch 2 times, most recently from ebd1465 to 0ba7e5a Compare April 6, 2026 20:53
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:
Pull Request resolved: pytorch#4238

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
 ---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 6, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 7, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 7, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
RandySheriff added a commit to RandySheriff/ao that referenced this pull request Apr 7, 2026
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
@jerryzh168 jerryzh168 merged commit 2a8fa55 into pytorch:main Apr 7, 2026
21 checks passed
brucechanglongxu pushed a commit to brucechanglongxu/ao that referenced this pull request Apr 9, 2026
…#4238)

Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
brucechanglongxu pushed a commit to brucechanglongxu/ao that referenced this pull request Apr 9, 2026
…#4238)

Summary:

As titled, by adding the alg_id, we now have chance to select most appropriate algorithm for optimal perf for specific gemm shapes ~

Fixes:
- Fixed typo "activiation" → "activation" in test
- Fixed formatting: line length violations and inconsistent indentation in `mm_search` call
- Moved `__post_init__` API usage logging into `__init__` in `SemiSparseWeightConfig`, since the class is not a `dataclass` and `__post_init__` was dead code
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=b3d5061c-31f8-11f1-9a22-a5a2fb0b80aa&tab=Trace)

Differential Revision: D99485146
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. fb-exported meta-exported module: inference quantize_ api inference flow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants