PyTorch 2.4: Python 3.12, AOTInductor freezing, libuv backend for TCPStore
PyTorch 2.4 Release Notes
Highlights
Tracked Regressions
Backward incompatible changes
Deprecations
New features
Improvements
Bug Fixes
Performance
Documentation
Developers
Security
Highlights
We are excited to announce the release of PyTorch® 2.4!
PyTorch 2.4 adds support for the latest version of Python (3.12) for torch.compile.
AOTInductor freezing gives developers running AOTInductor more performance based optimizations by allowing the
serialization of MKLDNN weights. As well, a new default TCPStore server backend utilizing libuv has been introduced
which should significantly reduce initialization times for users running large-scale jobs.
Finally, a new Python Custom Operator API makes it easier than before to integrate custom kernels
into PyTorch, especially for torch.compile.
This release is composed of 3661 commits and 475 contributors since PyTorch 2.3. We want to sincerely thank our
dedicated community for your contributions. As always, we encourage you to try these out and report any issues as we
improve 2.4. More information about how to get started with the PyTorch 2-series can be found at our
Getting Started page.
... (truncated)
Commits
d990dad [CMAKE] Look for Development.Module instead of Development (#129729)
e4ee3be [Release only] use triton 3.0.x from pypi (#130336)
9afe4ec Update torchbench model expected accuracy values after pinning numpy (#129986)
[flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) (#13104)
[pycodestyle] Disable E741 in stub files (.pyi) (#13119)
[pydoclint] Avoid DOC201 on explicit returns in functions that only return None (#13064)
Rule changes
[flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) (#13023)
Bug fixes
[FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) (#13133)
[flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) (#13118)
[flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) (#13092)
[pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) (#13089)
[ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) (#13109)
[ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any (#13105)
Fix dark theme on initial page load for the Ruff playground (#13077)
[flake8-simplify] Extend open-file-with-context-handler to work with dbm.sqlite3 (SIM115) (#13104)
[pycodestyle] Disable E741 in stub files (.pyi) (#13119)
[pydoclint] Avoid DOC201 on explicit returns in functions that only return None (#13064)
Rule changes
[flake8-async] Disable check for asyncio before Python 3.11 (ASYNC109) (#13023)
Bug fixes
[FastAPI] Avoid introducing invalid syntax in fix for fast-api-non-annotated-dependency (FAST002) (#13133)
[flake8-implicit-str-concat] Normalize octals before merging concatenated strings in single-line-implicit-string-concatenation (ISC001) (#13118)
[flake8-pytest-style] Improve help message for pytest-incorrect-mark-parentheses-style (PT023) (#13092)
[pylint] Avoid autofix for calls that aren't min or max as starred expression (PLW3301) (#13089)
[ruff] Add datetime.time, datetime.tzinfo, and datetime.timezone as immutable function calls (RUF009) (#13109)
[ruff] Extend comment deletion for RUF100 to include trailing text from noqa directives while preserving any following comments on the same line, if any (#13105)
Fix dark theme on initial page load for the Ruff playground (#13077)
0.6.2
Preview features
[flake8-simplify] Extend open-file-with-context-handler to work with other standard-library IO modules (SIM115) (#12959)
[ruff] Avoid unused-async for functions with FastAPI route decorator (RUF029) (#12938)
[ruff] Ignore fstring-missing-syntax (RUF027) for fastAPI paths (#12939)
[ruff] Implement check for Decimal called with a float literal (RUF032) (#12909)
Rule changes
[flake8-bugbear] Update diagnostic message when expression is at the end of function (B015) (#12944)
[flake8-pyi] Skip type annotations in string-or-bytes-too-long (PYI053) (#13002)
[flake8-type-checking] Always recognise relative imports as first-party (#12994)
[flake8-unused-arguments] Ignore unused arguments on stub functions (ARG001) (#12966)
[pylint] Ignore augmented assignment for self-cls-assignment (PLW0642) (#12957)
[pep8-naming] Don't flag from imports following conventional import names (N817) (#12946)
[pylint] - Allow __new__ methods to have cls as their first argument even if decorated with @staticmethod for bad-staticmethod-argument (PLW0211) (#12958)
- Suppress spinner in parallel runs in CI - by :user:`ziima`. (:issue:`3318`)
Bugfixes - 4.18.0
Boost temporary directories cleanup in tests - by :user:ziima. (:issue:3278)
Fix absolute base python paths conflicting - by :user:gaborbernat. (:issue:3325)
v4.17.1 (2024-08-07)
Bugfixes - 4.17.1
- Support for running ``-e <major>.<minor>`` has been lost, fixing it - by :user:`gaborbernat`. (:issue:`2849`)
- ``base_python`` now accepts absolute paths to interpreter executable - by :user:`paveldikov`. (:issue:`3191`)
v4.17.0 (2024-08-05)
Features - 4.17.0
Add graalpy prefix as a supported base python (:issue:3312)
Add :ref:on_platform core configuration holding the tox platform and do not install package when exec an environment
by :user:gaborbernat. (:issue:3315)
Bugfixes - 4.17.0
- Add table with default environment variables per OS (:issue:`2753`)
v4.16.0 (2024-07-02)
Bugfixes - 4.16.0
Add windir to the default list of Windows pass_env environment variables. - by :user:kurtmckee (:issue:3302)
Improved Documentation - 4.16.0
- - Fix typo in configuration example and fix broken link to code style guide. - by :user:`srenfo` (:issue:`3297`)
v4.15.1 (2024-06-05)
Features - 4.15.1
- Fix ``skip_missing_interpreters`` option for ``package = wheel`` (:issue:`3269`)
</tr></table>
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/tox-dev/tox/commit/ea72694813a34573f75cbbe284792c4fa96c73c2"><code>ea72694</code></a> release 4.18.0</li>
<li><a href="https://github.com/tox-dev/tox/commit/3b3628d451111ffc87f009a82eb65b53070377ec"><code>3b3628d</code></a> Fix <a href="https://redirect.github.com/tox-dev/tox/issues/3318">#3318</a> - Suppress spinner in parallel runs in CI (<a href="https://redirect.github.com/tox-dev/tox/issues/3321">#3321</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/1ee4a3335b1195c85b2fe0db120355dd50324f79"><code>1ee4a33</code></a> Fix absolute base python paths conflicting (<a href="https://redirect.github.com/tox-dev/tox/issues/3325">#3325</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/add99edff0ac34520d637d0ce60f8902b1a95b55"><code>add99ed</code></a> Fix <a href="https://redirect.github.com/tox-dev/tox/issues/3278">#3278</a> - Boost temporary directories cleanup in tests (<a href="https://redirect.github.com/tox-dev/tox/issues/3323">#3323</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/352a3dd778fa9ecb1ddb339c37536a79fef1c121"><code>352a3dd</code></a> release 4.17.1</li>
<li><a href="https://github.com/tox-dev/tox/commit/fafce99fcb3d9943a10b219c16de299a82e8d491"><code>fafce99</code></a> fix(tox_env.python): do not process absolute paths to interpreter as PythonSp...</li>
<li><a href="https://github.com/tox-dev/tox/commit/fdc9eb0355f3f58ca700147dc15e4c6894595bdf"><code>fdc9eb0</code></a> Restore limited <major>.<minor> environment name support (<a href="https://redirect.github.com/tox-dev/tox/issues/3319">#3319</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/2f7c60ec71d47f4099394af11999a840bc97c9a9"><code>2f7c60e</code></a> release 4.17.0</li>
<li><a href="https://github.com/tox-dev/tox/commit/5425133459e9c0194c536eac332c06178ac0700e"><code>5425133</code></a> Add on platform constat to core (<a href="https://redirect.github.com/tox-dev/tox/issues/3315">#3315</a>)</li>
<li><a href="https://github.com/tox-dev/tox/commit/2cf190ae5acc83488a9daef45e51cf964190e66d"><code>2cf190a</code></a> [pre-commit.ci] pre-commit autoupdate (<a href="https://redirect.github.com/tox-dev/tox/issues/3306">#3306</a>)</li>
<li>Additional commits viewable in <a href="https://github.com/tox-dev/tox/compare/4.16.0...4.18.0">compare view</a></li>
</ul>
</details>
<br />
Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot show ignore conditions` will show all of the ignore conditions of the specified dependency
- `@dependabot ignore major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself)
- `@dependabot ignore minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself)
- `@dependabot ignore ` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore ` will remove all of the ignore conditions of the specified dependency
- `@dependabot unignore ` will remove the ignore condition of the specified dependency and ignore conditions
Updates the requirements on numpy, torch, horde-sdk, horde-engine, pytest, mypy, black, ruff, tox and pre-commit to permit the latest version. Updates
numpy
from 1.26.4 to 2.1.1Release notes
Sourced from numpy's releases.
... (truncated)
Commits
48606ab
Merge pull request #27328 from charris/prepare-2.1.1a7cb4c4
REL: Prepare for the NumPy 2.1.1 release [wheel build]884c92b
Merge pull request #27303 from charris/backport-27284ca7f5c1
Merge pull request #27304 from charris/backport-270492a49507
BUG: f2py: better handle filtering of public/private subroutinesd4306dd
TST: Add regression test for gh-26920db9668d
BLD: cp311- macosx_arm64 wheels [wheel build]c6ff254
Merge pull request #27287 from charris/post-2.0.2-release-update326bc17
MAINT: Update main after the 2.0.2 release8164b7c
Merge pull request #27278 from charris/backport-27275Updates
torch
from 2.3.1 to 2.4.0Release notes
Sourced from torch's releases.
... (truncated)
Commits
d990dad
[CMAKE] Look forDevelopment.Module
instead ofDevelopment
(#129729)e4ee3be
[Release only] use triton 3.0.x from pypi (#130336)9afe4ec
Update torchbench model expected accuracy values after pinning numpy (#129986)499621e
[CherryPick][FSDP2+TP] Disable 2D state_dict (#129519) (#129923)e5bda62
[CherryPick][DCP] Fix Optimizer Learning Rate not being loaded correctly (#12...705e3ae
Improve error message for weights_only load (#129783)b26cde4
[Windows] remove mkl shared library dependency. (#129740)12ad767
[distributed] NCCL result code update (#129704)1164d3c
Add threadfence to 2-stage reduction for correct writes visibility (#129701)9533637
Inductor to fail gracefully on Voltas for bf16 tensors (#129699)Updates
horde-sdk
to 0.14.1Release notes
Sourced from horde-sdk's releases.
Commits
274d58d
Merge pull request #237 from Haidra-Org/main565d28a
fix: don't crash if ti strength is 0Updates
horde-engine
to 2.14.5Release notes
Sourced from horde-engine's releases.
Commits
c94d6d9
Merge pull request #319 from Haidra-Org/main85973b2
fix: addaggressive_unloading
arg toHordeLib.__new__(...)
7372958
ci: update changelog7481314
Merge pull request #318 from Haidra-Org/main2d58136
tests:disable_smart_memory=True
1ff7fe8
tests: run a sd15 job at 2048x during tests18881b1
fix: configurablemodels_not_to_force_load
44e3981
fix: rely on comfyui internals for loading cascade series models8767454
fix:aggressive_unloading = True
by defaulteed7c5b
feat:aggressive_unloading
for more regular garbage collectionUpdates
pytest
from 8.3.1 to 8.3.2Release notes
Sourced from pytest's releases.
Commits
bbcec9c
Prepare release version 8.3.278fe8b6
Merge pull request #12657 from pytest-dev/patchback/backports/8.3.x/6c806b499...238bad2
Merge pull request #12656 from RonnyPfannschmidt/fix-12652-detect-conda-envae6034a
Merge pull request #12641 from pytest-dev/patchback/backports/8.3.x/c03989cee...31337ab
Merge pull request #12640 from pytest-dev/update-userca3070b
Merge pull request #12637 from pytest-dev/release-8.3.1Updates
mypy
from 1.11.0 to 1.11.2Commits
789f02c
Bump version to 1.11.2917cc75
An alternative fix for a union-like literal string (#17639)7d805b3
Unwrap TypedDict item types before storing (#17640)32675dd
Revert "Fix Literal strings containing pipe characters" (#17638)778542b
Revert "FixRawExpressionType.accept
crash with--cache-fine-grained
" (#1...14ab742
Bump version to 1.11.2+dev570b90a
Bump version to 1.11b3a102e
FixRawExpressionType.accept
crash with--cache-fine-grained
(#17588)aec04c7
Fix PEP 604 isinstance caching (#17563)cb44e4d
Fixtyping.TypeAliasType
being undefined on python < 3.12 (#17558)Updates
black
from 24.4.2 to 24.8.0Release notes
Sourced from black's releases.
Changelog
Sourced from black's changelog.
Commits
b965c2a
Prepare release 24.8.0 (#4426)9ccf279
Documentfind_project_root
ignoringpyproject.toml
without[tool.black]
...14b6e61
fix: Enhace black efficiently to skip directories listed in .gitignore (#4415)b1c4dd9
fix: respect braces better in f-string parsing (#4422)4b4ae43
Fix incorrect linenos on fstring tokens with escaped newlines (#4423)7fa1faf
docs: fix the installation command of extra for blackd (#4413)8827acc
Bump sphinx from 7.3.7 to 7.4.0 in /docs (#4404)b0da11d
Bump furo from 2024.5.6 to 2024.7.18 in /docs (#4409)721dff5
fix: avoid formatting backslash strings inside f-strings (#4401)7e2afc9
Updateactions/checkout
to v4 to stop node deprecation warnings (#4379)Updates
ruff
from 0.5.4 to 0.6.3Release notes
Sourced from ruff's releases.
... (truncated)
Changelog
Sourced from ruff's changelog.
... (truncated)
Commits
ee258ca
Bump version to 0.6.3 (#13152)b4d9d26
Update faq.md to highlight changes to src (#13145)a998320
[ruff
] - extend comment deletions for unused-noqa (RUF100
) (#13105)770ef2a
[red-knot] support deferred evaluation of type expressions (#13131)c6023c0
[red-knot] Add docs on usingRAYON_NUM_THREADS
for better logging (#13140)df694ca
[FastAPI
] Avoid introducing invalid syntax in fix for `fast-api-non-annotat...2e75cfb
FormatPYI
examples in docs as.pyi
-file snippets (#13116)cfafaa7
[red-knot] Remove very noisy tracing call when resolvingImportFrom
stateme...3e9c7ad
Replace crates by dependi for VS Code Dev Container (#13125)81cd438
red-knot: infer and display ellipsis type (#13124)Updates
tox
to 4.18.0Release notes
Sourced from tox's releases.
Changelog
Sourced from tox's changelog.