Skip to content

Commit b96f938

Browse files
author
Michael Gschwind
committed
merge
2 parents c37d913 + a982a9c commit b96f938

24 files changed

+517
-124
lines changed

.github/workflows/pull.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -915,9 +915,8 @@ jobs:
915915
- if: ${{ steps.install-et.outputs.cache-hit != 'true' }}
916916
continue-on-error: true
917917
run: |
918-
echo "Intalling ExecuTorch"
919-
export TORCHCHAT_ROOT=${PWD}
920-
bash scripts/install_et.sh
918+
echo "Installing ExecuTorch"
919+
bash scripts/build_native.sh et
921920
- name: Install ET pip
922921
run: |
923922
echo "ET build directory"

.github/workflows/run-readme-periodic.yml

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Run the README instructions periodically to ensure they work
22

33
on:
44
schedule:
5-
- cron: '0 0 * * *' # Runs daily at midnight UTC
5+
- cron: '0 0 * * *' # Runs daily at midnight UTC
66
push:
77
tags:
88
- ciflow/periodic/*
@@ -22,10 +22,10 @@ jobs:
2222
uname -a
2323
echo "::endgroup::"
2424
25-
# echo "::group::Install newer objcopy that supports --set-section-alignment"
26-
# yum install -y devtoolset-10-binutils
27-
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
28-
# echo "::endgroup::"
25+
echo "::group::Install newer objcopy that supports --set-section-alignment"
26+
yum install -y devtoolset-10-binutils
27+
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
28+
echo "::endgroup::"
2929
3030
# echo "::group::get_llama"
3131
# (
@@ -34,19 +34,35 @@ jobs:
3434
# )
3535
# echo "::endgroup::"
3636
37-
echo "::group::Create script"
38-
python3 scripts/updown.py --file README.md > ./we-run-this.sh
37+
echo "::group::Create script to run README"
38+
python3 scripts/updown.py --file README.md > ./run-readme.sh
39+
# for good measure, if something happened to updown processor,
40+
# and it did not error out, fail with an exit 1
41+
echo "exit 1" >> ./run-readme.sh
42+
echo "::endgroup::"
43+
44+
echo "::group::Run README"
45+
echo "*******************************************"
46+
cat ./run-readme.sh
47+
echo "*******************************************"
48+
bash -x ./run-readme.sh
49+
echo "::endgroup::"
50+
51+
echo "::group::Create script to run quantization"
52+
python3 scripts/updown.py --file docs/quantization.md > ./run-quantization.sh
3953
# for good measure, if something happened to updown processor,
4054
# and it did not error out, fail with an exit 1
41-
echo "exit 1" >> ./we-run-this.sh
55+
echo "exit 1" >> ./run-quantization.sh
4256
echo "::endgroup::"
4357
44-
echo "::group::Run This"
58+
echo "::group::Run quantization"
4559
echo "*******************************************"
46-
cat ./we-run-this.sh
60+
cat ./run-quantization.sh
4761
echo "*******************************************"
48-
bash -x ./we-run-this.sh
49-
62+
bash -x ./run-quantization.sh
63+
echo "::endgroup::"
64+
65+
echo "::group::Completion"
5066
echo "tests complete"
5167
echo "*******************************************"
5268
echo "::endgroup::"
Lines changed: 67 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: Run the README instructions - with stories - on MacOS
2-
on:
1+
name: Run the README instructions - with stories - on MacOS
2+
on:
33
pull_request:
44
push:
55
branches:
66
- main
77
workflow_dispatch:
88
jobs:
99
test-readme-macos:
10-
runs-on: macos-14-xlarge
10+
runs-on: macos-14-xlarge
1111
steps:
1212
- name: Checkout code
1313
uses: actions/checkout@v2
@@ -26,32 +26,85 @@ jobs:
2626
# as this script does not isntall anything into conda env but rather as system dep
2727
pip3 uninstall -y torch || true
2828
set -eou pipefail
29-
29+
3030
echo "::group::Print machine info"
3131
uname -a
3232
sysctl machdep.cpu.brand_string
3333
sysctl machdep.cpu.core_count
3434
echo "::endgroup::"
35-
35+
3636
# echo "::group::Install newer objcopy that supports --set-section-alignment"
3737
# yum install -y devtoolset-10-binutils
3838
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
3939
# echo "::endgroup::"
4040
41-
echo "::group::Create script"
42-
python3 scripts/updown.py --file README.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./we-run-this.sh
43-
# for good measure, if something happened to updown processor,
41+
echo "::group::Create script to run README"
42+
python3 scripts/updown.py --file README.md --replace 'llama3:stories15M,-l 3:-l 2,meta-llama/Meta-Llama-3-8B-Instruct:stories15M' --suppress huggingface-cli,HF_TOKEN > ./run-readme.sh
43+
# for good measure, if something happened to updown processor,
4444
# and it did not error out, fail with an exit 1
45-
echo "exit 1" >> ./we-run-this.sh
45+
echo "exit 1" >> ./run-readme.sh
4646
echo "::endgroup::"
47-
48-
echo "::group::Run This"
47+
48+
echo "::group::Run README"
4949
echo "*******************************************"
50-
cat ./we-run-this.sh
50+
cat ./run-readme.sh
5151
echo "*******************************************"
52-
bash -x ./we-run-this.sh
53-
52+
bash -x ./run-readme.sh
53+
echo "::endgroup::"
54+
55+
echo "::group::Completion"
5456
echo "tests complete"
5557
echo "*******************************************"
5658
echo "::endgroup::"
5759

60+
61+
test-quantization-macos:
62+
runs-on: macos-14-xlarge
63+
steps:
64+
- name: Checkout code
65+
uses: actions/checkout@v2
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: '3.10.11'
69+
- name: Setup Xcode
70+
if: runner.os == 'macOS'
71+
uses: maxim-lobanov/setup-xcode@v1
72+
with:
73+
xcode-version: '15.3'
74+
- name: Run script
75+
run: |
76+
set -x
77+
# NS: Remove previous installation of torch first
78+
# as this script does not isntall anything into conda env but rather as system dep
79+
pip3 uninstall -y torch || true
80+
set -eou pipefail
81+
82+
echo "::group::Print machine info"
83+
uname -a
84+
sysctl machdep.cpu.brand_string
85+
sysctl machdep.cpu.core_count
86+
echo "::endgroup::"
87+
88+
# echo "::group::Install newer objcopy that supports --set-section-alignment"
89+
# yum install -y devtoolset-10-binutils
90+
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
91+
# echo "::endgroup::"
92+
93+
echo "::group::Create script to run quantization"
94+
python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
95+
# for good measure, if something happened to updown processor,
96+
# and it did not error out, fail with an exit 1
97+
echo "exit 1" >> ./run-quantization.sh
98+
echo "::endgroup::"
99+
100+
echo "::group::Run quantization"
101+
echo "*******************************************"
102+
cat ./run-quantization.sh
103+
echo "*******************************************"
104+
bash -x ./run-quantization.sh
105+
echo "::endgroup::"
106+
107+
echo "::group::Completion"
108+
echo "tests complete"
109+
echo "*******************************************"
110+
echo "::endgroup::"
Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
name: Run the README instructions - with stories - on MPS/MacOS
2+
on:
3+
pull_request:
4+
push:
5+
branches:
6+
- main
7+
workflow_dispatch:
8+
jobs:
9+
test-readme-mps-macos:
10+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
11+
with:
12+
runner: macos-m1-stable # neeps MPS, was macos-m1-stable
13+
script: |
14+
conda create -y -n test-readme-mps-macos python=3.10.11
15+
conda activate test-readme-mps-macos
16+
set -x
17+
# NS: Remove previous installation of torch first
18+
# as this script does not isntall anything into conda env but rather as system dep
19+
pip3 uninstall -y torch || true
20+
set -eou pipefail
21+
22+
echo "::group::Print machine info"
23+
uname -a
24+
sysctl machdep.cpu.brand_string
25+
sysctl machdep.cpu.core_count
26+
echo "::endgroup::"
27+
28+
# echo "::group::Install newer objcopy that supports --set-section-alignment"
29+
# yum install -y devtoolset-10-binutils
30+
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
31+
# echo "::endgroup::"
32+
33+
echo "::group::Create script to run README"
34+
python3 scripts/updown.py --file README.md --replace 'llama3:stories15M,-l 3:-l 2,meta-llama/Meta-Llama-3-8B-Instruct:stories15M' --suppress huggingface-cli,HF_TOKEN > ./run-readme.sh
35+
# for good measure, if something happened to updown processor,
36+
# and it did not error out, fail with an exit 1
37+
echo "exit 1" >> ./run-readme.sh
38+
echo "::endgroup::"
39+
40+
echo "::group::Run README"
41+
echo "*******************************************"
42+
cat ./run-readme.sh
43+
echo "*******************************************"
44+
bash -x ./run-readme.sh
45+
echo "::endgroup::"
46+
47+
echo "::group::Completion"
48+
echo "tests complete"
49+
echo "*******************************************"
50+
echo "::endgroup::"
51+
52+
# test-quantization-mps-macos:
53+
# uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
54+
# with:
55+
# runner: macos-m1-stable # neeps MPS, was macos-m1-stable
56+
# script: |
57+
# set -x
58+
# conda create -y -n test-quantization-mps-macos python=3.10.11
59+
# conda activate test-quantization-mps-macos
60+
# # NS: Remove previous installation of torch first
61+
# # as this script does not isntall anything into conda env but rather as system dep
62+
# pip3 uninstall -y torch || true
63+
# set -eou pipefail
64+
#
65+
# echo "::group::Print machine info"
66+
# uname -a
67+
# sysctl machdep.cpu.brand_string
68+
# sysctl machdep.cpu.core_count
69+
# echo "::endgroup::"
70+
#
71+
# # echo "::group::Install newer objcopy that supports --set-section-alignment"
72+
# # yum install -y devtoolset-10-binutils
73+
# # export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
74+
# # echo "::endgroup::"
75+
#
76+
# echo "::group::Create script to run quantization"
77+
# python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
78+
# # for good measure, if something happened to updown processor,
79+
# # and it did not error out, fail with an exit 1
80+
# echo "exit 1" >> ./run-quantization.sh
81+
# echo "::endgroup::"
82+
#
83+
# echo "::group::Run quantization"
84+
# echo "*******************************************"
85+
# cat ./run-quantization.sh
86+
# echo "*******************************************"
87+
# bash -x ./run-quantization.sh
88+
# echo "::endgroup::"
89+
#
90+
# echo "::group::Completion"
91+
# echo "tests complete"
92+
# echo "*******************************************"
93+
# echo "::endgroup::"
94+
#

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

Lines changed: 46 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run the README instructions - with stories
1+
name: Run the README instructions - with stories
22

33
on:
44
pull_request:
@@ -9,6 +9,42 @@ on:
99

1010
jobs:
1111
test-readme-any:
12+
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
13+
with:
14+
runner: linux.g5.4xlarge.nvidia.gpu
15+
gpu-arch-type: cuda
16+
gpu-arch-version: "12.1"
17+
timeout: 60
18+
script: |
19+
echo "::group::Print machine info"
20+
uname -a
21+
echo "::endgroup::"
22+
23+
echo "::group::Install newer objcopy that supports --set-section-alignment"
24+
yum install -y devtoolset-10-binutils
25+
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
26+
echo "::endgroup::"
27+
28+
echo "::group::Create script to run README"
29+
python3 scripts/updown.py --file README.md --replace 'llama3:stories15M,-l 3:-l 2,meta-llama/Meta-Llama-3-8B-Instruct:stories15M' --suppress huggingface-cli,HF_TOKEN > ./run-readme.sh
30+
# for good measure, if something happened to updown processor,
31+
# and it did not error out, fail with an exit 1
32+
echo "exit 1" >> ./run-readme.sh
33+
echo "::endgroup::"
34+
35+
echo "::group::Run README"
36+
echo "*******************************************"
37+
cat ./run-readme.sh
38+
echo "*******************************************"
39+
bash -x ./run-readme.sh
40+
echo "::endgroup::"
41+
42+
echo "::group::Completion"
43+
echo "tests complete"
44+
echo "*******************************************"
45+
echo "::endgroup::"
46+
47+
test-quantization-any:
1248
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
1349
with:
1450
runner: linux.g5.4xlarge.nvidia.gpu
@@ -25,19 +61,21 @@ jobs:
2561
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
2662
# echo "::endgroup::"
2763
28-
echo "::group::Create script"
29-
python3 scripts/updown.py --file README.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./we-run-this.sh
64+
echo "::group::Create script to run quantization"
65+
python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
3066
# for good measure, if something happened to updown processor,
3167
# and it did not error out, fail with an exit 1
32-
echo "exit 1" >> ./we-run-this.sh
68+
echo "exit 1" >> ./run-quantization.sh
3369
echo "::endgroup::"
3470
35-
echo "::group::Run This"
71+
echo "::group::Run quantization"
3672
echo "*******************************************"
37-
cat ./we-run-this.sh
73+
cat ./run-quantization.sh
3874
echo "*******************************************"
39-
bash -x ./we-run-this.sh
40-
75+
bash -x ./run-quantization.sh
76+
echo "::endgroup::"
77+
78+
echo "::group::Completion"
4179
echo "tests complete"
4280
echo "*******************************************"
4381
echo "::endgroup::"

.pins/et-pin.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
b9488fe9d41fe5190641f323f3f6a5295e86256c
1+
fff20a738c5bb5c1cb259468b0a8aa6c6be8cd38

0 commit comments

Comments
 (0)