Skip to content

workflows: add build-torch.yml for riscv64 manywheel builds - #218

Draft
luhenry wants to merge 11 commits into
mainfrom
torch
Draft

workflows: add build-torch.yml for riscv64 manywheel builds#218
luhenry wants to merge 11 commits into
mainfrom
torch

Conversation

@luhenry

@luhenry luhenry commented Aug 11, 2026

Copy link
Copy Markdown
Member

Add workflow to build torch manywheel wheels for riscv64 using pytorch's manylinux2_39_riscv64 builder image. Includes two patches for v2.9.0: docker image support and manywheel script changes (corresponds to pytorch/pytorch#191657).

@github-actions

github-actions Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1

QR code for preview link

🚀 View preview at
https://riseproject-dev.github.io/python-wheels/pr-preview/pr-218/

Built to branch gh-pages at 2026-08-13 12:17 UTC.
Preview will be ready when the GitHub Pages deployment is complete.

Add workflow to build torch manywheel wheels for riscv64 using
pytorch's manylinux2_39_riscv64 builder image.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
luhenry and others added 10 commits August 12, 2026 00:23
Regenerate patches targeting v2.13.0 (the first pytorch release with
the new-style manywheel pipeline including build_all.sh).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The glob in 'git apply .../00*.patch' is not expanded when the pattern
has no match (new version), causing git to treat the glob literally.
Use explicit 0001/0002 filenames instead.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Globs don't expand when passed as arguments to git apply; use full
filenames instead.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
v0.3.33 (install_openblas.sh's default) fails to compile on riscv64:
dynamic_riscv64.c:187:26: error: 'coremsg' undeclared. v0.3.34 declares
the missing buffer. Override via OPENBLAS_VERSION build-arg in the
riscv64 case of .ci/docker/manywheel/build.sh.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
DOCKER_GPU_BUILD_ARG's --build-arg OPENBLAS_VERSION=v0.3.34 was
silently overridden: build.sh unconditionally appends its own
--build-arg "OPENBLAS_VERSION=${OPENBLAS_VERSION:-}" later on the
docker build command line, and a later --build-arg for the same key
wins, so the build still picked up the default v0.3.33 and failed the
same way. Set OPENBLAS_VERSION as a plain shell variable in the case
branch instead, which flows into that later --build-arg correctly.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Backport pytorch/pytorch@0c9f3678 (first included in v2.14.0-rc1):
riscv64-specific fixes for install_openblas.sh (disable zvfbfwma with
GCC < 15), install_base.sh (no valgrind on riscv64), install_cache.sh
(sccache riscv64gc arch + no sccache-dist), ubuntu/Dockerfile
(PIP_EXTRA_INDEX_URL/PIP_PREFER_BINARY args), build.sh and
.ci/pytorch/build.sh (riscv64 native build env).

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
manywheel/build.sh only tags the image locally (no push logic).
WITH_PUSH/REMOTE_BUILDKIT are only consumed by .ci/docker/build.sh
(the ubuntu image path), not the manywheel path. Add an explicit
'docker push' after the build so the image lands in ghcr.io and
build_wheels can pull it.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
The build_wheels job checked pytorch out at the workspace root, but its
Patch/Populate/Build steps all use 'working-directory: pytorch' and
PYTORCH_ROOT points at $GITHUB_WORKSPACE/pytorch. The container failed
to chdir into the non-existent directory:

  OCI runtime exec failed: chdir to cwd
  ("/__w/python-wheels/python-wheels/pytorch") failed:
  no such file or directory

Add 'path: pytorch' to match docker-builds and PYTORCH_ROOT.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant