pytorch / cpuinfo

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

Fix RISC-V Linux build again #215

Closed markdryan closed 8 months ago

markdryan commented 8 months ago

PR https://github.com/pytorch/cpuinfo/pull/204 broke the RISC-V build by including for a second time a header file that currently only exists in the RISC-V Android NDK. The header is not yet available in mainstream Linux distributions. The header in question, <sys/hwprobe.h>, is already included when building for Android at the top of riscv-hw.c so the second include is unnecessary and can be safely removed.

markdryan commented 8 months ago

@prashanthswami, @malfet PR #204 broke the RISC-V build on mainline Linux distributions again. It looks like a small error was introduced resolving a conflict in riscv-hw.c.

prashanthswami commented 8 months ago

Ouch - thank you. I need to go back and figure out why I missed this when running local tests. I should probably also introduce a builder that actually validates this consistently.

markdryan commented 8 months ago

Ouch - thank you. I need to go back and figure out why I missed this when running local tests. I should probably also introduce a builder that actually validates this consistently.

@prashanthswami I've had a go at adding some CI for riscv64 builds on Ubuntu 22.04

https://github.com/pytorch/cpuinfo/pull/219

Obviously, #219 isn't going to pass CI until this patch is merged and #219 is rebased.