Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a function returning the brand string of the host #156

Merged
merged 3 commits into from
Mar 12, 2024
Merged

Conversation

alalazo
Copy link
Member

@alalazo alalazo commented Mar 7, 2024

This PR adds a function to return the brand string of the CPU:

>>> import archspec.cpu
>>> archspec.cpu.brand_string()
'11th Gen Intel(R) Core(TM) i7-1185G7 @ 3.00GHz'

It currently works on x86_64 (all platforms), and darwin (all targets family). Linux aarch64 is not covered yet.

@alalazo alalazo added the enhancement New feature or request label Mar 7, 2024
@codecov-commenter
Copy link

codecov-commenter commented Mar 7, 2024

Codecov Report

Attention: Patch coverage is 86.66667% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 93.92%. Comparing base (7b8fe60) to head (d8ccf8d).

Files Patch % Lines
archspec/cpu/detect.py 85.71% 2 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #156      +/-   ##
==========================================
- Coverage   94.15%   93.92%   -0.24%     
==========================================
  Files           8        8              
  Lines         496      510      +14     
==========================================
+ Hits          467      479      +12     
- Misses         29       31       +2     
Flag Coverage Δ
unittests 93.92% <86.66%> (-0.24%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@alalazo
Copy link
Member Author

alalazo commented Mar 7, 2024

For reference and context, see reframe-hpc/reframe#3132

@vkarak @jack-morrison Let me know if this works for you.

@vkarak
Copy link

vkarak commented Mar 7, 2024

Thanks @alalazo, I tested on an Intel machine and it's fine. I'll test it tomorrow on an Arm and let you know.

@alalazo
Copy link
Member Author

alalazo commented Mar 7, 2024

It currently doesn't return meaningful results on ARM + linux. Only Apple Silicon.

@vkarak
Copy link

vkarak commented Mar 8, 2024

Lgtm

@alalazo alalazo merged commit bcced9b into master Mar 12, 2024
18 checks passed
@alalazo alalazo deleted the features/model branch March 12, 2024 07:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants