Skip to content

Handle Intel's emerald rapids and do some formatting in the cpuid_x86 file#5659

Merged
martin-frbg merged 3 commits intoOpenMathLib:developfrom
lindsayad:handle-emerald-rapids
Mar 3, 2026
Merged

Handle Intel's emerald rapids and do some formatting in the cpuid_x86 file#5659
martin-frbg merged 3 commits intoOpenMathLib:developfrom
lindsayad:handle-emerald-rapids

Conversation

@lindsayad
Copy link
Contributor

The instruction set for emerald rapids is the same as sapphire rapids so I select the same arch's for the emerald rapids branches as for the sapphire rapids branches, e.g.

        case 15: // Emerald Rapids
          if (support_amx_bf16()) return CORE_SAPPHIRERAPIDS;
          if (support_avx512_bf16()) return CORE_COOPERLAKE;
          if (support_avx512()) return CORE_SKYLAKEX;
          if (support_avx2()) return CORE_HASWELL;
          if (support_avx()) return CORE_SANDYBRIDGE;
          else return CORE_NEHALEM;

I was also having a very hard time following the code with the different indentation levels so I've clang-formatted the file. I can understand if this is undesirable so I will revert if asked, but in my opinion it significantly improves the file's readability.

@martin-frbg
Copy link
Collaborator

Thanks - indeed normally I don't like to see major reformatting mixed in with functional changes, but here the functional changes are harmless enough and those scraggly case lists really had it coming...

@lindsayad
Copy link
Contributor Author

Commits 1 and 3 are the functional changes (well really just commit 1; commit 3 just re-orders a couple of the case statements). Commit 2 isolates the clang-formatting

@martin-frbg martin-frbg added this to the 0.3.32 milestone Mar 3, 2026
@martin-frbg martin-frbg merged commit 3166fff into OpenMathLib:develop Mar 3, 2026
100 of 102 checks passed
@lindsayad lindsayad deleted the handle-emerald-rapids branch March 3, 2026 19:11
@lindsayad
Copy link
Contributor Author

thanks for the quick turn-around!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants