-
Notifications
You must be signed in to change notification settings - Fork 23
build: update to latest torchao version #63
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
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2a02713
build: raise torchao ceiling to 0.18.0
guru-desh d0518ed
build: pin torch_2_11 group to torchao 0.18.0
guru-desh 3707719
build: temporarily exempt torchao from exclude-newer
guru-desh bcdde90
docs: add towncrier news fragment
guru-desh 9a490d4
build: revert torchao exclusion from exclude newer as it has been 3 days
guru-desh 4bfdc25
build: declare packaging as a runtime dependency
guru-desh 5a3736d
feat: add torchao/torch compatibility check helper
guru-desh 9014ef6
feat: warn on import for unsupported torchao/torch pairs
guru-desh 439a67a
docs: add towncrier fragment for the torchao/torch warning
guru-desh b8a3838
build: remove changelog.d/63.added.1
guru-desh c9dc286
fix: add back exclusion for coreai-torch and coreai-core
guru-desh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| Added support for torchao 0.18.0. |
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| # Copyright 2026 Apple Inc. | ||
| # | ||
| # Use of this source code is governed by a BSD-3-Clause license that can | ||
| # be found in the LICENSE file or at https://opensource.org/licenses/BSD-3-Clause | ||
|
|
||
| import pytest | ||
|
|
||
| from coreai_opt._utils.version_utils import torchao_torch_incompatibility | ||
|
|
||
| INCOMPATIBLE = [ | ||
| ("0.18.0", "2.8.0"), | ||
| ("0.18.0", "2.9.1"), | ||
| ("0.18.0", "2.10.0"), | ||
| ("0.18.0", "2.10.0+cu128"), | ||
| ("0.19.0", "2.10.0"), | ||
| # A source-built torchao reports a local version, which sorts above the base. | ||
| ("0.18.0+gitabc1234", "2.10.0"), | ||
| ] | ||
|
|
||
| COMPATIBLE = [ | ||
| # torch is new enough. | ||
| ("0.18.0", "2.11.0"), | ||
| ("0.18.0", "2.11.0+cu128"), | ||
| ("0.18.0", "2.12.0.dev20260805+cu128"), | ||
| # A 2.11 pre-release counts as 2.11. | ||
| ("0.18.0", "2.11.0rc1"), | ||
| # torchao still supports older torch. | ||
| ("0.17.0", "2.8.0"), | ||
| ("0.16.0", "2.10.0"), | ||
| ("0.15.0", "2.8.0"), | ||
| ] | ||
|
|
||
|
|
||
| @pytest.mark.parametrize(("torchao_version", "torch_version"), INCOMPATIBLE) | ||
| def test_returns_message_for_incompatible_pair(torchao_version, torch_version): | ||
| message = torchao_torch_incompatibility(torchao_version, torch_version) | ||
|
|
||
| assert message is not None | ||
| assert torchao_version in message | ||
| assert torch_version in message | ||
| assert "https://github.com/pytorch/ao/releases/tag/v0.18.0" in message | ||
|
|
||
|
|
||
| @pytest.mark.parametrize(("torchao_version", "torch_version"), COMPATIBLE) | ||
| def test_returns_none_for_compatible_pair(torchao_version, torch_version): | ||
| assert torchao_torch_incompatibility(torchao_version, torch_version) is None |
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.
Uh oh!
There was an error while loading. Please reload this page.