Skip to content

[dynamo] [3.14] Support np._CopyMode#167619

Closed
rtimpe wants to merge 3 commits intogh/rtimpe/25/basefrom
gh/rtimpe/25/head
Closed

[dynamo] [3.14] Support np._CopyMode#167619
rtimpe wants to merge 3 commits intogh/rtimpe/25/basefrom
gh/rtimpe/25/head

Conversation

@rtimpe
Copy link
Copy Markdown
Collaborator

@rtimpe rtimpe commented Nov 12, 2025

Stack from ghstack (oldest at bottom):

Upgrading scipy to 1.16 introduced errors related to the copy parameter of
np.array. Add special handling for np._CopyMode.IF_NEEDED, which is not
handled correctly, but matches the existing behavior when copy=None.

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

[ghstack-poisoned]
rtimpe added a commit that referenced this pull request Nov 12, 2025
ghstack-source-id: 37d9a5b
Pull-Request: #167619
@pytorch-bot
Copy link
Copy Markdown

pytorch-bot bot commented Nov 12, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit c7f56ed with merge base 115016f (image):
💚 Looks good so far! There are no failures yet. 💚

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

rtimpe added a commit that referenced this pull request Nov 12, 2025
Upgrading scipy to 1.16 introduced errors related to the `copy` parameter of
`np.array`.  Add special handling for `np._CopyMode.IF_NEEDED`, which is not
handled correctly, but matches the existing behavior when `copy=None`.

ghstack-source-id: 37d9a5b
Pull-Request: #167619
@rtimpe rtimpe added the topic: not user facing topic category label Nov 12, 2025
@rtimpe rtimpe requested a review from amjames November 12, 2025 17:22
[ghstack-poisoned]
rtimpe added a commit that referenced this pull request Nov 12, 2025
Upgrading scipy to 1.16 introduced errors related to the `copy` parameter of
`np.array`.  Add special handling for `np._CopyMode.IF_NEEDED`, which is not
handled correctly, but matches the existing behavior when `copy=None`.

ghstack-source-id: 55205a5
Pull-Request: #167619
@rtimpe rtimpe marked this pull request as ready for review November 12, 2025 21:52
@rtimpe rtimpe requested a review from williamwen42 November 12, 2025 21:52

x = np.array([1, 2, 3])
# Should run without throwing an exception
f(x)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Check for expected value just for consistency?

[ghstack-poisoned]
@pytorchmergebot
Copy link
Copy Markdown
Collaborator

Starting merge as part of PR stack under #167681

pytorchmergebot pushed a commit that referenced this pull request Nov 13, 2025
This is related to upgrading numpy versions, not 3.14 specifically.  See numpy/numpy#27148
Pull Request resolved: #167681
Approved by: https://github.com/williamwen42
ghstack dependencies: #167619
Khanaksahu pushed a commit to Khanaksahu/pytorch that referenced this pull request Nov 17, 2025
Upgrading scipy to 1.16 introduced errors related to the `copy` parameter of
`np.array`.  Add special handling for `np._CopyMode.IF_NEEDED`, which is not
handled correctly, but matches the existing behavior when `copy=None`.

ghstack-source-id: 9af0378
Pull-Request: pytorch/pytorch#167619
Silv3S pushed a commit to Silv3S/pytorch that referenced this pull request Nov 18, 2025
Upgrading scipy to 1.16 introduced errors related to the `copy` parameter of
`np.array`.  Add special handling for `np._CopyMode.IF_NEEDED`, which is not
handled correctly, but matches the existing behavior when `copy=None`.

Pull Request resolved: pytorch#167619
Approved by: https://github.com/williamwen42
Silv3S pushed a commit to Silv3S/pytorch that referenced this pull request Nov 18, 2025
This is related to upgrading numpy versions, not 3.14 specifically.  See numpy/numpy#27148
Pull Request resolved: pytorch#167681
Approved by: https://github.com/williamwen42
ghstack dependencies: pytorch#167619
rtimpe added a commit that referenced this pull request Nov 20, 2025
This fixes the dynamo-unittest workflow.  This test was fixed in
#167619 but wasn't caught because these
tests are skipped for numpy versions > 2.0 (meaning our CI for 3.13 doesn't run
them).  As a separate task, we should update all of these tests for recent numpy
versions so we can start running them again.

ghstack-source-id: 61eae6f
Pull-Request: #168299
pytorchmergebot pushed a commit that referenced this pull request Nov 21, 2025
This fixes the dynamo-unittest workflow.  This test was fixed in
#167619 but wasn't caught because these
tests are skipped for numpy versions > 2.0 (meaning our CI for 3.13 doesn't run
them).  As a separate task, we should update all of these tests for recent numpy
versions so we can start running them again.
Pull Request resolved: #168299
Approved by: https://github.com/williamwen42
JacobSzwejbka pushed a commit that referenced this pull request Dec 8, 2025
This fixes the dynamo-unittest workflow.  This test was fixed in
#167619 but wasn't caught because these
tests are skipped for numpy versions > 2.0 (meaning our CI for 3.13 doesn't run
them).  As a separate task, we should update all of these tests for recent numpy
versions so we can start running them again.
Pull Request resolved: #168299
Approved by: https://github.com/williamwen42
@github-actions github-actions bot deleted the gh/rtimpe/25/head branch December 14, 2025 02:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants