Build numpy for preview Python (3.15/3.15t) and host on download.pytorch.org - #8362
Merged
Merged
Conversation
…on download.pytorch.org numpy does not yet publish cp315 wheels on PyPI, so torch preview-Python wheel builds and smoke tests fail when pip resolves numpy from an sdist. This adds a workflow_dispatch workflow that builds numpy from source inside the manylinux2_28 builder images for cp315/cp315t on x86_64 and aarch64, repairs the wheels with auditwheel, and uploads them to s3://pytorch/whl/<channel>/ so the pytorch index can serve them.
|
@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. |
Add a paths-filtered pull_request trigger so the numpy build is exercised in CI (build only, no AWS credentials, no upload). Gate the AWS/upload steps on workflow_dispatch with dry_run disabled, and fall back to defaults for the build inputs since inputs.* are null on pull_request events.
The manylinux free-threaded interpreter lives at /opt/python/cp315-cp315t (only the ABI tag carries the 't', not the interpreter tag), not /opt/python/cp315t-cp315t. Fix py_bin so 3.15t resolves correctly.
download.pytorch.org is R2-backed, so wheels must be published to both s3://pytorch (S3, via OIDC role) and s3://pytorch-downloads (R2, via R2 access keys), mirroring the binary upload workflow. Move upload out of the build script into dedicated workflow steps so the two credential contexts are managed separately; the script now only builds the wheelhouse.
zxiiro
approved these changes
Jul 24, 2026
This was referenced Jul 24, 2026
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
numpy does not yet publish cp315 wheels on PyPI, so torch preview-Python (3.15 / 3.15t) wheel builds and smoke tests fail when pip tries to resolve numpy and falls back to building it from an sdist. This adds tooling to pre-build numpy and host it on download.pytorch.org so those installs resolve a real wheel.
Related: #8357 (which currently works around the missing numpy with
--no-deps).What this adds
.github/workflows/build-numpy-preview.yml—workflow_dispatchworkflow, matrix over both arches:linux.2xlarge+pytorch/manylinux2_28-builder:cpulinux.arm64.m8g.4xlarge+pytorch/manylinux2_28_aarch64-builder:cpu-aarch64numpy_version(default2.5.1),python_versions(default3.15 3.15t),channel(nightly/test, selects the matching IAM role),manywheel_version,dry_run(default true)..github/scripts/build_numpy_preview.sh— builds numpy from sdist against each/opt/python/cp315*interpreter, repairs withauditwheel repair --plat manylinux_2_28_<arch>, and uploads tos3://pytorch/whl/<channel>/with--acl public-read+checksum-sha256metadata (matching the binary upload workflow).After a real (non-dry) run, the existing hourly
update-s3-htmlworkflow republishes thewhl/<channel>package indices to include numpy.Testing
dry_run=true(build-only, no upload) for a first sanity check.