8000 [PT-D]Track PT-D fixes for release blocker to upgrade to PT 3.11 · Issue #92319 · pytorch/pytorch · GitHub < 8000 meta name="octolytics-dimension-repository_network_root_id" content="65600975" />
[go: up one dir, main page]

Skip to content
[PT-D]Track PT-D fixes for release blocker to upgrade to PT 3.11 #92319
Closed
@wz337

Description

@wz337

Overview
Python 3.11 was released in Oct 2022. It is the first release to include work from the “Faster 7CD3 CPython” workgroup. They advertise speedups between 10 and 60% depending on the workload without any change to the user code.

The issue for adding support in PyTorch #86566 is already getting to the top of the list of issues when sorted by 👍 and 🚀reactions. We are also getting almost one issue a day at this point about people asking for conda support for 1.13 and/or because some features are broken in the current pip package we provide.
In the short term, with PyTorch 2.0 being a performance focused release, native python speedup can only be beneficial for the user experience.

Some of the main features of interest added here are:
Frozen imports / Static code objects (to speed up startup)
Cheaper, lazy Python frames
Inlined Python function calls
Specializing Adaptive Interpreter (a very basic jit)
More concise exception representation

Of course adding a new version of Python is a significant amount of work on the Infrastructure side (both for core and extended) and for this particular release, the low level changes in CPython lead to issues for PyTorch, especially for components like TorchScipt and Dynamo.

The goal of this document is to have a full list of what needs to be done for 3.11 support to be on par with all the other python versions.
The goal is also to align on what we consider release blocker for 2.0 (if not everything can be done by then).

Details for all distributed related failures are as follows:

DISTRIBUTED #92301
Failures related to dataclasses
distributed/test_distributed_spawn for example
File "/home/albandes/local/installs/python3.11/release/install/lib/python3.11/dataclasses.py", line 815, in _get_field
raise ValueError(f'mutable default {type(f.default)} for field '
ValueError: mutable default <class 'torch.distributed._shard.sharded_tensor.metadata.TensorProperties'> for field tensor_properties is not allowed: use default_factory
Most likely due to https://docs.python.org/3/whatsnew/3.11.html#dataclasses
One error test_launch_user_script
File "/home/albandes/local/pytorch/3.11_release_source/torch/distributed/elastic/multiprocessing/api.py", line 162, in to_map
map[i] = val_or_map.get(i, Std.NONE)
AttributeError: 'NoneType' object has no attribute 'get'
One error test_from_value
File "/home/albandes/local/pytorch/3.11_release_source/test/distributed/elastic/multiprocessing/api_test.py", line 94, in test_from_value
self.assertEqual(Std.NONE, Std.from_str("0"))

cc @ezyang @gchanan @zou3519 @mrshenli @pritamdamania87 @zhaojuanmao @satgera @rohan-varma @gqchen @aazzolini @osalpekar @jiayisuse @H-Huang @kwen2501 @awgu

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0