← back to Exo
t
d0b7f1b4bb4450dff822cc440f9453ab524542e9 · 2024-12-11 22:11:01 +0000 · Alex Cheema
Files touched
M .github/workflows/bench_job.yml
Diff
commit d0b7f1b4bb4450dff822cc440f9453ab524542e9
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Dec 11 22:11:01 2024 +0000
t
---
.github/workflows/bench_job.yml | 42 +++++++++++++----------------------------
1 file changed, 13 insertions(+), 29 deletions(-)
diff --git a/.github/workflows/bench_job.yml b/.github/workflows/bench_job.yml
index 76db19e1..fb56c83a 100644
--- a/.github/workflows/bench_job.yml
+++ b/.github/workflows/bench_job.yml
@@ -66,26 +66,23 @@ jobs:
- name: Apply Performance Optimizations
run: |
- # Make the script executable and run it
- chmod +x .github/optimize_performance.sh
- ./.github/optimize_performance.sh
+ # Export performance-related environment variables
+ cat << 'EOF' > /tmp/performance_env.sh
+ # MLX and Metal optimizations
+ export MTL_DEBUG_LAYER=0
+ export METAL_VALIDATION_ENABLED=0
+ export MLX_METAL_VALIDATION=0
+ export MLX_METAL_DEBUG=0
+ export MLX_FORCE_P_CORES=1
+ export MLX_METAL_PREWARM=1
+ export PYTHONOPTIMIZE=2
+ EOF
# Source the performance environment variables
source /tmp/performance_env.sh
- # Additional runtime optimizations
-
- # Check if taskpolicy exists before using it
- if command -v taskpolicy >/dev/null 2>&1; then
- sudo taskpolicy -b PERFORMANCE
- else
- echo "taskpolicy command not available, skipping process scheduling optimization"
- fi
-
# Verify optimizations
echo "Verifying performance settings..."
- pmset -g
- sysctl iogpu
env | grep -E "MLX_|METAL_|MTL_"
- name: Run exo
@@ -110,28 +107,15 @@ jobs:
export PATH="/usr/local/bin:/opt/homebrew/bin:$PATH"
echo "Starting exo daemon..."
- # Set high priority and performance mode
- sudo renice -n -20 $$ || true
- sudo taskpolicy -b PERFORMANCE $$ || true
- # Start exo with performance optimizations
- sudo taskpolicy -b PERFORMANCE .venv/bin/exo \
+ # Start exo
+ .venv/bin/exo \
--node-id="${MY_NODE_ID}" \
--node-id-filter="${ALL_NODE_IDS}" \
--interface-type-filter="Ethernet" \
--chatgpt-api-port 52415 > output1.log 2>&1 &
PID1=$!
- # Set process and thread priorities
- sudo renice -n -20 -p $PID1 || true
- sudo taskpolicy -b PERFORMANCE -p $PID1 || true
-
- # Set thread priority for all Python threads
- for tid in $(ps -M $PID1 | grep Python | awk '{print $2}'); do
- sudo renice -n -20 -p $tid || true
- sudo taskpolicy -b PERFORMANCE -p $tid || true
- done
-
echo "Exo process started with PID: $PID1"
tail -f output1.log &
TAIL1=$!
← 90677415 t
·
back to Exo
·
test 741c3183 →