Skip to content

Commit e242015

Browse files
test
1 parent 1ef52fa commit e242015

File tree

1 file changed

+81
-6
lines changed

1 file changed

+81
-6
lines changed

.github/workflows/metal.yml

Lines changed: 81 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,32 @@ concurrency:
1414
jobs:
1515
test-metal-builds:
1616
name: test-executorch-metal-build
17-
runs-on: macos-latest
17+
runs-on: macos-m2-stable
1818
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+
1943
- name: Checkout repository
2044
uses: actions/checkout@v3
2145
with:
@@ -25,7 +49,7 @@ jobs:
2549
- name: Setup Python
2650
uses: actions/setup-python@v4
2751
with:
28-
python-version: '3.10'
52+
python-version: '3.11'
2953

3054
- name: Test ExecuTorch Metal build
3155
run: |
@@ -36,8 +60,32 @@ jobs:
3660
3761
export-voxtral-metal-artifact:
3862
name: export-voxtral-metal-artifact
39-
runs-on: macos-latest
63+
runs-on: macos-m2-stable
4064
steps:
65+
- name: Print machine info
66+
run: |
67+
uname -a
68+
if [ $(uname -s) == Darwin ]; then
69+
sw_vers
70+
# Print RAM in GB
71+
RAM_BYTES=$(sysctl -n hw.memsize)
72+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
73+
echo "Available RAM (GB): $RAM_GB"
74+
sysctl machdep.cpu.brand_string
75+
sysctl machdep.cpu.core_count
76+
# Print number of GPU cores (Apple Silicon)
77+
if command -v system_profiler &> /dev/null; then
78+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
79+
if [ -z "$GPU_CORES" ]; then
80+
# Fallback: try to parse "Core Count" from Apple GPU section
81+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
82+
fi
83+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
84+
else
85+
echo "system_profiler not available, cannot determine GPU cores."
86+
fi
87+
fi
88+
4189
- name: Checkout repository
4290
uses: actions/checkout@v3
4391
with:
@@ -47,14 +95,17 @@ jobs:
4795
- name: Setup Python
4896
uses: actions/setup-python@v4
4997
with:
50-
python-version: '3.10'
98+
python-version: '3.11'
5199

52100
- name: Export Voxtral with Metal Backend
53101
env:
54102
EXECUTORCH_HF_TOKEN: ${{ secrets.EXECUTORCH_HF_TOKEN }}
55103
run: |
56104
set -eux
57105
106+
OPTIMUM_ET_VERSION=$(cat .ci/docker/ci_commit_pins/optimum-executorch.txt)
107+
echo "Using optimum-executorch version: ${OPTIMUM_ET_VERSION}"
108+
58109
echo "::group::Setup ExecuTorch"
59110
PYTHON_EXECUTABLE=python3 ./install_executorch.sh
60111
echo "::endgroup::"
@@ -104,8 +155,32 @@ jobs:
104155
test-voxtral-metal-e2e:
105156
name: test-voxtral-metal-e2e
106157
needs: export-voxtral-metal-artifact
107-
runs-on: macos-latest
158+
runs-on: macos-m2-stable
108159
steps:
160+
- name: Print machine info
161+
run: |
162+
uname -a
163+
if [ $(uname -s) == Darwin ]; then
164+
sw_vers
165+
# Print RAM in GB
166+
RAM_BYTES=$(sysctl -n hw.memsize)
167+
RAM_GB=$(echo "scale=2; $RAM_BYTES/1024/1024/1024" | bc)
168+
echo "Available RAM (GB): $RAM_GB"
169+
sysctl machdep.cpu.brand_string
170+
sysctl machdep.cpu.core_count
171+
# Print number of GPU cores (Apple Silicon)
172+
if command -v system_profiler &> /dev/null; then
173+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Total Number of Cores/ {print $5; exit}')
174+
if [ -z "$GPU_CORES" ]; then
175+
# Fallback: try to parse "Core Count" from Apple GPU section
176+
GPU_CORES=$(system_profiler SPDisplaysDataType | awk '/Core Count/ {print $3; exit}')
177+
fi
178+
echo "GPU Cores: ${GPU_CORES:-Unknown}"
179+
else
180+
echo "system_profiler not available, cannot determine GPU cores."
181+
fi
182+
fi
183+
109184
- name: Checkout repository
110185
uses: actions/checkout@v3
111186
with:
@@ -115,7 +190,7 @@ jobs:
115190
- name: Setup Python
116191
uses: actions/setup-python@v4
117192
with:
118-
python-version: '3.10'
193+
python-version: '3.11'
119194

120195
- name: Download artifacts
121196
uses: actions/download-artifact@v4

0 commit comments

Comments
 (0)