PyTorch 2.4 Released: Python 3.12 and a Custom Operator API
PyTorch 2.4 added torch.compile support for Python 3.12, AOTInductor freezing for CPU, a libuv-based TCPStore backend for faster large-scale job startup, and a higher-level Python custom operator API.
Historical Archive. This article documents an event from 2024 and is preserved with its original date for reference. It is not current news, and details may have changed since publication.
What happened
PyTorch 2.4 was released on July 24, 2024, according to the official release notes in the PyTorch GitHub repository. Composed of 3,661 commits from 475 contributors since PyTorch 2.3, it continued the framework's rapid iteration on the compiler-based PyTorch 2 series.
Python 3.12 and custom operators
The headline was support for the latest Python version, 3.12, in torch.compile, keeping PyTorch current with the Python ecosystem. The release also introduced a new higher-level Python Custom Operator API that makes it easier to integrate custom kernels into PyTorch, especially so they work well with torch.compile, addressing a long-standing pain point for extending the framework.
Performance and distributed
PyTorch 2.4 added AOTInductor freezing for CPU, which gives developers running AOTInductor more optimizations by allowing serialization of MKLDNN weights. It switched the default TCPStore server backend to one built on libuv, which the team said should significantly reduce initialization times for large-scale distributed jobs, and added FSDP2, a DTensor-based per-parameter-sharding version of Fully Sharded Data Parallel, plus a simplified torch.distributed.pipelining API.
Other changes
The release changed the default intra-op thread-pool size from logical to physical cores to reduce oversubscription, brought torch.compile optimizations for AWS Graviton aarch64 processors, made Intel GPU available through a source build, and verified custom-operator schemas at registration time. It also began warning when torch.load is called without weights_only specified, nudging users toward safer weight loading.
Why it mattered
PyTorch 2.4 kept the dominant deep-learning framework aligned with the newest Python while lowering the barrier to extending it through the custom operator API. The libuv TCPStore and FSDP2 improvements in particular targeted the large-scale distributed training that underpins modern generative-AI workloads.
Related on Skillo
See also: PyTorch 2.1 and automatic dynamic shapes.
Sources
Published date reflects the original event date (2024-07-24). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.
Written by
Skillo Staff
0 Comments
Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.