← back to Exo
perf diag
cff03fc6c5011882b9cb4225a0df61d954ccd349 · 2024-12-11 16:19:47 +0000 · Alex Cheema
Files touched
M .github/bench.pyM .github/workflows/bench_job.yml
Diff
commit cff03fc6c5011882b9cb4225a0df61d954ccd349
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Dec 11 16:19:47 2024 +0000
perf diag
---
.github/bench.py | 22 ++++++++++++++++++++++
.github/workflows/bench_job.yml | 12 ++++++++++++
2 files changed, 34 insertions(+)
diff --git a/.github/bench.py b/.github/bench.py
index 7971f7a2..0875d5cb 100644
--- a/.github/bench.py
+++ b/.github/bench.py
@@ -15,6 +15,28 @@ from pathlib import Path
def check_system_state():
print("\n=== System State Check ===", flush=True)
+ # Add macOS-specific checks
+ try:
+ # Check powermetrics
+ power_metrics = subprocess.run(['sudo', 'powermetrics', '-n', '1', '-i', '1000', '--show-process-energy'],
+ capture_output=True, text=True)
+ print("\nPower Metrics:", power_metrics.stdout, flush=True)
+
+ # Check thermal state
+ thermal_state = subprocess.run(['pmset', '-g', 'therm'], capture_output=True, text=True)
+ print("\nThermal State:", thermal_state.stdout, flush=True)
+
+ # Check if running under Rosetta
+ arch = subprocess.run(['arch'], capture_output=True, text=True)
+ print("\nArchitecture:", arch.stdout, flush=True)
+
+ # Check MLX compilation mode
+ import mlx.core as mx
+ print("\nMLX Build Info:", mx.build_info(), flush=True)
+
+ except Exception as e:
+ print(f"Error in macOS checks: {e}", flush=True)
+
# CPU Info
print("\nCPU Information:", flush=True)
try:
diff --git a/.github/workflows/bench_job.yml b/.github/workflows/bench_job.yml
index b4c40d2d..7a28a51b 100644
--- a/.github/workflows/bench_job.yml
+++ b/.github/workflows/bench_job.yml
@@ -52,6 +52,18 @@ jobs:
pip install --upgrade pip
pip install .
pip install boto3==1.35.76
+ - name: Configure system
+ run: |
+ # Apply MLX optimizations
+ sudo ./configure_mlx.sh
+
+ # Disable CPU throttling
+ sudo pmset -a processorperf 2
+ sudo pmset -a gpuswitch 2
+
+ # Check current state
+ pmset -g
+ sysctl iogpu
- name: Run exo
env:
aws_access_key_id: ${{ secrets.S3_EXO_BENCHMARKS_AWS_ACCESS_KEY_ID }}
← f7122d40 add system_status check to bench
·
back to Exo
·
Test on m4 bbb58460 →