Skip to content

Add Apple M1/M2/M3/M4 Linux MIDR detection#385

Open
fbarchard wants to merge 3 commits into
pytorch:mainfrom
fbarchard:add-apple-silicon-linux-midr
Open

Add Apple M1/M2/M3/M4 Linux MIDR detection#385
fbarchard wants to merge 3 commits into
pytorch:mainfrom
fbarchard:add-apple-silicon-linux-midr

Conversation

@fbarchard
Copy link
Copy Markdown
Collaborator

@fbarchard fbarchard commented Apr 28, 2026

Fixes #380 by adding cpuinfo_arm_decode_vendor_uarch logic for Apple's implementer 'a' (0x61).

This PR includes MIDR part mappings for:

  • M1: Icestorm / Firestorm (0x022, 0x023, 0x024, 0x025, 0x028, 0x029)
  • M2: Blizzard / Avalanche (0x032, 0x033, 0x034, 0x035, 0x038, 0x039)
  • M3: Sawtooth / Everest (0x042, 0x043, 0x044, 0x045, 0x048, 0x049)
  • M4: Donan Sawtooth / Donan Everest (0x052, 0x053)

These additions allow cpuinfo to correctly detect the microarchitecture of Apple Silicon cores when running on Linux (e.g., Asahi Linux).

@meta-cla meta-cla Bot added the cla signed label Apr 28, 2026
@fbarchard fbarchard changed the title Add Apple M1/M2 Linux MIDR detection Add Apple M1/M2/M3/M4 Linux MIDR detection Apr 28, 2026
Copy link
Copy Markdown
Member

@GregoryComer GregoryComer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, can you rebase now that the #384 is merged and then run clang-format? I can merge after that.

@fbarchard fbarchard force-pushed the add-apple-silicon-linux-midr branch from 8373f61 to f5a589d Compare May 26, 2026 20:35
@fbarchard
Copy link
Copy Markdown
Collaborator Author

Done. rebased and clang-formatted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Apple M1 detects as unknown on Linux

2 participants