Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Gschwind committed May 10, 2024
2 parents c37d913 + a982a9c commit b96f938
Show file tree
Hide file tree
Showing 24 changed files with 517 additions and 124 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/pull.yml
Original file line number Diff line number Diff line change
Expand Up @@ -915,9 +915,8 @@ jobs:
- if: ${{ steps.install-et.outputs.cache-hit != 'true' }}
continue-on-error: true
run: |
echo "Intalling ExecuTorch"
export TORCHCHAT_ROOT=${PWD}
bash scripts/install_et.sh
echo "Installing ExecuTorch"
bash scripts/build_native.sh et
- name: Install ET pip
run: |
echo "ET build directory"
Expand Down
40 changes: 28 additions & 12 deletions .github/workflows/run-readme-periodic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run the README instructions periodically to ensure they work

on:
schedule:
- cron: '0 0 * * *' # Runs daily at midnight UTC
- cron: '0 0 * * *' # Runs daily at midnight UTC
push:
tags:
- ciflow/periodic/*
Expand All @@ -22,10 +22,10 @@ jobs:
uname -a
echo "::endgroup::"
# echo "::group::Install newer objcopy that supports --set-section-alignment"
# yum install -y devtoolset-10-binutils
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Install newer objcopy that supports --set-section-alignment"
yum install -y devtoolset-10-binutils
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
echo "::endgroup::"
# echo "::group::get_llama"
# (
Expand All @@ -34,19 +34,35 @@ jobs:
# )
# echo "::endgroup::"
echo "::group::Create script"
python3 scripts/updown.py --file README.md > ./we-run-this.sh
echo "::group::Create script to run README"
python3 scripts/updown.py --file README.md > ./run-readme.sh
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./run-readme.sh
echo "::endgroup::"
echo "::group::Run README"
echo "*******************************************"
cat ./run-readme.sh
echo "*******************************************"
bash -x ./run-readme.sh
echo "::endgroup::"
echo "::group::Create script to run quantization"
python3 scripts/updown.py --file docs/quantization.md > ./run-quantization.sh
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./we-run-this.sh
echo "exit 1" >> ./run-quantization.sh
echo "::endgroup::"
echo "::group::Run This"
echo "::group::Run quantization"
echo "*******************************************"
cat ./we-run-this.sh
cat ./run-quantization.sh
echo "*******************************************"
bash -x ./we-run-this.sh
bash -x ./run-quantization.sh
echo "::endgroup::"
echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"
Expand Down
81 changes: 67 additions & 14 deletions .github/workflows/run-readme-pr-macos.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Run the README instructions - with stories - on MacOS
on:
name: Run the README instructions - with stories - on MacOS
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
test-readme-macos:
runs-on: macos-14-xlarge
runs-on: macos-14-xlarge
steps:
- name: Checkout code
uses: actions/checkout@v2
Expand All @@ -26,32 +26,85 @@ jobs:
# as this script does not isntall anything into conda env but rather as system dep
pip3 uninstall -y torch || true
set -eou pipefail
echo "::group::Print machine info"
uname -a
sysctl machdep.cpu.brand_string
sysctl machdep.cpu.core_count
echo "::endgroup::"
# echo "::group::Install newer objcopy that supports --set-section-alignment"
# yum install -y devtoolset-10-binutils
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Create script"
python3 scripts/updown.py --file README.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./we-run-this.sh
# for good measure, if something happened to updown processor,
echo "::group::Create script to run README"
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
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./we-run-this.sh
echo "exit 1" >> ./run-readme.sh
echo "::endgroup::"

echo "::group::Run This"
echo "::group::Run README"
echo "*******************************************"
cat ./we-run-this.sh
cat ./run-readme.sh
echo "*******************************************"
bash -x ./we-run-this.sh

bash -x ./run-readme.sh
echo "::endgroup::"

echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"


test-quantization-macos:
runs-on: macos-14-xlarge
steps:
- name: Checkout code
uses: actions/checkout@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10.11'
- name: Setup Xcode
if: runner.os == 'macOS'
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'
- name: Run script
run: |
set -x
# NS: Remove previous installation of torch first
# as this script does not isntall anything into conda env but rather as system dep
pip3 uninstall -y torch || true
set -eou pipefail
echo "::group::Print machine info"
uname -a
sysctl machdep.cpu.brand_string
sysctl machdep.cpu.core_count
echo "::endgroup::"
# echo "::group::Install newer objcopy that supports --set-section-alignment"
# yum install -y devtoolset-10-binutils
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Create script to run quantization"
python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./run-quantization.sh
echo "::endgroup::"

echo "::group::Run quantization"
echo "*******************************************"
cat ./run-quantization.sh
echo "*******************************************"
bash -x ./run-quantization.sh
echo "::endgroup::"

echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"
94 changes: 94 additions & 0 deletions .github/workflows/run-readme-pr-mps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
name: Run the README instructions - with stories - on MPS/MacOS
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
test-readme-mps-macos:
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
with:
runner: macos-m1-stable # neeps MPS, was macos-m1-stable
script: |
conda create -y -n test-readme-mps-macos python=3.10.11
conda activate test-readme-mps-macos
set -x
# NS: Remove previous installation of torch first
# as this script does not isntall anything into conda env but rather as system dep
pip3 uninstall -y torch || true
set -eou pipefail
echo "::group::Print machine info"
uname -a
sysctl machdep.cpu.brand_string
sysctl machdep.cpu.core_count
echo "::endgroup::"
# echo "::group::Install newer objcopy that supports --set-section-alignment"
# yum install -y devtoolset-10-binutils
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Create script to run README"
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
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./run-readme.sh
echo "::endgroup::"

echo "::group::Run README"
echo "*******************************************"
cat ./run-readme.sh
echo "*******************************************"
bash -x ./run-readme.sh
echo "::endgroup::"

echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"

# test-quantization-mps-macos:
# uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
# with:
# runner: macos-m1-stable # neeps MPS, was macos-m1-stable
# script: |
# set -x
# conda create -y -n test-quantization-mps-macos python=3.10.11
# conda activate test-quantization-mps-macos
# # NS: Remove previous installation of torch first
# # as this script does not isntall anything into conda env but rather as system dep
# pip3 uninstall -y torch || true
# set -eou pipefail
#
# echo "::group::Print machine info"
# uname -a
# sysctl machdep.cpu.brand_string
# sysctl machdep.cpu.core_count
# echo "::endgroup::"
#
# # echo "::group::Install newer objcopy that supports --set-section-alignment"
# # yum install -y devtoolset-10-binutils
# # export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# # echo "::endgroup::"
#
# echo "::group::Create script to run quantization"
# python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
# # for good measure, if something happened to updown processor,
# # and it did not error out, fail with an exit 1
# echo "exit 1" >> ./run-quantization.sh
# echo "::endgroup::"
#
# echo "::group::Run quantization"
# echo "*******************************************"
# cat ./run-quantization.sh
# echo "*******************************************"
# bash -x ./run-quantization.sh
# echo "::endgroup::"
#
# echo "::group::Completion"
# echo "tests complete"
# echo "*******************************************"
# echo "::endgroup::"
#
54 changes: 46 additions & 8 deletions .github/workflows/run-readme-pr.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run the README instructions - with stories
name: Run the README instructions - with stories

on:
pull_request:
Expand All @@ -9,6 +9,42 @@ on:

jobs:
test-readme-any:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.g5.4xlarge.nvidia.gpu
gpu-arch-type: cuda
gpu-arch-version: "12.1"
timeout: 60
script: |
echo "::group::Print machine info"
uname -a
echo "::endgroup::"
echo "::group::Install newer objcopy that supports --set-section-alignment"
yum install -y devtoolset-10-binutils
export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
echo "::endgroup::"
echo "::group::Create script to run README"
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
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./run-readme.sh
echo "::endgroup::"
echo "::group::Run README"
echo "*******************************************"
cat ./run-readme.sh
echo "*******************************************"
bash -x ./run-readme.sh
echo "::endgroup::"
echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"
test-quantization-any:
uses: pytorch/test-infra/.github/workflows/linux_job.yml@main
with:
runner: linux.g5.4xlarge.nvidia.gpu
Expand All @@ -25,19 +61,21 @@ jobs:
# export PATH=/opt/rh/devtoolset-10/root/usr/bin/:$PATH
# echo "::endgroup::"
echo "::group::Create script"
python3 scripts/updown.py --file README.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./we-run-this.sh
echo "::group::Create script to run quantization"
python3 scripts/updown.py --file docs/quantization.md --replace llama3:stories15M --suppress huggingface-cli,HF_TOKEN > ./run-quantization.sh
# for good measure, if something happened to updown processor,
# and it did not error out, fail with an exit 1
echo "exit 1" >> ./we-run-this.sh
echo "exit 1" >> ./run-quantization.sh
echo "::endgroup::"
echo "::group::Run This"
echo "::group::Run quantization"
echo "*******************************************"
cat ./we-run-this.sh
cat ./run-quantization.sh
echo "*******************************************"
bash -x ./we-run-this.sh
bash -x ./run-quantization.sh
echo "::endgroup::"
echo "::group::Completion"
echo "tests complete"
echo "*******************************************"
echo "::endgroup::"
2 changes: 1 addition & 1 deletion .pins/et-pin.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
b9488fe9d41fe5190641f323f3f6a5295e86256c
fff20a738c5bb5c1cb259468b0a8aa6c6be8cd38
Loading

0 comments on commit b96f938

Please sign in to comment.