Alex Cheema vor 4 Monaten
Ursprung
Commit
cff03fc6c5
2 geänderte Dateien mit 34 neuen und 0 gelöschten Zeilen
  1. 22 0
      .github/bench.py
  2. 12 0
      .github/workflows/bench_job.yml

+ 22 - 0
.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:

+ 12 - 0
.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 }}