Live data from Hacker News

RISC-V is now officially supported by CPython

blog.python.org

41–50 of 76 posts

Re: RISC-V is now officially supported by CPython

#41

CPython is written in C, did running it on Risc-V take more than a recompilation? Were there any surprises? Yes of course it needs testing and RISC-V in the CI stack, but I'd expect fairly smooth sailing.

We ran it 4 years ago (including numpy) and it wasn’t a massive uphill climb or anything. It’s gotten a little easier since then if anything.

Re: RISC-V is now officially supported by CPython

#44

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 wi…

One could always build libraries which people can use if they need the more high-performance cores. There is not much in the CPython core that will benefit though.

Re: RISC-V is now officially supported by CPython

#45
post #39

Earlier quoted context omitted.

Speaking unofficially, opinions my own, etc. We (CPython) currently only have access to RV64GC machines to test on, and so that is the defacto target we can currently support. Personally, I hope to see RVA23 become the baseline in the future. But that will depend on adoption. On the packaging side of things, the platform tag is manylinux_X_Y_riscv64. So far that has meant RV64GC. So before we set a baseline of RVA23,…

How is this different from x86_64 and aarch64? Or even the various Alpha and Mips64 chips.

For example x86_64 has v1, v2, v3 and v4 baselines, this tells you which instructions they support (e.g. v4 has AVX-512, v3 has AVX2, etc.).

RISC-V RVA22 and RVA23 aren't too different in this regard. Each one prescribes which extensions must be supported by the processor. I saw RV64GC mentioned, this is just a shortening of RV64IMAFDC, so I for baseline instructions, M for multiplication and division, A for atomic, F for floating point, D for double precision floating point and C for compressed instructions.

You can have a baseline E profile instead of I (less registers, some other features stripped), but I don't think we will ever see manufactured RV64E core, trough RV32EC cores exist.

Re: RISC-V is now officially supported by CPython

#46
post #39

Earlier quoted context omitted.

How is this different from x86_64 and aarch64? Or even the various Alpha and Mips64 chips.

For example x86_64 has v1, v2, v3 and v4 baselines, this tells you which instructions they support (e.g. v4 has AVX-512, v3 has AVX2, etc.). RISC-V RVA22 and RVA23 aren't too different in this regard. Each one prescribes which extensions must be supported by the processor. I saw RV64GC mentioned, this is just a shortening of RV64IMAFDC, so I for baseline instructions, M for multiplication and division, A for atomic,…

The E extension will probably only ever appear in softcores (FPGA) to reduce gate count.

Re: RISC-V is now officially supported by CPython

#48

Earlier quoted context omitted.

For example x86_64 has v1, v2, v3 and v4 baselines, this tells you which instructions they support (e.g. v4 has AVX-512, v3 has AVX2, etc.). RISC-V RVA22 and RVA23 aren't too different in this regard. Each one prescribes which extensions must be supported by the processor. I saw RV64GC mentioned, this is just a shortening of RV64IMAFDC, so I for baseline instructions, M for multiplication and division, A for atomic,…

The E extension will probably only ever appear in softcores (FPGA) to reduce gate count.

CH32V003 has RV32EC core, for RV64, yes, there is no point.

Re: RISC-V is now officially supported by CPython

#49

CPython is written in C, did running it on Risc-V take more than a recompilation? Were there any surprises? Yes of course it needs testing and RISC-V in the CI stack, but I'd expect fairly smooth sailing.

We ran python-3.14 on RISC-V before switching to C++ only. It compiled without any errors and all tests passed.

I don't understand the significance of this announcement in the submission.

Post reply on HN