pytorch / cpuinfo

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

Add: RISC-V support #124

Open kassane opened 1 year ago

kassane commented 1 year ago

Especially RISC-V64.

There is some expectation of adding support for the new RISCV architecture, even though it is an emulated environment for example QEMU.

VictorElHajj commented 1 year ago

:+1: This has been an issue for myself as well

petterreinholdtsen commented 1 year ago

According to https://bugs.debian.org/1016623, /proc/cpuinfo can look like this:

processor   : 0
hart        : 2
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,bullet0

processor   : 1
hart        : 1
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,bullet0

processor   : 2
hart        : 3
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,bullet0

processor   : 3
hart        : 4
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,bullet0
leuc commented 1 year ago
cat /proc/device-tree/model
StarFive VisionFive V2

cat /proc/device-tree/compatible
starfive,visionfive-v2starfive,jh7110

cat /proc/device-tree/serial-number
VF7110A1-2250-D008E000-00000824

cat /proc/cpuinfo
processor   : 0
hart        : 1
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,u74-mc

processor   : 1
hart        : 2
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,u74-mc

processor   : 2
hart        : 3
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,u74-mc

processor   : 3
hart        : 4
isa     : rv64imafdc
mmu     : sv39
uarch       : sifive,u74-mc
enh-google commented 10 months ago

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