Skip to content

migrate sparsify_ to configs#1856

Merged
vkuzo merged 50 commits intomainfrom
gh/vkuzo/60/head
Mar 12, 2025
Merged

migrate sparsify_ to configs#1856
vkuzo merged 50 commits intomainfrom
gh/vkuzo/60/head

Conversation

@vkuzo
Copy link
Copy Markdown
Contributor

@vkuzo vkuzo commented Mar 7, 2025

Summary:

Before:

sparsify_(model, semi_sparse_weight())
sparsify_(model, block_sparse_weight(64))

After:

# new syntax
sparsify_(model, SemiSparseWeightConfig())
sparsify_(model, BlockSparseWeightConfig(64))

# old syntax still works
sparsify_(model, semi_sparse_weight())
sparsify_(model, block_sparse_weight(64))

Test Plan:

pytest test/sparsity/test_sparse_api.py -s -x

Reviewers:

Subscribers:

Tasks:

Tags:

vkuzo added 7 commits March 7, 2025 06:48
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo
Copy link
Copy Markdown
Contributor Author

vkuzo commented Mar 7, 2025

@pytorch-bot
Copy link
Copy Markdown

pytorch-bot Bot commented Mar 7, 2025

🔗 Helpful Links

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

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

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

@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 Mar 7, 2025
vkuzo added a commit that referenced this pull request Mar 7, 2025
Summary:

Before:

```python
sparsify_(model, semi_sparse_weight())
sparsify_(model, block_sparse_weight(64))
```

After:

```
sparsify_(model, SemiSparseWeightConfig())
sparsify_(model, BlockSparseWeightConfig(64))

sparsify_(model, semi_sparse_weight())
sparsify_(model, block_sparse_weight(64))
```

Test Plan:

```
pytest test/sparsity/test_sparse_api.py -s -x
```

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: dc9dd9d
ghstack-comment-id: 2706995209
Pull Request resolved: #1856
@vkuzo vkuzo added the topic: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories) label Mar 7, 2025
@vkuzo vkuzo mentioned this pull request Mar 7, 2025
vkuzo added 4 commits March 7, 2025 09:51
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 5 commits March 7, 2025 10:42
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 2 commits March 8, 2025 06:15
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo vkuzo changed the base branch from gh/vkuzo/58/head to gh/vkuzo/59/head March 8, 2025 14:15
vkuzo added 14 commits March 8, 2025 12:16
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 2 commits March 10, 2025 15:47
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vkuzo added 3 commits March 12, 2025 10:17
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vkuzo vkuzo changed the base branch from gh/vkuzo/59/head to main March 12, 2025 20:56
@vkuzo vkuzo merged commit 83a2e28 into main Mar 12, 2025
liangel-02 pushed a commit that referenced this pull request Aug 25, 2025
* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]

* Update

[ghstack-poisoned]
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: improvement Use this tag if this PR is an improvement (doesn't fit into any of the other categories)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants