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

init darwin cpu support #356

Merged
merged 1 commit into from
Apr 17, 2024
Merged

Conversation

pixelsoccupied
Copy link
Contributor

init darwin cpu support! Dev/ran on M1 Max and manually tested the sysctl commands on intel

Thanks!

Copy link
Owner

@jaypipes jaypipes left a comment

Choose a reason for hiding this comment

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

@pixelsoccupied awesome first stab at this, thank you so much for the PR! :)

I've left a few requests inline for you to chew on. Lemme know if any of my feedback doesn't make sense.

Best,
-jay

pkg/cpu/cpu_darwin.go Outdated Show resolved Hide resolved
pkg/cpu/cpu_darwin.go Outdated Show resolved Hide resolved
pkg/cpu/cpu_darwin.go Outdated Show resolved Hide resolved
pkg/cpu/cpu_darwin.go Outdated Show resolved Hide resolved
pkg/cpu/cpu_darwin.go Show resolved Hide resolved
@leaanthony
Copy link

Bump 😄

@pixelsoccupied pixelsoccupied force-pushed the darwin_cpu branch 3 times, most recently from f8b177a to 8a03417 Compare April 9, 2024 21:51
Signed-off-by: Nahian Pathan <nahian@me.com>
@pixelsoccupied
Copy link
Contributor Author

pixelsoccupied commented Apr 9, 2024

@jaypipes ready for a final review. This how it looks like if I run the exact code from readme's example

cpu (2 physical packages, 10 cores, 10 hardware threads)
 physical package #0 (8 cores, 0 hardware threads)
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  capabilities: [FEAT_PMULL FEAT_LSE FEAT_SHA1 FEAT_CSV2 FEAT_CSV3 FEAT_FHM
                 FEAT_FlagM2 FEAT_SHA256 FEAT_FP16 FEAT_SHA512 FEAT_PAuth FEAT_DIT
                 FEAT_SSBS FEAT_DPB2 FEAT_FlagM FEAT_RDM FEAT_FCMA FEAT_AES
                 FP_SyncExceptions FEAT_LRCPC FEAT_DPB FEAT_SB FEAT_SHA3 armv8_crc32
                 AdvSIMD_HPFPCvt AdvSIMD floatingpoint]
 physical package #0 (2 cores, 0 hardware threads)
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  <nil>
  capabilities: [armv8_crc32 AdvSIMD_HPFPCvt FEAT_DotProd FEAT_JSCVT FEAT_FRINTTS FEAT_LRCPC2
                 FEAT_LSE2 FEAT_PMULL FEAT_SHA1 FEAT_LSE FEAT_CSV2 FEAT_CSV3
                 FEAT_FHM FEAT_FlagM2 FEAT_SHA256 FEAT_FP16 FEAT_SHA512 FEAT_PAuth
                 FEAT_DIT FEAT_SSBS FEAT_DPB2 FEAT_FlagM FEAT_RDM FEAT_FCMA
                 FEAT_AES AdvSIMD floatingpoint]

And of course some nice info drill down a bit more (a debug screenshot from previous comment)

@jaypipes jaypipes merged commit f88acb3 into jaypipes:main Apr 17, 2024
12 checks passed
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.

3 participants