8000 [Not to be merged] Update to compile and run test_torch with 3.13t by albanD · Pull Request #130689 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[Not to be merged] Update to compile and run test_torch with 3.13t #130689

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

Closed
wants to merge 9 commits into from

Conversation

albanD
Copy link
Collaborator
@albanD albanD commented Jul 14, 2024

This PR includes:

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @chenyang78 @kadeng @chauhang @amjames @rec

Copy link
pytorch-bot bot commented Jul 14, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/130689

Note: Links to docs will display an error until the docs builds have been completed.

❌ 5 New Failures, 4 Cancelled Jobs, 1 Unrelated Failure

As of commit 98be449 with merge base 9b2e453 (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOBS - The following jobs were cancelled. Please retry:

FLAKY - The following job failed but was likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the release notes: jit release notes category label Jul 14, 2024
@albanD albanD requested review from Skylion007 and malfet July 14, 2024 13:18
@guangyey
Copy link
Collaborator

@albanD I see you would to upgrade sympy to 1.13 or later. Different sympy versions have different behavior.
FYI #130729

@albanD
Copy link
Collaborator Author
albanD commented Jul 15, 2024

I will most likely split this and the pybind upgrade to separate PRs for sure.
Is the CI being all green a good signal that this upgrade is most likely ok? I'll open a separate PR with the relevant people to make sure.

@albanD albanD mentioned this pull request Jul 16, 2024
@XuehaiPan XuehaiPan added ciflow/trunk Trigger trunk jobs on your pull request ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/mps Run MPS tests (subset of trunk) ciflow/inductor ciflow/rocm Trigger "default" config CI on ROCm ciflow/xpu Run XPU CI tasks labels Jul 16, 2024
@XuehaiPan XuehaiPan mentioned this pull request Jul 17, 2024
@albanD albanD changed the title Update to compile and run test_torch with 3.13t [Not to be merged] Update to compile and run test_torch with 3.13t Jul 17, 2024
@albanD albanD mentioned this pull request Jul 17, 2024
37 tasks
@albanD albanD requested a review from jeffdaily as a code owner July 17, 2024 18:02
pytorchmergebot pushed a commit that referenced this pull request Jul 20, 2024
------

The opposite of #130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- #130836

See the PR description of #130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of #130689.

- #130689

Pull Request resolved: #130895
Approved by: https://github.com/ezyang
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 20, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
XuehaiPan added a commit to XuehaiPan/pytorch that referenced this pull request Jul 21, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
DiweiSun pushed a commit to DiweiSun/pytorch that referenced this pull request Jul 22, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
pickler = pickle_module.Pickler(data_buf, protocol=pickle_protocol)
pickler.persistent_id = persistent_id

class PyTorchPickler(pickle_module.Pickler):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused at the lint failure on this one haha
The one above is ok

xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Jul 25, 2024
------

The opposite of pytorch#130836. Pin `sympy >= 1.13.0` for Python >= 3.9 and `sympy == 1.12.1` for Python 3.8.

- pytorch#130836

See the PR description of pytorch#130836 for more details.

`sympy` 1.13.0 introduces some breaking changes which break our tests. More specifically:

- Ref [Backwards compatibility breaks and deprecations](https://github.com/sympy/sympy/wiki/release-notes-for-1.13.0#backwards-compatibility-breaks-and-deprecations)

> BREAKING CHANGE: Float and Integer/Rational no longer compare equal with a == b. From now on Float(2.0) != Integer(2). Previously expressions involving Float would compare unequal e.g. x*2.0 != x*2 but an individual Float would compare equal to an Integer. In SymPy 1.7 a Float will always compare unequal to an Integer even if they have the same "value". Use sympy.numbers.int_valued(number) to test if a number is a concrete number with no decimal part. ([pytorch#25614](sympy/sympy#25614) by [@smichr](https://github.com/smichr))

`sympy >= 1.13.0` is required to enable Python 3.13 support. This should be part of pytorch#130689.

- pytorch#130689

Pull Request resolved: pytorch#130895
Approved by: https://github.com/ezyang
@XuehaiPan
Copy link
Collaborator

FYI, there is a tracker for optree Python 3.13t support (3.13 is already supported via sdist).

albanD and others added 7 commits September 21, 2024 17:17
…_and_store` (pytorch#130341)

Fix static `py::object`s with `py::gil_safe_call_once_and_store`.

The following code will leak a `py::object` which will call its destructor when shutdown the program. The destructor will call `Py_DECREF(obj.m_ptr)` which may raise a segmentation fault.

```c++
void func() {
    static py::object obj = py::module_::import("foo").attr("bar");

    ...
}
```

The correct code is to use raw pointers rather than the instance.

```c++
void func() {
    static py::object* obj_ptr = new py::object{py::module_::import("foo").attr("bar")};
    py::object obj = *obj_ptr;

    ...
}
```

This PR uses the `py::gil_safe_call_once_and_store` function from `pybind11`, which can run arbitrary initialization code only once under the Python GIL thread safely.

```c++
void func() {
    PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store<py::object> storage;
    py::object obj = storage
                         .call_once_and_store_result(
                             []() -> py::object {
                                 return py::module_::import("foo").attr("bar");
                             }
       
6D40
                  )
                         .get_stored();

    ...
}
```

Pull Request resolved: pytorch#130341
Approved by: https://github.com/ezyang
@pytorch-bot pytorch-bot bot added the topic: not user facing topic category label Sep 23, 2024
@albanD
Copy link
Collaborator Author
albanD commented Oct 8, 2024

Ho no need to update this one, the key pieces were landed so closing this PR!
Will revive the final numpy 2.0 changes in the context of 3.13 ci enablement (not 3.13t).

@albanD albanD closed this Oct 8, 2024
albanD added a commit to albanD/pytorch that referenced this pull request Oct 18, 2024
albanD added a commit to albanD/pytorch that referenced this pull request Oct 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/inductor ciflow/mps Run MPS tests (subset of trunk) ciflow/periodic Trigger jobs ran periodically on master (periodic.yml) on the PR ciflow/rocm Trigger "default" config CI on ROCm ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks module: dynamo not4land release notes: jit release notes category topic: not user facing topic category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0