RISC-V is now officially supported by CPython

(blog.python.org)

69 points | by lumpa 5 days ago ago

12 comments

  • ironhaven 38 minutes ago ago

    What RISC-V extensions is this built for? There is a target triple of riscv64-unknown-linux-gnu listed so i assume the baseline RV64GC that the Linux kernel is built against.

    It makes sense to be conservative with a new architecture but new high performance RISC-V cores such as from SiFive[1] are going to meet RVA23. That standard has vector and bit manipulation extensions that could be used to improve performance with a python interpreter. I guess more testing needs to be done to see if raising the bar is useful.

    [1]https://www.sifive.com/cores/performance-p800

  • yyyk 19 minutes ago ago

    Odd they still have i686-pc-windows-msvc as Tier 1 *. Even Microsoft doesn't have any supported 32bit Windows versions anymore, and C extension modules likely follow Linux (where Python doesn't have any no supported i686 triplets in any tier). It would be more modern to demote its Tier and promote aarch64 Windows or wasm32 instead to Tier 1.

    * https://peps.python.org/pep-0011/#tier-1

    • woodruffw 6 minutes ago ago

      Python's tiering has to do with testability and availability thereof, not modernness. In the case of 32-bit Windows, the reason it's still testable is because Windows still ships a 32-bit userspace, even if Windows itself only supports x86-64.

      (From personal experience, testing Windows aarch64 is a massive PITA, even on GitHub Actions, which all common sense would indicate should have the best aarch64 Windows CI runner story.)

  • yjftsjthsd-h 3 hours ago ago

    > RISC-V is now officially supported by CPython as a tier 3 platform!

    That's significant, but tier 3 is still a caveat. Still allowed to break without blocking anything or being fixed as a priority.

    • jmalicki 3 hours ago ago

      Sure, but I had to look:

      Tier1: Windows x64/i686, Linux x64/ARM gcc, Darwin/ARM

      Tier2: Linux x64/ARM w/ clang, Windows ARM, WASM, Darwin/x64

      Tier3 is a pretty low support level, but tiers 1 and 2 is a pretty short list of major commercial platforms. Also even for developers to fix, availability of e.g. RiscV machines in the cloud to reproduce and fix on is still somewhat limited.

    • phire 2 hours ago ago

      Needs to start somewhere.

      Looks like the most important step towards tier two is mostly about proving the CI infrastructure is reliable (which takes time at tier 3), and have at least two core developers committed to fixing any issues (within 24 hours)

    • digkls 2 hours ago ago

      RISC-V is one of those experimental architectures that hardly anyone is actually using, isn't it?

      Tier 3, or no support at all, seems an appropriate designation.

      • boredatoms 2 hours ago ago

        Not much on user facing OS, but billions of small controllers

        • yjftsjthsd-h an hour ago ago

          I don't think CPython targets those, though; that seems more like a micropython thing?