bench: detect GPU core count robustly (ioreg first) - #151
Merged
Conversation
The fingerprint's GPU-core detection parsed 'Total Number of Cores' out of system_profiler SPDisplaysDataType text, which is slow and silently returns None when system_profiler is sluggish or its layout shifts across macOS versions -- leaving the GPU column blank on some submissions. Now try, in order: ioreg's gpu-core-count property (instant and stable), the SPDisplaysDataType JSON sppci_cores field, then the legacy text sweep. Same value, ~17ms instead of seconds, and it populates where the text parse came back empty. Hardware hash is unchanged (same value), so existing rows and grouping are unaffected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The fingerprint parsed GPU cores from
system_profiler SPDisplaysDataTypetext ('Total Number of Cores'), which is slow and silently returnsnullwhen system_profiler is sluggish or its text layout shifts -- so some submissions could land with a blank GPU column. Now tries three sources in order: ioreggpu-core-count(instant, stable), the SPDisplaysDataType JSONsppci_coresfield, then the legacy text sweep.Same value on this M5 Pro (20), ~17ms vs seconds, and it fills in where the text parse came back empty. The hardware hash is unchanged (it hashes the value, not the detection method), so existing rows and grouping are unaffected.
Note: this is hardware context; the ROOFLINES.md perf numbers are ANE metrics, so GPU cores don't drive them -- and the data already shows perf/W is non-monotonic across generations (M2 Pro 1379 > M5 Pro 918 GF/s/W), so a newer-but-lower or older-but-higher result is not by itself a bug.