Skip to content

Build numpy for preview Python (3.15/3.15t) and host on download.pytorch.org - #8362

Merged
atalman merged 4 commits into
pytorch:mainfrom
atalman:atalman/build-numpy-preview-py315
Jul 24, 2026
Merged

Build numpy for preview Python (3.15/3.15t) and host on download.pytorch.org#8362
atalman merged 4 commits into
pytorch:mainfrom
atalman:atalman/build-numpy-preview-py315

Conversation

@atalman

@atalman atalman commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

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.ymlworkflow_dispatch workflow, matrix over both arches:
    • x86_64 → linux.2xlarge + pytorch/manylinux2_28-builder:cpu
    • aarch64 → linux.arm64.m8g.4xlarge + pytorch/manylinux2_28_aarch64-builder:cpu-aarch64
    • Inputs: numpy_version (default 2.5.1), python_versions (default 3.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 with auditwheel repair --plat manylinux_2_28_<arch>, and uploads to s3://pytorch/whl/<channel>/ with --acl public-read + checksum-sha256 metadata (matching the binary upload workflow).

After a real (non-dry) run, the existing hourly update-s3-html workflow republishes the whl/<channel> package indices to include numpy.

Testing

  • Defaults to dry_run=true (build-only, no upload) for a first sanity check.

…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.
@vercel

vercel Bot commented Jul 23, 2026

Copy link
Copy Markdown

@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.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 23, 2026
atalman added 3 commits July 23, 2026 11:32
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.
@atalman
atalman merged commit e2d4883 into pytorch:main Jul 24, 2026
6 of 7 checks passed
atalman added a commit that referenced this pull request Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants