Skip to content

ENH: Build and distribute manylinux wheels for riscv64 #30216

Open

Description

@markdryan

Proposed new feature or change:

I'm opening this issue to start the discussion on what it would take to get the numpy project to build and distribute riscv64 manylinux images.

Why now?

Until recently, it wasn't really possible for Python projects to build binary riscv64 wheels and to distribute those wheels via PyPI. Manylinux and cibuildwheel did not support riscv64 and PyPI did not allow riscv64 wheels to be uploaded. This all changed during the summer of 2025, when cibuildwheel (3.12), manylinux and warehouse all gained riscv64 support. Encouragingly, some projects (lxml, uv, maturin, and critically ninja) have already started uploading riscv64 wheels to PyPI.

Does numpy work on riscv64?

Yes. RISE has been building and distributing numpy manylinux wheels for riscv64 for over a year. Tested builds of numpy==2.3.4 (and some earlier versions) are available for riscv64 here.

There is also already some CI coverage for riscv64 in the upstream numpy project. The Linux Qemu tests / riscv64 job runs on pull requests.

What needs to be done?

When I started writing this section I expected to be creating a long list of tasks that would need to be completed before building numpy riscv64 wheels, but it turns out that a lot of the work has already been done. As far as I can tell, most build dependencies, e.g., manylinux, cibuildwheel, OpenBLAS, and ninja (wheels are available for riscv64) already support riscv64. This just leaves

  • riscv64 wheels for openblas-libs. There's already an open-issue and some in flight patches. openblas-libs builds fine on riscv64 but the build is a bit slow. We're currently investigating how to speed these builds up.

  • https://github.com/actions/setup-python does not support riscv64 making it difficult to invoke cibuildwheel through the pypa/cibuildwheel action on native riscv64 runners. This is only an issue if using a native riscv64 runner and can be worked around by invoking cibuildwheel manually. This won't be an issue if the wheels are built using qemu.

  • Update numpy's wheel building scripts/github actions to generate riscv64 wheels

I'm sure that I must be missing a whole pile of things here. I'll update this list as more work items become known.

How can RISE help?

RISE is aware of the additional burden of supporting a new architecture, as mentioned here. The RISE project should be able to assist by providing engineering resources, to debug riscv64 specific issues, and potentially native riscv64 runners, if required.

Activity

  1. rgommers commented on Nov 14, 2025

    @rgommers
    Member

    Thanks for the request @markdryan. I'll cross-link #22318 (comment), which is about a very similar request for ppc64le which is a little further along. There will be commonality in the decision criteria we will use for both requests.

  2. rgommers commented on Nov 16, 2025

    @rgommers
    Member

    Let me xref the conda-forge support for RISC-V issue as well: conda-forge/conda-forge.github.io#1744

  3. rgommers commented on Jan 31, 2026

    @rgommers
    Member

    I'll note that a proper policy for platform support tiers is in the works: gh-30748. RISC-V is one of the most likely platforms to be promoted to a higher tier in the future I'd think, once things mature.

    For now this is anyway still blocked on MacPython/openblas-libs#226. Once there are scipy-openblas64 wheels, the next step would be to add a regular CI job to the test suite with a self-hosted runner, similar to what was done for ppc64le.

  4. rgommers commented on Feb 1, 2026

    @rgommers
    Member

    There are scipy-openblas64 wheels now.

    No support in setup-python seems like a minor thing. For a regular CI job, we can still use cibuildwheel, or installing Python with uv would work too.

  5. added a commit that references this issue on Mar 12, 2026
    0fe0ed0
  6. gounthar commented on Mar 12, 2026

    @gounthar

    Thanks @rgommers for laying out the roadmap — self-hosted runner CI makes a lot of sense for riscv64.

    A couple of resources that could help with the CI runner step:

    1. We have two BananaPi F3 boards (SpacemiT K1, 8 cores @ 1.6 GHz, 16 GB RAM, rv64imafdcv with full RVV 1.0) already running as GitHub Actions self-hosted runners for riscv64 wheel builds across ~28 projects. We could register one for numpy CI if that's useful as a starting point.

    2. The Cloud-V initiative provides cloud-based RISC-V CI infrastructure — hosted RISC-V runners that could offer better availability and reliability than individual boards, which would be important for a project of numpy's scale.

    I've also opened PR #30995 with a minimal QEMU-based approach (just adds manylinux_riscv64 to the existing wheel matrix), though I understand you may prefer the self-hosted runner path for both CI testing and wheel building.

    For reference, we've been building and distributing tested numpy riscv64 wheels through a community PEP 503 index at https://gounthar.github.io/riscv64-python-wheels/simple/numpy/ — happy to share any build notes or test results that would help move this forward.

  7. rgommers commented on Mar 12, 2026

    @rgommers
    Member

    The CloudV initiative** provides cloud-based RISC-V CI infrastructure

    This doesn't seem to exist, and the link is broken. What is going on there?

  8. gounthar commented on Mar 12, 2026

    @gounthar

    Apologies for the broken link; the correct URL is Cloud-V, run by 10xEngineers and funded by RISC-V International through the RISE project. They provide free CI/CD infrastructure for open-source RISC-V projects.

    Another option that's appeared recently: riscvrunners.com: a self-service RISC-V CI SaaS with a free emulated tier (3,000 min/month) and paid native hardware tiers.

    Sorry for the confusion with the URL.

  9. rgommers commented on Mar 13, 2026

    @rgommers
    Member

    Thanks @gounthar, that all looks good. It's not super mature yet it looks like, but I think we can try. Emulation will be too slow, and I don't really want to jump to paid native runners at $0.15/min, so I think this is the best option:

    One thing I'm missing from those docs is info on caching. It'd be useful if it stated that it's not supported, or it works with actions/cache, or some other option. Depending on build speed, that could be useful perhaps.

  10. gounthar commented on Mar 13, 2026

    @gounthar

    Good question about caching. From our experience running riscv64 CI on two BananaPi F3 boards with github-act-runner:

    actions/cache: It works: it uses GitHub's cache API over HTTP, so there's no architecture dependency. We use actions/upload-artifact@v4 and actions/download-artifact@v4 successfully on our riscv64 runners as well. The only caveat is that the cache key should include the architecture (e.g. riscv64 in the key) to avoid cross-arch cache hits if you also run x86 jobs.

    Cloud-V docs gap: You're right that their docs don't mention caching explicitly. I'd suggest reaching out to them at [email protected] or their Discord to confirm, but given that actions/cache is just HTTP calls to GitHub's API, it should work on any self-hosted runner regardless of architecture.

    Build speed context: On our F3 boards (SpacemiT K1, 8 cores @ 1.6 GHz, 16 GB RAM), building NumPy from source takes roughly 5–8 minutes. The Milk-V Pioneer Box (64-core SG2042 @ 2.0 GHz, up to 128 GB RAM) available through Cloud-V would be significantly faster. Caching compiled wheels/build artifacts would definitely help for iterative CI runs.

    One practical note: Cloud-V limits you to 1 concurrent job per board type per repository, so if you have a matrix build you'll want to keep it focused. Happy to help test if you'd like a quick smoke test on our hardware before committing to Cloud-V.

  11. 1 remaining item

  12. luhenry commented on Mar 18, 2026

    @luhenry
    Contributor

    I’ve added a website to document how to install the RISE RISC-V Runners and how it works: https://riseproject-dev.github.io/riscv-runner/

    @rgommers would you be happy to give it a try? I can put together a PoC of what that integration would mean in a fork, and submit a PR once it’s going, what do you think?

  13. rgommers commented on Mar 19, 2026

    @rgommers
    Member

    Nice, thanks @luhenry. That looks like a good idea. I had a browse through the docs, and it answered my main questions so far. I think we can try to install this GitHub App indeed. I'll report back once I've tried that.

  14. rgommers commented on Mar 19, 2026

    @rgommers
    Member

    What are the needs in terms of hardware capabilities? How much do you need support for RVV vs RVA23?

    I believe at the moment we only have limited support for RVV, and as with all SIMD support it's optional so if it's missing from the build machine then that's not a problem. If you have a mix of machine types, I think that should be fine. As far as I understand, RVA23 just makes a set of RVV instructions mandatory, right? If so, I think we don't have very specific requirements here.

  15. rgommers commented on Mar 19, 2026

    @rgommers
    Member

    I reviewed the GitHub App in more detail and am happy with its provenance and permissions it wants. It seems to be in very heavy development though, almost all code is from the past 2 weeks with O(10) commits today and yesterday. I'd normally be inclined to wait a little bit until the dust settles. @luhenry if it helps you to install it right now I can though - let me know what you think.

  16. luhenry commented on Mar 19, 2026

    @luhenry
    Contributor

    I reviewed the GitHub App in more detail and am happy with its provenance and permissions it wants. It seems to be in very heavy development though, almost all code is from the past 2 weeks with O(10) commits today and yesterday. I'd normally be inclined to wait a little bit until the dust settles. @luhenry if it helps you to install it right now I can though - let me know what you think.

    @rgommers It's indeed in heavy development but it's reaching a state where I don't expect large changes anymore. There are all the most basic features, and it's high time to get it used out there. Also, to help stability, there are two branches: a staging and prod branch. The staging is used exclusively by the riseproject-dev org and some very specific ones, to be the canary in the coal mine. Numpy and any other org like this would be in "prod" and so wouldn't be impacted by the latest changes until they have proven to work on staging already.

    Happy to be on quick dial (via whatsapp for example) to help with initial bring up, and I would of course monitor it closely to make sure everything works as expected.

  17. andyfaff commented on May 4, 2026

    @andyfaff
    Member

    @rgommers, have we finalised on a decision to move this to a tier 2 or 3?

  18. rgommers commented on May 12, 2026

    @rgommers
    Member

    @rgommers, have we finalised on a decision to move this to a tier 2 or 3?

    Not finalized yet, but we should. My proposal: let's get regular CI support merged and see for a while if it's stable (i.e., move it to Tier 3 now), and once it's run stably for at least a month, we can discuss whether we'd want to move it to Tier 2. Does that sound reasonable?

    If so, we can add it to the table in https://numpy.org/neps/nep-0057-numpy-platform-support.html#tier-3 once gh-30995 is merged.

  19. rgommers commented on May 12, 2026

    @rgommers
    Member

    It does require a mailing list post, I can draft a quick one after lunch pointing back at this issue.

  20. andyfaff commented on May 12, 2026

    @andyfaff
    Member

    Not finalized yet, but we should. My proposal: let's get regular CI support merged and see for a while if it's stable (i.e., move it to Tier 3 now), and once it's run stably for at least a month, we can discuss whether we'd want to move it to Tier 2. Does that sound reasonable?

    That seems reasonable to me.

  21. rgommers commented on May 12, 2026

    @rgommers
    Member

    Happy to be on quick dial (via whatsapp for example) to help with initial bring up, and I would of course monitor it closely to make sure everything works as expected.

    Much appreciated @luhenry.

    @gounthar would you want to be listed on the RISC-V entry at https://numpy.org/neps/nep-0057-numpy-platform-support.html#tier-3 as well when we add that?

  22. rgommers commented on May 12, 2026

    @rgommers
    Member
  23. gounthar commented on May 12, 2026

    @gounthar

    Yes, happy to be listed. One caveat: I'm a volunteer contributor, no dedicated time for numpy riscv64. I'll help with CI and build issues and keep an eye on things, but I probably shouldn't be the primary contact if that implies regular availability. "Community contact" or "willing to help" framing fits better, but I'll defer to whatever works for the NEP structure.

  24. rgommers commented on May 12, 2026

    @rgommers
    Member

    Thanks @gounthar, much appreciated. And yes, we understand volunteer constraints perfectly well - we have a lot of volunteers maintainers. And for the ones with day job bandwidth, that's typically only for specific topics (and CI maintenance tends to not be on the list). It's all best effort.

  25. rgommers commented on May 12, 2026

    @rgommers
    Member
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

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions