Add Python 3.10 Support for PyTorch Builds#2782
Conversation
HereThereBeDragons
left a comment
There was a problem hiding this comment.
i approve this now, but as you already stated, this can only be merged after the infrastructure is there to actually build/run with python 3.10
marbre
left a comment
There was a problem hiding this comment.
What about the failing Linux build for gfx1153?
e67cd5a to
4cd42ee
Compare
e04301e to
b4372c4
Compare
|
i removed my approval as there are plenty of new additions to this pr. |
9c27a63 to
af63e4b
Compare
7e9ba03 to
3077ce8
Compare
- Updated the supported Python versions in RELEASES.md and external-builds/pytorch/README.md to include Python 3.10. - Modified GitHub workflows for portable Linux and Windows PyTorch wheels to reflect the updated Python version matrix. This change ensures compatibility with Python 3.10 across relevant documentation and CI configurations.
af63e4b to
3a8ce09
Compare
ScottTodd
left a comment
There was a problem hiding this comment.
Marking this as "reviewed" until the dependent changes are merged first.
We should also keep an eye on CI/CD resource usage as the expand the matrix like this. We should have paths through our testing workflows/instructions (https://github.com/ROCm/TheRock/blob/main/docs/development/github_actions_debugging.md#testing-release-workflows and other docs) that limit themselves to a smaller subset of versions so we aren't constantly paying the high costs.
## Summary This PR fixes Python 3.10 compatibility issues in the ROCm SDK test suite and S3 dependency management. **This PR should be merged before #2782.** ## Changes ### 1. Test Suite: -P Flag Fix The Python -P flag is only available in 3.11+. Removed the -P flag entirely from all the files below for all the python version to keep the code simpler. Files: `test/utils.py`, `test/base_test.py`, `test/core_test.py`, `test/devel_test.py`, `test/libraries_test.py` **Why it's ok to skip on Python 3.10 & Other Python version** - The flag simply doesn't exist for 3.10, so we can't use it. - Tests still function correctly—they just lack this additional isolation layer - to keep the code simpler and having consistency ### 2. S3 networkx Version Management - **Upload multiple versions**: networkx 3.4.2 (for Python 3.10) and latest (for Python 3.11+) - **Improved version marking**: Only 3.4.2 gets `>=3.10`, all other networkx versions get `>=3.11` - Future-proof: handles networkx 4.x and beyond - Enables correct pip resolution based on Python version ### 3. Code Improvements - Removed `cp310` skip to enable Python 3.10 wheels - Refactored `PACKAGES_PER_PROJECT` to use consistent list types ### 4. Fix : ExitCode.OK: numeric argument required File: `external-builds/pytorch/run_pytorch_tests.py` Exit code from file: ExitCode.OK B:\runner\_work\_temp\4b851658-eb53-4550-8a2a-18d9c21ad67a.sh: line 4: exit: ExitCode.OK: numeric argument required https://github.com/ROCm/TheRock/actions/runs/21066243924 ## Related - pytorch/pytorch#152191 (networkx compatibility) - Depends on: #2782 (Python 3.10 PyTorch builds)' Tests: Tests are run on the branch `users/subodh-dubey-amd/pytorch-310-testing`, to check if the compatibility fixes work with python 3.10 adition. The branch `users/subodh-dubey-amd/pytorch-310-testing` is merge of - `users/subodh-dubey-amd/python-310-compatibility-fixes` - `users/subodh-dubey-amd/pytorch-310-workflow-changes` Results: - Release portable Linux PyTorch Wheels: - https://github.com/ROCm/TheRock/actions/runs/21107222465 - https://github.com/ROCm/TheRock/actions/runs/21100966209 - Release Windows PyTorch Wheels: - https://github.com/ROCm/TheRock/actions/runs/21094631015 - https://github.com/ROCm/TheRock/actions/runs/21077437501 --------- Co-authored-by: Marius Brehler <marius.brehler@amd.com>
|
@subodh-dubey-amd why was this merged? I don't see an approval by any of the reviewers. |
Seems like the original approval still satisfied the branch protection ruleset:
|
I assume it was not dismissed and @HereThereBeDragons rather re-requested a review from herself. Well, next time :) |
|
i tried to overwrite it - but apparently i tried it the wrong way :( if you look at the top you see i am set to "commented" and not "approved" |
Re-requesting a review does not revoke an approval it will still be approved. You rather need to dismiss the review next time if the contributor does not take your feedback serious enough. See https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/dismissing-a-pull-request-review. |



Summary
Adds Python 3.10 to the PyTorch build matrix and updates documentation.
Base: This PR is based on PR #2779 (compatibility fixes) and will be merged after it.
Changes
.github/workflows/release_portable_linux_pytorch_wheels.yml.github/workflows/release_windows_pytorch_wheels.ymlRELEASES.mdto reflect Python 3.10 supportexternal-builds/pytorch/README.mdminimum Python version to 3.10+Motivation
Python 3.10 is still widely used and many users have requested support for it.
Test Plan
Merge Order
Results: