Skip to content

bench: detect GPU core count robustly (ioreg first) - #151

Merged
sbryngelson merged 1 commit into
sbryngelson:mainfrom
comp-physics:bench/robust-gpu-cores
Aug 1, 2026
Merged

bench: detect GPU core count robustly (ioreg first)#151
sbryngelson merged 1 commit into
sbryngelson:mainfrom
comp-physics:bench/robust-gpu-cores

Conversation

@sbryngelson

Copy link
Copy Markdown
Owner

The fingerprint parsed GPU cores from system_profiler SPDisplaysDataType text ('Total Number of Cores'), which is slow and silently returns null when 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: ioreg gpu-core-count (instant, stable), the SPDisplaysDataType JSON sppci_cores field, 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.

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.
@sbryngelson
sbryngelson merged commit c324b2b into sbryngelson:main Aug 1, 2026
14 checks passed
@sbryngelson
sbryngelson deleted the bench/robust-gpu-cores branch August 1, 2026 21:57
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.

1 participant