Skip to content

Commit f44fad1

Browse files
authored
Merge branch 'pytorch:main' into patch-44
2 parents ed8ab55 + 9686c79 commit f44fad1

File tree

2 files changed

+192
-4
lines changed

2 files changed

+192
-4
lines changed

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

Lines changed: 111 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ jobs:
3333
sysctl machdep.cpu.core_count
3434
echo "::endgroup::"
3535
36-
.ci/scripts/run-docs readme
36+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
37+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs readme
3738
3839
echo "::group::Completion"
3940
echo "tests complete"
@@ -68,7 +69,8 @@ jobs:
6869
sysctl machdep.cpu.core_count
6970
echo "::endgroup::"
7071
71-
.ci/scripts/run-docs quantization
72+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
73+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs quantization
7274
7375
echo "::group::Completion"
7476
echo "tests complete"
@@ -103,7 +105,8 @@ jobs:
103105
sysctl machdep.cpu.core_count
104106
echo "::endgroup::"
105107
106-
.ci/scripts/run-docs gguf
108+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
109+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs gguf
107110
108111
echo "::group::Completion"
109112
echo "tests complete"
@@ -137,9 +140,113 @@ jobs:
137140
sysctl machdep.cpu.core_count
138141
echo "::endgroup::"
139142
140-
.ci/scripts/run-docs advanced
143+
echo "using workaround for #1416 and #1315 by setting torchchat device explicitly"
144+
TORCHCHAT_DEVICE=cpu .ci/scripts/run-docs advanced
141145
142146
echo "::group::Completion"
143147
echo "tests complete"
144148
echo "*******************************************"
145149
echo "::endgroup::"
150+
151+
test-eval-macos:
152+
runs-on: macos-14-xlarge
153+
steps:
154+
- name: Checkout code
155+
uses: actions/checkout@v2
156+
- uses: actions/setup-python@v4
157+
with:
158+
python-version: '3.10.11'
159+
- name: Setup Xcode
160+
if: runner.os == 'macOS'
161+
uses: maxim-lobanov/setup-xcode@v1
162+
with:
163+
xcode-version: '15.3'
164+
- name: Run script
165+
run: |
166+
set -x
167+
# NS: Remove previous installation of torch first
168+
# as this script does not isntall anything into conda env but rather as system dep
169+
pip3 uninstall -y torch || true
170+
set -eou pipefail
171+
172+
echo "::group::Print machine info"
173+
uname -a
174+
sysctl machdep.cpu.brand_string
175+
sysctl machdep.cpu.core_count
176+
echo "::endgroup::"
177+
178+
.ci/scripts/run-docs evaluation
179+
180+
echo "::group::Completion"
181+
echo "tests complete"
182+
echo "*******************************************"
183+
echo "::endgroup::"
184+
185+
test-multimodal-macos:
186+
runs-on: macos-14-xlarge
187+
steps:
188+
- name: Checkout code
189+
uses: actions/checkout@v2
190+
- uses: actions/setup-python@v4
191+
with:
192+
python-version: '3.10.11'
193+
- name: Setup Xcode
194+
if: runner.os == 'macOS'
195+
uses: maxim-lobanov/setup-xcode@v1
196+
with:
197+
xcode-version: '15.3'
198+
- name: Run script
199+
run: |
200+
set -x
201+
# NS: Remove previous installation of torch first
202+
# as this script does not isntall anything into conda env but rather as system dep
203+
pip3 uninstall -y torch || true
204+
set -eou pipefail
205+
206+
echo "::group::Print machine info"
207+
uname -a
208+
sysctl machdep.cpu.brand_string
209+
sysctl machdep.cpu.core_count
210+
echo "::endgroup::"
211+
212+
.ci/scripts/run-docs multimodal
213+
214+
echo "::group::Completion"
215+
echo "tests complete"
216+
echo "*******************************************"
217+
echo "::endgroup::"
218+
219+
test-native-macos:
220+
runs-on: macos-14-xlarge
221+
steps:
222+
- name: Checkout code
223+
uses: actions/checkout@v2
224+
- uses: actions/setup-python@v4
225+
with:
226+
python-version: '3.10.11'
227+
- name: Setup Xcode
228+
if: runner.os == 'macOS'
229+
uses: maxim-lobanov/setup-xcode@v1
230+
with:
231+
xcode-version: '15.3'
232+
- name: Run script
233+
run: |
234+
set -x
235+
# NS: Remove previous installation of torch first
236+
# as this script does not isntall anything into conda env but rather as system dep
237+
pip3 uninstall -y torch || true
238+
set -eou pipefail
239+
240+
echo "::group::Print machine info"
241+
uname -a
242+
sysctl machdep.cpu.brand_string
243+
sysctl machdep.cpu.core_count
244+
echo "::endgroup::"
245+
246+
.ci/scripts/run-docs native
247+
248+
echo "::group::Completion"
249+
echo "tests complete"
250+
echo "*******************************************"
251+
echo "::endgroup::"
252+

.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)