pytorch / cpuinfo

CPU INFOrmation library (x86/x86-64/ARM/ARM64, Linux/Windows/Android/macOS/iOS)
BSD 2-Clause "Simplified" License
962 stars 306 forks source link

ci: Add an Ubuntu:22.04 builder for RISC-V #219

Closed markdryan closed 5 months ago

markdryan commented 5 months ago

cpuinfo is built for riscv64 using a riscv64 container. binfmt_misc allows the riscv64 binaries in the container to be executed with QEMU. This is slower than cross compiling but as there's not that much code the build times are acceptable. It takes just under 6 minutes for the full riscv64 github action to run. We also have the option of running some of the built RISC-V binaries, e.g., unit tests, in the CI. It should be easy to expand the matrix to add CI for other architectures not natively supported by github actions.

markdryan commented 5 months ago

This PR will fail to build as the riscv64 builds are currently broken. Once https://github.com/pytorch/cpuinfo/pull/215 is merged I'll rebase this patch and the CI should pass.

markdryan commented 5 months ago

@prashanthswami I've rebased this PR against main, pulling in the fix to the riscv64 build. The CI added for risc64 in this PR should pass now.