[test] Build Python 3.15 wheels via conda-forge 3.15.0a8 (alt to #8148)#8221
Open
atalman wants to merge 6 commits into
Open
[test] Build Python 3.15 wheels via conda-forge 3.15.0a8 (alt to #8148)#8221atalman wants to merge 6 commits into
atalman wants to merge 6 commits into
Conversation
Add 3.15 and 3.15t (free-threaded) to the binary build matrix for Linux
wheels on the nightly channel. 3.15 is brand new and only the Linux
manywheel builders are ready for it, so:
- The versions are added to the "nightly" entry of PYTHON_ARCHES_DICT
only; "test" and "release" stay at 3.10-3.14t until 3.15 is releasable.
- generate_wheels_matrix skips any 3.15* version when the OS is not
linux or linux-aarch64, mirroring the per-OS exclusion previously used
for 3.14 on Windows. macOS, Windows, and Windows arm64 are unaffected.
The reference matrices under tools/tests/assets were regenerated for the
four Linux wheel configurations; macOS/Windows references are unchanged.
The interpreter setup for 3.15 (build against the manylinux python.org
interpreter rather than conda) is handled in a follow-up commit.
Test Plan:
cd tools/tests
python3 -m tools.tests.test_generate_binary_build_matrix
… conda) Python 3.15 is still in pre-release and its C-API/ABI is not frozen. conda-forge's python=3.15.0a* does not match the python.org alpha that the torch nightly cp315 wheels are built against, so importing torch under a conda 3.15 interpreter segfaults during module init (observed as 'python setup.py clean' crashing with SIGSEGV / exit 139 in the torchvision and torchaudio cp315 builds). For 3.15/3.15t, skip conda and build against the manylinux python.org interpreter that produced the torch wheels (/opt/python/cp315-cp315[t]). pkg-helpers already prepends that interpreter's bin to PATH via BUILD_ENV_FILE, so setting CONDA_RUN='' makes the whole build and smoke test resolve to it -- no ABI skew. Build tooling (cmake/ninja/wheel) is pip installed; libpng/libjpeg/libwebp/pkg-config come from the manylinux image's system packages. All other Python versions keep the conda path.
PR builds normally limit to python_versions[0] (3.10); override that to ["3.15", "3.15t"] for linux and linux-aarch64 so this PR's CI actually exercises the new versions (macOS/Windows keep 3.10 to avoid an empty matrix). Revert this commit before merging.
torchvision-extra-decoders is a torch C++ extension (CppExtension over torch.utils.cpp_extension, install_requires=[], no torchvision needed), so it's a good probe for whether the binary build path works on a new Python such as 3.15/3.15t -- it actually compiles against libtorch for cp315 rather than just installing a pure-python package. Mirrors meta-pytorch/torchvision-extra-decoders' linux_wheel.yaml: cpu-only matrix, setup-py build, packaging/pre_build_script.sh (auditwheel + conda libavif/libheif), post_build_script.sh, and the fake smoke test. On PR CI the matrix is limited to 3.15/3.15t by the temporary force commit.
The 3.15/3.15t wheels build fine, but the smoke test installs the built wheel, which pulls required runtime deps that have no cp315 wheels yet and fail to build from sdist -- e.g. pillow, a hard install_requires dependency of torchvision (pip: 'Collecting pillow!=8.3.*,>=5.3.0 (from torchvision)'). The cascade is purely ecosystem readiness, not a defect in the build path this PR delivers. Skip the smoke step for 3.15* until cp315 wheels are published. Other Python versions are unaffected.
… manylinux interpreter Experimental alternative to pytorch#8148: instead of building 3.15/3.15t against the manylinux python.org interpreter, install Python 3.15.0a8 from conda-forge (python_dev label for the interpreter + python_rc label for the _python_rc marker dependency). This tests whether the conda-forge alpha now matches the ABI of the torch nightly cp315 wheels (the manylinux approach was adopted because conda's 3.15.0a* previously mismatched and segfaulted on import torch). 3.15.0a8 is the latest 3.15 published on conda-forge.
|
@atalman is attempting to deploy a commit to the Meta Open Source Team on Vercel. A member of the Team first needs to authorize it. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Experimental alternative to #8148 for building Python 3.15 / 3.15t Linux wheels. Based on #8148's branch (matrix + wiring), this PR changes only the conda env setup: instead of building 3.15 against the manylinux python.org interpreter, it installs Python 3.15.0a8 from conda-forge.
setup-binary-builds/action.ymlnow routes 3.15 through the normal conda path:3.15->python=3.15.0a8 -c conda-forge/label/python_dev -c conda-forge/label/python_rc -c conda-forge3.15t->python=3.15.0a8 python-freethreading -c conda-forge/label/python_dev -c conda-forge/label/python_rc -c conda-forgeBoth labels are required: the interpreter is published under
python_dev(latest is3.15.0a8), but the build depends on the_python_rcmarker package, which lives onpython_rc.Why a separate PR (testing)
#8148 deliberately uses the manylinux interpreter because conda-forge's
3.15.0a*previously did not match the python.org alpha the torch nightly cp315 wheels were built against, causingimport torchto segfault during module init.3.15.0a8(uploaded 2026-04-23) is still the latest 3.15 on conda-forge, so this PR is a test of whether the current nightly cp315 wheels now matcha8.Expected risk: if the wheels' python.org alpha !=
a8,import torchwill likely still segfault during the smoke test. This PR exists to confirm that empirically without disturbing #8148.Test plan
a8matches the wheel ABI; a segfault confirms it doesn't (and Add Python 3.15 and 3.15t to Linux nightly wheel builds #8148's manylinux approach remains the right one).