Coder Social home page Coder Social logo

dehydratedpotato / m1-gpufreq Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 50 KB

Get the current frequency of your Apple M1 GPU.

License: MIT License

Objective-C 100.00%
macos frequency gpu objective-c osx macosx gpu-monitoring m1 m1-mac gpu-frequency gpu-freq clock-speed gpu-speed apple-silicon apple-m1

m1-gpufreq's Introduction

M1-gpufreq

Get the current frequency of your Apple M1 GPU.

License Releases License

⚠️ Notice ⚠️

This project is now obsolete as of the current release. Please visit https://github.com/BitesPotatoBacks/SFMRM for the latest iteration.

What It Does and How It Works

This project is designed to get the current frequency (or clock speed) of your Apple M1 GPU, without requiring sudo or a kernel extension. This near-impossible feat is achieved by accessing performance state information from IOReport and performing some calculations based on them during a specified time interval (default 1 second).

Usage

Preparation:

Download the precompiled binary from the releases, cd into your Downloads folder, and run these commands to fix the binary permissions:

chmod 755 ./M1-gpufreq
xattr -cr ./M1-gpufreq

Now you can simply run ./M1-gpufreq.

Example:

Here is an example running ./M1-gpufreq -l6 -i1 on an M1 Mac Mini during a Geekbench Compute run:

Name      Type      Max Freq     Active Freq    Freq %

GPU      Complex   1278.00 MHz     43.59 MHz     3.41%
GPU      Complex   1278.00 MHz   1153.91 MHz    90.29%
GPU      Complex   1278.00 MHz   1263.43 MHz    98.86%
GPU      Complex   1278.00 MHz    837.17 MHz    65.51%
GPU      Complex   1278.00 MHz     39.89 MHz     3.12%
GPU      Complex   1278.00 MHz   1235.26 MHz    96.66%

Options

Available command line options are:

    -l <value> : loop output (0 = infinite)
    -i <value> : set sampling interval (may effect accuracy)
    -v         : print version number
    -h         : help

Bugs and Issues

Known Problems:

  • Sampling interval is currently broken for some reason... run script with option -i1 for now
  • Support for M1 Pro/Max is unofficial

If any other bugs or issues are identified, please let me know!

Support ❤️

If you would like to support me, you can donate to my Cash App.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.