archspec / archspec-json

Other
20 stars 33 forks source link

Add features for `m1` #45

Closed giordano closed 2 years ago

giordano commented 2 years ago

I simply copied the list of features in /proc/cpuinfo. I verified that with this change I can still detect the CPU correctly:

$ poetry run python -c "import archspec.cpu; print(archspec.cpu.host())"
m1

Let me know if I need to do anything else.

alalazo commented 2 years ago

I don't have access to an Apple M1, but I thought that macOS didn't provide any /proc/cpuinfo file? Currently we use output of sysctl to detect microarchitectures on darwin platforms.

giordano commented 2 years ago

I did this on Linux, not macOS :slightly_smiling_face:

alalazo commented 2 years ago

I did this on Linux, not macOS

Fair enough. I guess I have a mental block that makes installing Linux on a Mac inconceivable for me :laughing: Can you also submit a sample of your /proc/cpuinfo file? You can find examples under the tests/targets directory.

giordano commented 2 years ago

Done!

alalazo commented 2 years ago

Thanks!