Skip to content

Conversation

@albanD
Copy link
Collaborator

@albanD albanD commented Jul 26, 2023

This compiles with python 3.12
You can get numpy from https://anaconda.org/scientific-python-nightly-wheels/numpy/files so that you don't need to remove numpy from test files.

Basic core tests work but obviously dynamo and first class dims don't work.

cc @voznesenskym @penguinwu @anijain2305 @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @ipiszy @chenyang78 @aakhundov

@pytorch-bot
Copy link

pytorch-bot bot commented Jul 26, 2023

🔗 Helpful Links

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

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

✅ You can merge normally! (1 Unrelated Failure)

As of commit 9a50db8 with merge base 79b3a9f (image):

UNSTABLE - The following job failed but was likely due to flakiness present on trunk and has been marked as unstable:

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

@albanD albanD changed the title Quick and dirty Python 3.12 build fixes Initial Python 3.12 build fixes Aug 23, 2023
jinja2
fsspec
# setuptools was removed from default python install
setuptools ; python_version >= "3.12"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are we going to get people to stop using setup.py directly 🤔

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 don't think we have a good alternative at the moment. The setuptools package doesn't seem to be going anywhere anytime soon: https://pypi.org/project/setuptools/

@ezyang
Copy link
Contributor

ezyang commented Aug 24, 2023

this is clearly not ready, how would you like to proceed with review?

@albanD albanD marked this pull request as ready for review August 24, 2023 14:23
@albanD
Copy link
Collaborator Author

albanD commented Aug 24, 2023

Actually I would argue this is ready for review.
Just like we did for 3.11 I think it is best to just land this so that each team can start fixing their own tests in parallel.
I can add more strict errors in Dynamo if you want? But the probability of anyone building from source with 3.12 is quite low I would say.

#if PY_VERSION_HEX >= 0x030C0000 // 3.12
#error "Please ensure that the functions below still match the CPython implementation for 3.12"
// Spoiler alert: They don't! This will be done in a follow up.
// #error "Please ensure that the functions below still match the CPython implementation for 3.12"
Copy link
Contributor

Choose a reason for hiding this comment

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

Are you planning to do this?

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 am planning on doing some of the C++ cleanup to build a case to share with the CPython team yes.
I am not planning on making Dynamo fully work though. There will need to be some staffing from the Dynamo side to fix this (like we did for 3.11).

#if IS_PYTHON_3_12_PLUS
// Most of these don't exist in 3.12 anymore.
// _PyFunction_CopyWithNewCode and _PyFrame_InitializeSpecials in particular
PyFunctionObject* func;
Copy link
Contributor

Choose a reason for hiding this comment

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

This seems bad. At minimum you should error in this branch right?

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 can make that an error yes.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

sure I guess

@albanD
Copy link
Collaborator Author

albanD commented Aug 24, 2023

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Aug 24, 2023
@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: This PR needs a release notes: label
If your changes are user facing and intended to be a part of release notes, please use a label starting with release notes:.

If not, please add the topic: not user facing label.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "topic: not user facing"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

Details for Dev Infra team Raised by workflow job

@albanD albanD added the topic: not user facing topic category label Aug 25, 2023
@albanD
Copy link
Collaborator Author

albanD commented Aug 25, 2023

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request Merged module: dynamo topic: not user facing topic category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants