Skip to content
This repository was archived by the owner on Sep 10, 2025. It is now read-only.

Commit 049418d

Browse files
authored
Merge branch 'main' into patch-43
2 parents 2e6b5ae + 9686c79 commit 049418d

File tree

2 files changed

+194
-2
lines changed

2 files changed

+194
-2
lines changed

.github/workflows/run-readme-pr-macos.yml

Lines changed: 113 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ jobs:
3333
sysctl machdep.cpu.core_count
3434
echo "::endgroup::"
3535
36+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
37+
export TORCHCHAT_DEVICE=cpu
3638
. .ci/scripts/run-docs readme
3739
3840
echo "::group::Completion"
@@ -68,8 +70,10 @@ jobs:
6870
sysctl machdep.cpu.core_count
6971
echo "::endgroup::"
7072
73+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
74+
export TORCHCHAT_DEVICE=cpu
7175
. .ci/scripts/run-docs quantization
72-
76+
7377
echo "::group::Completion"
7478
echo "tests complete"
7579
echo "*******************************************"
@@ -103,7 +107,9 @@ jobs:
103107
sysctl machdep.cpu.core_count
104108
echo "::endgroup::"
105109
106-
. .ci/scripts/run-docs gguf
110+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
111+
export TORCHCHAT_DEVICE=cpu
112+
.ci/scripts/run-docs gguf
107113
108114
echo "::group::Completion"
109115
echo "tests complete"
@@ -137,9 +143,114 @@ jobs:
137143
sysctl machdep.cpu.core_count
138144
echo "::endgroup::"
139145
146+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
147+
export TORCHCHAT_DEVICE=cpu
140148
. .ci/scripts/run-docs advanced
141149
142150
echo "::group::Completion"
143151
echo "tests complete"
144152
echo "*******************************************"
145153
echo "::endgroup::"
154+
155+
test-eval-macos:
156+
runs-on: macos-14-xlarge
157+
steps:
158+
- name: Checkout code
159+
uses: actions/checkout@v2
160+
- uses: actions/setup-python@v4
161+
with:
162+
python-version: '3.10.11'
163+
- name: Setup Xcode
164+
if: runner.os == 'macOS'
165+
uses: maxim-lobanov/setup-xcode@v1
166+
with:
167+
xcode-version: '15.3'
168+
- name: Run script
169+
run: |
170+
set -x
171+
# NS: Remove previous installation of torch first
172+
# as this script does not isntall anything into conda env but rather as system dep
173+
pip3 uninstall -y torch || true
174+
set -eou pipefail
175+
176+
echo "::group::Print machine info"
177+
uname -a
178+
sysctl machdep.cpu.brand_string
179+
sysctl machdep.cpu.core_count
180+
echo "::endgroup::"
181+
182+
.ci/scripts/run-docs evaluation
183+
184+
echo "::group::Completion"
185+
echo "tests complete"
186+
echo "*******************************************"
187+
echo "::endgroup::"
188+
189+
test-multimodal-macos:
190+
runs-on: macos-14-xlarge
191+
steps:
192+
- name: Checkout code
193+
uses: actions/checkout@v2
194+
- uses: actions/setup-python@v4
195+
with:
196+
python-version: '3.10.11'
197+
- name: Setup Xcode
198+
if: runner.os == 'macOS'
199+
uses: maxim-lobanov/setup-xcode@v1
200+
with:
201+
xcode-version: '15.3'
202+
- name: Run script
203+
run: |
204+
set -x
205+
# NS: Remove previous installation of torch first
206+
# as this script does not isntall anything into conda env but rather as system dep
207+
pip3 uninstall -y torch || true
208+
set -eou pipefail
209+
210+
echo "::group::Print machine info"
211+
uname -a
212+
sysctl machdep.cpu.brand_string
213+
sysctl machdep.cpu.core_count
214+
echo "::endgroup::"
215+
216+
.ci/scripts/run-docs multimodal
217+
218+
echo "::group::Completion"
219+
echo "tests complete"
220+
echo "*******************************************"
221+
echo "::endgroup::"
222+
223+
test-native-macos:
224+
runs-on: macos-14-xlarge
225+
steps:
226+
- name: Checkout code
227+
uses: actions/checkout@v2
228+
- uses: actions/setup-python@v4
229+
with:
230+
python-version: '3.10.11'
231+
- name: Setup Xcode
232+
if: runner.os == 'macOS'
233+
uses: maxim-lobanov/setup-xcode@v1
234+
with:
235+
xcode-version: '15.3'
236+
- name: Run script
237+
run: |
238+
set -x
239+
# NS: Remove previous installation of torch first
240+
# as this script does not isntall anything into conda env but rather as system dep
241+
pip3 uninstall -y torch || true
242+
set -eou pipefail
243+
244+
echo "::group::Print machine info"
245+
uname -a
246+
sysctl machdep.cpu.brand_string
247+
sysctl machdep.cpu.core_count
248+
echo "::endgroup::"
249+
250+
.ci/scripts/run-docs native
251+
252+
echo "::group::Completion"
253+
echo "tests complete"
254+
echo "*******************************************"
255+
echo "::endgroup::"
256+

.github/workflows/run-readme-pr-mps.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,3 +113,84 @@ jobs:
113113
echo "tests complete"
114114
echo "*******************************************"
115115
echo "::endgroup::"
116+
117+
test-evaluation-mps-macos:
118+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
119+
with:
120+
runner: macos-m1-14 # needs MPS, was macos-m1-stable
121+
script: |
122+
set -x
123+
conda create -y -n test-evaluation-mps-macos python=3.10.11
124+
conda activate test-evaluation-mps-macos
125+
# NS: Remove previous installation of torch first
126+
# as this script does not isntall anything into conda env
127+
# but rather system dep
128+
pip3 uninstall -y torch || true
129+
set -eou pipefail
130+
131+
echo "::group::Print machine info"
132+
uname -a
133+
sysctl machdep.cpu.brand_string
134+
sysctl machdep.cpu.core_count
135+
echo "::endgroup::"
136+
137+
.ci/scripts/run-docs evaluation
138+
139+
echo "::group::Completion"
140+
echo "tests complete"
141+
echo "*******************************************"
142+
echo "::endgroup::"
143+
144+
test-multimodal-mps-macos:
145+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
146+
with:
147+
runner: macos-m1-14 # needs MPS, was macos-m1-stable
148+
script: |
149+
set -x
150+
conda create -y -n test-multimodal-mps-macos python=3.10.11
151+
conda activate test-multimodal-mps-macos
152+
# NS: Remove previous installation of torch first
153+
# as this script does not isntall anything into conda env
154+
# but rather system dep
155+
pip3 uninstall -y torch || true
156+
set -eou pipefail
157+
158+
echo "::group::Print machine info"
159+
uname -a
160+
sysctl machdep.cpu.brand_string
161+
sysctl machdep.cpu.core_count
162+
echo "::endgroup::"
163+
164+
.ci/scripts/run-docs multimodal
165+
166+
echo "::group::Completion"
167+
echo "tests complete"
168+
echo "*******************************************"
169+
echo "::endgroup::"
170+
171+
test-native-mps-macos:
172+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
173+
with:
174+
runner: macos-m1-14 # needs MPS, was macos-m1-stable
175+
script: |
176+
set -x
177+
conda create -y -n test-native-mps-macos python=3.10.11
178+
conda activate test-native-mps-macos
179+
# NS: Remove previous installation of torch first
180+
# as this script does not isntall anything into conda env
181+
# but rather system dep
182+
pip3 uninstall -y torch || true
183+
set -eou pipefail
184+
185+
echo "::group::Print machine info"
186+
uname -a
187+
sysctl machdep.cpu.brand_string
188+
sysctl machdep.cpu.core_count
189+
echo "::endgroup::"
190+
191+
.ci/scripts/run-docs native
192+
193+
echo "::group::Completion"
194+
echo "tests complete"
195+
echo "*******************************************"
196+
echo "::endgroup::"

0 commit comments

Comments
 (0)