Skip to content
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

NumPy 2.0 support #67291

Open
jakirkham opened this issue May 10, 2024 · 6 comments
Open

NumPy 2.0 support #67291

jakirkham opened this issue May 10, 2024 · 6 comments
Assignees
Labels
override-stale This label should be used to override stale bot action on PR and Issue which demands additional time type:feature Feature requests type:others issues not falling in bug, perfromance, support, build and install or feature

Comments

@jakirkham
Copy link

jakirkham commented May 10, 2024

Problem description

NumPy 2.0 is coming out soon ( numpy/numpy#24300 ). NumPy 2.0.0rc1 packages for conda & wheels came out a month ago ( numpy/numpy#24300 (comment) )

Feature description

NumPy has put out a migration guide. More details are in the release notes

If TensorFlow make use of NumPy's C API (and produces wheels that use it), having a release of TensorFlow with wheels built against NumPy 2.0.0rc1 would be helpful to ensure NumPy 1 & 2 compatible wheels (as wheels built against NumPy 1 won't be compatible with NumPy 2). More details in this NumPy 2 ABI doc

Also would recommend incorporating NumPy 2 in TensorFlow's CI

Also as NumPy is tracking ecosystem support for NumPy 2.0, it would be helpful to share TensorFlow's current support status in issue (with any plans): numpy/numpy#26191

Additional information

There has been some discussion about TensorFlow's NumPy 2 plans here: numpy/numpy#26191 (comment)

Also the Keras team is interested in this question as they depend on TensorFlow: keras-team/keras#19691 (comment)

Lastly was unable to find an existing issue by searching or asking AI. So went ahead and opened this. If there's an existing one, happy to close and follow that

cc @MichaelHudgins @jakevdp @rgommers (for vis)

@jakirkham
Copy link
Author

Am curious if anyone has had a chance to look into this. No worries if not

It is worth noting that NumPy is planning to release 2.0 on June 16th: numpy/numpy#24300 (comment)

@jakirkham
Copy link
Author

Friendly nudge 😉

Do we have a sense of where this is in the queue?

@MichaelHudgins
Copy link
Collaborator

Sorry for the late reply, TF is working on the upgrade but it may not make the upcoming branchcut to ensure all cases around datatype promotion are handled correctly. @kanglant is working on the upgrade and ensuring test owners verify updates. We will give another status update by Friday on if it will make the 2.17 branchcut and when it can be expected in the nightly branch.

@jakirkham
Copy link
Author

Thanks Michael! 🙏

No worries

Are Kanglan's changes in a PR? Or could they be added to one? Maybe members of the community could help review 🙂

FWIW did see these merged PRs:

Are there any others?

@MichaelHudgins
Copy link
Collaborator

No other PRs right now that i think are ready yet.

I can say that at this point it looks like we will not make the target of next week's branchcut. We need to verify if any of the fixes or modifications cause api level changes given TF's API compatibility guidelines. We will target to get it into nightly as soon as we can. We will look to use this issue to give regular updates until have made the 2.0 upgrade.

@MichaelHudgins MichaelHudgins added the override-stale This label should be used to override stale bot action on PR and Issue which demands additional time label May 31, 2024
@jakirkham
Copy link
Author

Would recommend that any released packages (wheels or otherwise) have an upper bound to disallow NumPy 2

Mentioning this as NumPy is planning to release on June 16th: numpy/numpy#24300 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
override-stale This label should be used to override stale bot action on PR and Issue which demands additional time type:feature Feature requests type:others issues not falling in bug, perfromance, support, build and install or feature
Projects
None yet
Development

No branches or pull requests

4 participants