Skip to content

numpy riscv64 support #15

Open
Open

Description

@threexc

Package name (on PyPI)

numpy

Source repository

https://github.com/numpy/numpy

Version(s) requested

No response

Why is this needed?

No response

Additional context

Work has already begun:

numpy/numpy#31488
numpy/numpy#31522

This will likely need additional stewardship upstream until riscv64 is accepted as a tier 1 or tier 2 architecture.

Activity

  1. added this to the upstream milestone on Jun 23, 2026
  2. added theissue type on Jun 23, 2026
  3. threexc commented on Jul 2, 2026

    @threexc
    CollaboratorAuthor

    The following two PRs led to us having a NumPy 2.5.0 build pass, and a package being uploaded to the registry:

    #98
    #99

    Note that as of 2.5.0, NumPy is only building for 3.12+, so this should be our approach for other packages too. I'll make a note about this in the dev guide once other documentation is merged.

  4. marked [upstreaming] numpy #4935 as a duplicate of this issue on Nov 18, 2026
  5. luhenry commented on Nov 18, 2026

    @luhenry
    Member

    /upstreaming pause reason="native artifact compatibility fix merged; end the old unverified investigation request without altering queue history"

  6. luhenry commented on Nov 18, 2026

    @luhenry
    Member

    /upstreaming resume revision=0 reason="run a fresh investigation with the approved hash-pinned native artifact compatibility fix from PR #4940; preserve the previous unverified Work"

  7. luhenry commented on Nov 19, 2026

    @luhenry
    Member

    /upstreaming clarify revision=1 decision=retry answer="Retry with the approved additive investigator v2 profile; preserve legacy Work and require a new verified Result."

  8. luhenry commented on Nov 19, 2026

    @luhenry
    Member

    /upstreaming pause revision=2 reason="Fence the cancelled v2 investigation before the approved v3 retry."

  9. luhenry commented on Nov 19, 2026

    @luhenry
    Member

    /upstreaming resume revision=2 reason="Retry with investigator v3: approved-integrity GitHub MCP and read-only web research for filtered history."

  10. github-actions commented on Nov 19, 2026

    @github-actions
    Contributor

    Upstreaming investigation result

    numpy already ships riscv64 downstream via riseproject-dev/python-wheels (build-numpy.yml; 1.26.4-2.5.3 published, merged PRs #98/#99) and upstream has native riscv64 CI (linux_riscv64.yml, PR 31488) and Tier 3 status in NEP 57 (PR 31522). PyPI 2.5.5 ships no riscv64 wheel. Official wheels require Tier 2: numpy-release forbids self-hosted runners and caching, so a riscv64 row there needs cross-compilation or a policy decision; rgommers invited a Tier 2 proposal on 2026-11-17. Recommended scope: no new python-wheels workflow work beyond tracking new releases (2.5.4/2.5.5 rows); upstream stewardship = keep Tier 3 CI green, support PR 33149 (RVV runners), triage 32376/32461, and prepare a Tier 2 proposal for numpy-discussion with a cross-compile design.

    Proposed direction

    • Summary: Admission class: investigation only (no patch). Allowed paths if later patch work in python-wheels is approved: .github/workflows/build-numpy.yml and docs/packages/numpy.yaml.
    • Release coverage: PyPI latest 2.5.5: manylinux/musllinux x86_64+aarch64, macOS x86_64/arm64, Windows win32/amd64/arm64; no riscv64, ppc64le or s390x. Source: https://pypi.org/pypi/numpy/json
    • Build backend and native deps: meson-python (mesonpy), meson, ninja, Cython>=3.1.0, scipy-openblas64 (ILP64) bundled; Highway vendored; PocketFFT vendored; no libmvec on riscv64; requires-python >=3.12 for 2.5+.
    • Release graph: Upstream: numpy-release wheels.yml (workflow_dispatch/cron on GitHub-hosted runners) -> trusted publishing to PyPI after manual approval. Upstream riscv64: numpy/numpy linux_riscv64.yml (push main, PR, dispatch, build only) and linux_qemu.yml (PR, non-blocking). Downstream: python-wheels build-numpy.yml -> _publish-wheel.yml -> pypi.riseproject.dev.
    • Architecture precedent: ppc64le/s390x: self-hosted IBM runners in linux-ibm.yml, Tier 3, no PyPI wheels, discussed in numpy issue 22318 with storage/cost objections. aarch64 is Tier 1 on GitHub-hosted ubuntu-24.04-arm and is the row a riscv64 Tier 2 entry would mirror in numpy-release (cross-compiled for riscv64 given no self-hosted runners).
    • Fork guards: if: github.repository == 'numpy/numpy' in linux_riscv64.yml, wheels.yml, linux_qemu.yml (or workflow_dispatch); numpy-release uses github.repository == 'numpy/numpy-release'.
    • Contribution rules: Title prefixes (CI:, BLD:, ENH:, BUG:, TST:, DOC:); PR template with AI disclosure (ai_policy); BSD-3; no CLA/DCO found; non-maintainers max 2 non-draft PRs.
    • Target matrix: Tier 3 current: cp312-manylinux_riscv64 (manylinux_2_39). Downstream python-wheels: cp312-cp314(t), manylinux_2_38/39 riscv64; musllinux rows pending.
    • Risks: numpy-release bans self-hosted runners/caching: Tier 2 needs cross-compile design; OpenBLAS #5811 DGEMM/Cholesky RVV regression; RISE runners lack RVV so CI cannot see it (PR 33149 aims to fix); Open riscv64 test failures 32376/32461 untriaged; PyPI storage limits made maintainers reluctant to add ppc64le; same argument may apply; Gap: python-wheels numpy.yaml lacks 2.5.4/2.5.5 builds; No upstream CI test step in linux_riscv64.yml
    • Unverified: Reported hardware atomic-CAS flakiness on RISE runners is single-source (PR 31488 comment) and not independently verified; Highway GCC/Clang RVV toolchain requirement discrepancy in report not resolved.

    Dependency and ecosystem evidence

    The graph models only PyPI-level metadata for numpy: no declared runtime dependencies (consistent with numpy having none), 3056 direct reverse dependents including the core scientific stack (scipy, pandas, scikit-learn, matplotlib, numba). It does NOT contain the native/build graph (OpenBLAS via scipy-openblas64, Highway, meson-python, Cython, cibuildwheel); those come from pyproject.toml and the sw-ecosystem report and are not graph edges, so no transitive build graph was inferred. The graph does not express build/optional/test dependency kinds for numpy and no conflicts with the checkout were found, only omissions.

    Ecosystem report: https://github.com/riseproject-dev/sw-ecosystem/blob/main/project-reports/numpy.md (91c6708e9e1809a43e4db100a31b46ed9b403164)

    Report: readiness yellow (build-only CI); RISC-V is NEP 57 Tier 3; no official PyPI riscv64 wheels; consumable wheels come from RISE channels (GitLab wheel_builder, python-wheels / pypi.riseproject.dev) and distros; no NPYV RVV backend.

    Research coverage

    Relevant prior work

    • accepted: Native riscv64 wheel-build workflow (linux_riscv64.yml) merged by rgommers after approval; kept out of wheels.yml and numpy-release.
    • accepted: RISC-V added as Tier 3 in NEP 57 (no PyPI wheels); merged by charris.
    • superseded: Matrix entry in wheels.yml with QEMU then native runners; rgommers/ngoldbaum objected to 38 min job and caching/self-hosted in release-synced workflow; replaced by 31488.
    • open: Proposes RVV-enabled runners so OpenBLAS/NPYV RVV paths are exercised in CI; no review decision yet.
    • rejected: Hand-written NPYV RVV intrinsics; maintainers prefer Highway-based approach.
    • accepted: RVV detection via riscv_hwprobe rather than hwcap; backported in 31538.
    • accepted: Fix failing riscv64 CI tests (expired key); self-merged by charris.
    • accepted: paths-ignore moved under pull_request in linux_riscv64.yml.
    • accepted: Deadlock tests exit quickly on slow hardware, helping riscv/ppc packagers.
    • open: Zfh native half-precision conversion for RISC-V; no maintainer review.
    • open: getauxval in cpu feature tests; mattip pinged seiko2plus, awaiting review.
    • open: Master tracking issue for riscv64 PyPI wheels; Tier 3 agreed, Tier 2 path open with numpy-release cross-compile constraint.
    • open: ppc64le precedent: not shipped to PyPI (storage limits, cost); resolved via NEP 57 Tier 3.
    • open: riscv64 floating-point-exception test failures on EasyBuild build; untriaged.
    • open: riscv64 test failures on conda-forge; deadlock-tests part fixed by 32466.

    Verified native Result: work 15a4d5e5426f482617ddb690a9d061d1961b23c13b9896893ba60a275c3ba697, claim c_4e7bec8c69711e6a15c12b8efc6779ddfc02eb04fe7e8bd2a2bf403b3ccc7b21_1, artifact 14534087320.
    This is investigation evidence, not an upstream approval or publication decision.

  11. removed theissue type on Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions