Skip to content

Commit 77b0907

Browse files
test
1 parent 1ef52fa commit 77b0907

File tree

1 file changed

+149
-6
lines changed

1 file changed

+149
-6
lines changed

.github/workflows/metal.yml

Lines changed: 149 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,149 @@ concurrency:
1212
cancel-in-progress: false
1313

1414
jobs:
15+
test-macos-m1-stable:
16+
name: test-macos-m1-stable
17+
runs-on: macos-m1-stable
18+
steps:
19+
- name: Print machine info
20+
run: |
21+
uname -a
22+
if [ $(uname -s) == Darwin ]; then
23+
sw_vers
24+
# Print RAM in GB
25+
RAM_BYTES=$(sysctl -n hw.memsize)
26+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
27+
echo "Available RAM (GB): $RAM_GB"
28+
sysctl machdep.cpu.brand_string
29+
sysctl machdep.cpu.core_count
30+
# Print number of GPU cores (Apple Silicon)
31+
if command -v system_profiler &> /dev/null; then
32+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
33+
if [ -z "$GPU_CORES" ]; then
34+
# Fallback: try to parse "Core Count" from Apple GPU section
35+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
36+
fi
37+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
38+
else
39+
echo "system_profiler not available, cannot determine GPU cores."
40+
fi
41+
fi
42+
43+
test-macos-m2-stable:
44+
name: test-macos-m2-stable
45+
runs-on: macos-m2-stable
46+
steps:
47+
- name: Print machine info
48+
run: |
49+
uname -a
50+
if [ $(uname -s) == Darwin ]; then
51+
sw_vers
52+
# Print RAM in GB
53+
RAM_BYTES=$(sysctl -n hw.memsize)
54+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
55+
echo "Available RAM (GB): $RAM_GB"
56+
sysctl machdep.cpu.brand_string
57+
sysctl machdep.cpu.core_count
58+
# Print number of GPU cores (Apple Silicon)
59+
if command -v system_profiler &> /dev/null; then
60+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
61+
if [ -z "$GPU_CORES" ]; then
62+
# Fallback: try to parse "Core Count" from Apple GPU section
63+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
64+
fi
65+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
66+
else
67+
echo "system_profiler not available, cannot determine GPU cores."
68+
fi
69+
fi
70+
71+
test-macos-latest:
72+
name: test-macos-latest
73+
runs-on: macos-latest
74+
steps:
75+
- name: Print machine info
76+
run: |
77+
uname -a
78+
if [ $(uname -s) == Darwin ]; then
79+
sw_vers
80+
# Print RAM in GB
81+
RAM_BYTES=$(sysctl -n hw.memsize)
82+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
83+
echo "Available RAM (GB): $RAM_GB"
84+
sysctl machdep.cpu.brand_string
85+
sysctl machdep.cpu.core_count
86+
# Print number of GPU cores (Apple Silicon)
87+
if command -v system_profiler &> /dev/null; then
88+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
89+
if [ -z "$GPU_CORES" ]; then
90+
# Fallback: try to parse "Core Count" from Apple GPU section
91+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
92+
fi
93+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
94+
else
95+
echo "system_profiler not available, cannot determine GPU cores."
96+
fi
97+
fi
98+
99+
test-macos-15:
100+
name: test-macos-15
101+
runs-on: macos-15
102+
steps:
103+
- name: Print machine info
104+
run: |
105+
uname -a
106+
if [ $(uname -s) == Darwin ]; then
107+
sw_vers
108+
# Print RAM in GB
109+
RAM_BYTES=$(sysctl -n hw.memsize)
110+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
111+
echo "Available RAM (GB): $RAM_GB"
112+
sysctl machdep.cpu.brand_string
113+
sysctl machdep.cpu.core_count
114+
# Print number of GPU cores (Apple Silicon)
115+
if command -v system_profiler &> /dev/null; then
116+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
117+
if [ -z "$GPU_CORES" ]; then
118+
# Fallback: try to parse "Core Count" from Apple GPU section
119+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
120+
fi
121+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
122+
else
123+
echo "system_profiler not available, cannot determine GPU cores."
124+
fi
125+
fi
126+
127+
test-macos-15-xlarge:
128+
name: test-macos-15-xlarge
129+
runs-on: macos-15-xlarge
130+
steps:
131+
- name: Print machine info
132+
run: |
133+
uname -a
134+
if [ $(uname -s) == Darwin ]; then
135+
sw_vers
136+
# Print RAM in GB
137+
RAM_BYTES=$(sysctl -n hw.memsize)
138+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
139+
echo "Available RAM (GB): $RAM_GB"
140+
sysctl machdep.cpu.brand_string
141+
sysctl machdep.cpu.core_count
142+
# Print number of GPU cores (Apple Silicon)
143+
if command -v system_profiler &> /dev/null; then
144+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
145+
if [ -z "$GPU_CORES" ]; then
146+
# Fallback: try to parse "Core Count" from Apple GPU section
147+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
148+
fi
149+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
150+
else
151+
echo "system_profiler not available, cannot determine GPU cores."
152+
fi
153+
fi
154+
15155
test-metal-builds:
16156
name: test-executorch-metal-build
17-
runs-on: macos-latest
157+
runs-on: macos-m1-stable
18158
steps:
19159
- name: Checkout repository
20160
uses: actions/checkout@v3
@@ -25,7 +165,7 @@ jobs:
25165
- name: Setup Python
26166
uses: actions/setup-python@v4
27167
with:
28-
python-version: '3.10'
168+
python-version: '3.11'
29169

30170
- name: Test ExecuTorch Metal build
31171
run: |
@@ -36,7 +176,7 @@ jobs:
36176
37177
export-voxtral-metal-artifact:
38178
name: export-voxtral-metal-artifact
39-
runs-on: macos-latest
179+
runs-on: macos-m1-stable
40180
steps:
41181
- name: Checkout repository
42182
uses: actions/checkout@v3
@@ -47,14 +187,17 @@ jobs:
47187
- name: Setup Python
48188
uses: actions/setup-python@v4
49189
with:
50-
python-version: '3.10'
190+
python-version: '3.11'
51191

52192
- name: Export Voxtral with Metal Backend
53193
env:
54194
EXECUTORCH_HF_TOKEN: ${{ secrets.EXECUTORCH_HF_TOKEN }}
55195
run: |
56196
set -eux
57197
198+
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
199+
echo "Using optimum-executorch version: ${OPTIMUM_ET_VERSION}"
200+
58201
echo "::group::Setup ExecuTorch"
59202
PYTHON_EXECUTABLE=python3 ./install_executorch.sh
60203
echo "::endgroup::"
@@ -104,7 +247,7 @@ jobs:
104247
test-voxtral-metal-e2e:
105248
name: test-voxtral-metal-e2e
106249
needs: export-voxtral-metal-artifact
107-
runs-on: macos-latest
250+
runs-on: macos-m1-stable
108251
steps:
109252
- name: Checkout repository
110253
uses: actions/checkout@v3
@@ -115,7 +258,7 @@ jobs:
115258
- name: Setup Python
116259
uses: actions/setup-python@v4
117260
with:
118-
python-version: '3.10'
261+
python-version: '3.11'
119262

120263
- name: Download artifacts
121264
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)