Signalboosting that torch.compile is now compatible with Python 3.14! You can try it out today with the nightly PyTorch binaries. 3.14 support will be included in the next PyTorch release, 2.10.
The no-GIL builds, 3.13t and 3.14t have basic support - torch.compile can run in those builds but multi-threading with torch.compile is still not supported.
There were not too many significant Dynamo changes needed to support Python 3.14. But a number of Python 3.14 changes affected PyTorch as a whole:
-
Changes to
__annotations__: Significantly, this broke TorchScript. As a result, we are now skippingtorch.jitunit tests and are issuing warnings in 3.14+ on TS usage. -
Default
multiprocessingstart method: Changed fromforktoforkserver, which affectedDataLoadertests. The fix was to manually set the start method back tofork. -
Pickling changes: The Python pickler now returns different exceptions for some pickling failures. A number of sites in the codebase that caught such errors needed to be updated.
-
Integer conversion changes:
__int__no longer calls__trunc__, which affected integer conversion of symbolic floats. -
Introduction of
PyStackRefs in CPython implementation: Required moderate changes to the C/C++ parts of Dynamo.
Previous posts on torch.compile support for new Python versions: