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.
This patch does a couple things:
(1) Implements M3 Max support (at least for the 16 core CPU/40 core GPU version) 128GB version with 400MHz memory bandwidth) - the max power numbers are taken from my system driving CPU and GPU usage to absolute maximum and reading out from powermetrics.
(2) In order to calculate the average CPU usage across cores, I had to redo that whole section. On M3 Max, powermetrics always reports 100% for "E-Cluster online" and "P-Cluster online" for all clusters, regardless of how busy they are. So those basically can't be trusted/used. Instead, I just iterate through all the individual cores and average them. For the MHz, the clusters do report a frequency but it's not at all clear what the freq is when comparing it to the individual cores in that cluster. So instead of using those, and because there's multiple P-clusters anyway, I had to do an "average" - so what I decided to do was take each core's frequency, weighted by that core's activity %age - so the more active, the more that frequency contributes to the "average". This gives a sense, alongside the overall activity %age, of how hard the CPUs are actually working, kinda. It's not great, but it's better than nothing.