@@ -215,7 +215,7 @@ jobs:
215
215
set -eux
216
216
PYTHONPATH="${PWD}" python .ci/scripts/gather_test_models.py --event "pull_request" --backend "gpu"
217
217
test-gpu-compile :
218
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
218
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
219
219
name : test-gpu-compile (${{ matrix.platform }}, ${{ matrix.model_name }})
220
220
needs : gather-models-gpu
221
221
strategy :
@@ -224,7 +224,7 @@ jobs:
224
224
with :
225
225
runner : linux.g5.4xlarge.nvidia.gpu
226
226
gpu-arch-type : cuda
227
- gpu-arch-version : " 12.1 "
227
+ gpu-arch-version : " 12.4 "
228
228
script : |
229
229
echo "::group::Print machine info"
230
230
nvidia-smi
@@ -250,7 +250,7 @@ jobs:
250
250
echo "::endgroup::"
251
251
252
252
test-gpu-aoti-bfloat16 :
253
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
253
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
254
254
name : test-gpu-aoti-bfloat16 (${{ matrix.platform }}, ${{ matrix.model_name }})
255
255
needs : gather-models-gpu
256
256
strategy :
@@ -259,18 +259,13 @@ jobs:
259
259
with :
260
260
runner : linux.g5.4xlarge.nvidia.gpu
261
261
gpu-arch-type : cuda
262
- gpu-arch-version : " 12.1 "
262
+ gpu-arch-version : " 12.4 "
263
263
timeout : 60
264
264
script : |
265
265
echo "::group::Print machine info"
266
266
nvidia-smi
267
267
echo "::endgroup::"
268
268
269
- echo "::group::Install newer objcopy that supports --set-section-alignment"
270
- yum install -y devtoolset-10-binutils
271
- export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
272
- echo "::endgroup::"
273
-
274
269
echo "::group::Install required packages"
275
270
./install/install_requirements.sh cuda
276
271
pip3 list
@@ -291,7 +286,7 @@ jobs:
291
286
echo "::endgroup::"
292
287
293
288
test-gpu-aoti-float32 :
294
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
289
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
295
290
name : test-gpu-aoti-float32 (${{ matrix.platform }}, ${{ matrix.model_name }})
296
291
needs : gather-models-gpu
297
292
strategy :
@@ -300,17 +295,12 @@ jobs:
300
295
with :
301
296
runner : linux.g5.4xlarge.nvidia.gpu
302
297
gpu-arch-type : cuda
303
- gpu-arch-version : " 12.1 "
298
+ gpu-arch-version : " 12.4 "
304
299
script : |
305
300
echo "::group::Print machine info"
306
301
nvidia-smi
307
302
echo "::endgroup::"
308
303
309
- echo "::group::Install newer objcopy that supports --set-section-alignment"
310
- yum install -y devtoolset-10-binutils
311
- export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
312
- echo "::endgroup::"
313
-
314
304
echo "::group::Install required packages"
315
305
./install/install_requirements.sh cuda
316
306
pip list
@@ -337,7 +327,7 @@ jobs:
337
327
echo "::endgroup::"
338
328
339
329
test-gpu-aoti-float16 :
340
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
330
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
341
331
name : test-gpu-aoti-float16 (${{ matrix.platform }}, ${{ matrix.model_name }})
342
332
needs : gather-models-gpu
343
333
strategy :
@@ -346,17 +336,12 @@ jobs:
346
336
with :
347
337
runner : linux.g5.4xlarge.nvidia.gpu
348
338
gpu-arch-type : cuda
349
- gpu-arch-version : " 12.1 "
339
+ gpu-arch-version : " 12.4 "
350
340
script : |
351
341
echo "::group::Print machine info"
352
342
nvidia-smi
353
343
echo "::endgroup::"
354
344
355
- echo "::group::Install newer objcopy that supports --set-section-alignment"
356
- yum install -y devtoolset-10-binutils
357
- export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
358
- echo "::endgroup::"
359
-
360
345
echo "::group::Install required packages"
361
346
./install/install_requirements.sh cuda
362
347
pip list
@@ -384,7 +369,7 @@ jobs:
384
369
echo "::endgroup::"
385
370
386
371
test-gpu-eval-sanity-check :
387
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
372
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
388
373
name : test-gpu-eval-sanity-check (${{ matrix.platform }}, ${{ matrix.model_name }})
389
374
needs : gather-models-gpu
390
375
strategy :
@@ -393,17 +378,12 @@ jobs:
393
378
with :
394
379
runner : linux.g5.4xlarge.nvidia.gpu
395
380
gpu-arch-type : cuda
396
- gpu-arch-version : " 12.1 "
381
+ gpu-arch-version : " 12.4 "
397
382
script : |
398
383
echo "::group::Print machine info"
399
384
nvidia-smi
400
385
echo "::endgroup::"
401
386
402
- echo "::group::Install newer objcopy that supports --set-section-alignment"
403
- yum install -y devtoolset-10-binutils
404
- export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
405
- echo "::endgroup::"
406
-
407
387
echo "::group::Install required packages"
408
388
./install/install_requirements.sh cuda
409
389
pip3 list
@@ -1031,7 +1011,7 @@ jobs:
1031
1011
echo "Tests complete."
1032
1012
1033
1013
test-build-runner-et-android :
1034
- uses : pytorch/test-infra/.github/workflows/linux_job .yml@main
1014
+ uses : pytorch/test-infra/.github/workflows/linux_job_v2 .yml@main
1035
1015
with :
1036
1016
runner : linux.4xlarge
1037
1017
script : |
@@ -1124,3 +1104,41 @@ jobs:
1124
1104
echo "Generate AOTI"
1125
1105
python torchchat.py generate stories110M --aoti-package-path ./model.pt2 --prompt "${PRMT}"
1126
1106
echo "Tests complete."
1107
+
1108
+ test-torchao-experimental-mps :
1109
+ strategy :
1110
+ matrix :
1111
+ runner : [macos-m1-stable]
1112
+ runs-on : ${{matrix.runner}}
1113
+ steps :
1114
+ - name : Checkout repo
1115
+ uses : actions/checkout@v3
1116
+ with :
1117
+ submodules : true
1118
+ - name : Setup Python
1119
+ uses : actions/setup-python@v2
1120
+ with :
1121
+ python-version : 3.10.11
1122
+ - name : Print machine info
1123
+ run : |
1124
+ uname -a
1125
+ if [ $(uname -s) == Darwin ]; then
1126
+ sysctl machdep.cpu.brand_string
1127
+ sysctl machdep.cpu.core_count
1128
+ fi
1129
+ - name : Install torchchat
1130
+ run : |
1131
+ echo "Intalling pip3 packages"
1132
+ ./install/install_requirements.sh
1133
+ pip3 list
1134
+ python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
1135
+ - name : Install torchao-ops-mps
1136
+ id : install-torchao-ops-mps
1137
+ run : |
1138
+ bash torchchat/utils/scripts/build_torchao_ops.sh mps
1139
+ - name : Run inference
1140
+ run : |
1141
+ python torchchat.py download stories110M
1142
+ export PRMT="Once upon a time in a land far away"
1143
+ echo "Generate eager"
1144
+ python torchchat.py generate stories110M --temperature 0 --prompt "${PRMT}" --device mps --dtype float32 --quantize '{"linear:afpwx": {"bitwidth": 3, "groupsize": 32}}'
0 commit comments