Skip to content

Commit b57b2be

Browse files
authored
Bump PT 2025131 and ET pins 20250209 (#1493)
* Bump PT 2025131 and ET pins 20250209 * Update install instructions for et * Split up torchao test * Test installing libomp * Gate omp install
1 parent fd04123 commit b57b2be

File tree

5 files changed

+62
-16
lines changed

5 files changed

+62
-16
lines changed

Diff for: .github/workflows/pull.yml

+53-10
Original file line numberDiff line numberDiff line change
@@ -1055,7 +1055,59 @@ jobs:
10551055
./runner/build_android.sh
10561056
echo "Tests complete."
10571057
1058-
test-torchao-experimental:
1058+
test-torchao-aoti-experimental:
1059+
strategy:
1060+
matrix:
1061+
runner: [macos-14-xlarge]
1062+
runs-on: ${{matrix.runner}}
1063+
steps:
1064+
- name: Checkout repo
1065+
uses: actions/checkout@v3
1066+
with:
1067+
submodules: true
1068+
- name: Setup Python
1069+
uses: actions/setup-python@v2
1070+
with:
1071+
python-version: 3.10.11
1072+
- name: Setup Xcode
1073+
if: runner.os == 'macOS'
1074+
uses: maxim-lobanov/setup-xcode@v1
1075+
with:
1076+
xcode-version: '15.3'
1077+
- name: Print machine info
1078+
run: |
1079+
uname -a
1080+
if [ $(uname -s) == Darwin ]; then
1081+
sysctl machdep.cpu.brand_string
1082+
sysctl machdep.cpu.core_count
1083+
fi
1084+
- name: Install torchchat
1085+
run: |
1086+
echo "Intalling pip3 packages"
1087+
./install/install_requirements.sh
1088+
pip3 list
1089+
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
1090+
- name: Install torchao-ops
1091+
id: install-torchao-ops
1092+
run: |
1093+
bash torchchat/utils/scripts/build_torchao_ops.sh
1094+
- name: Install runner AOTI
1095+
id: install-runner-aoti
1096+
run: |
1097+
bash torchchat/utils/scripts/build_native.sh aoti link_torchao_ops
1098+
- name: Run inference
1099+
run: |
1100+
python torchchat.py download stories110M
1101+
wget -O ./tokenizer.model https://github.com/karpathy/llama2.c/raw/master/tokenizer.model
1102+
export PRMT="Once upon a time in a land far away"
1103+
echo "Export and run AOTI (C++ runner)"
1104+
python torchchat.py export stories110M --output-aoti-package-path ./model.pt2 --dtype float32 --quantize '{"embedding:wx": {"bitwidth": 2, "groupsize": 32}, "linear:a8wxdq": {"bitwidth": 3, "groupsize": 128, "has_weight_zeros": false}}'
1105+
./cmake-out/aoti_run ./model.pt2 -z ./tokenizer.model -t 0 -i "${PRMT}"
1106+
echo "Generate AOTI"
1107+
python torchchat.py generate stories110M --aoti-package-path ./model.pt2 --prompt "${PRMT}"
1108+
echo "Tests complete."
1109+
1110+
test-torchao-et-experimental:
10591111
strategy:
10601112
matrix:
10611113
runner: [macos-14-xlarge]
@@ -1100,10 +1152,6 @@ jobs:
11001152
run: |
11011153
echo "Installing runner"
11021154
bash torchchat/utils/scripts/build_native.sh et link_torchao_ops
1103-
- name: Install runner AOTI
1104-
id: install-runner-aoti
1105-
run: |
1106-
bash torchchat/utils/scripts/build_native.sh aoti link_torchao_ops
11071155
- name: Run inference
11081156
run: |
11091157
python torchchat.py download stories110M
@@ -1116,11 +1164,6 @@ jobs:
11161164
echo "Export and run ET (C++ runner)"
11171165
python torchchat.py export stories110M --output-pte-path ./model.pte --dtype float32 --quantize '{"embedding:wx": {"bitwidth": 2, "groupsize": 32}, "linear:a8wxdq": {"bitwidth": 3, "groupsize": 128, "has_weight_zeros": false}}'
11181166
./cmake-out/et_run ./model.pte -z ./tokenizer.model -t 0 -i "${PRMT}"
1119-
echo "Export and run AOTI (C++ runner)"
1120-
python torchchat.py export stories110M --output-aoti-package-path ./model.pt2 --dtype float32 --quantize '{"embedding:wx": {"bitwidth": 2, "groupsize": 32}, "linear:a8wxdq": {"bitwidth": 3, "groupsize": 128, "has_weight_zeros": false}}'
1121-
./cmake-out/aoti_run ./model.pt2 -z ./tokenizer.model -t 0 -i "${PRMT}"
1122-
echo "Generate AOTI"
1123-
python torchchat.py generate stories110M --aoti-package-path ./model.pt2 --prompt "${PRMT}"
11241167
echo "Tests complete."
11251168
11261169
test-torchao-experimental-mps:

Diff for: install/.pins/et-pin.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
9c043290ad3944268290e015c3063bc411e6ef6b
1+
791472d6706b027552f39f11b28d034e4839c9af

Diff for: install/install_requirements.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,13 @@ echo "Using pip executable: $PIP_EXECUTABLE"
5151
# NOTE: If a newly-fetched version of the executorch repo changes the value of
5252
# PYTORCH_NIGHTLY_VERSION, you should re-run this script to install the necessary
5353
# package versions.
54-
PYTORCH_NIGHTLY_VERSION=dev20250124
54+
PYTORCH_NIGHTLY_VERSION=dev20250131
5555

5656
# Nightly version for torchvision
57-
VISION_NIGHTLY_VERSION=dev20250124
57+
VISION_NIGHTLY_VERSION=dev20250131
5858

5959
# Nightly version for torchtune
60-
TUNE_NIGHTLY_VERSION=dev20250124
60+
TUNE_NIGHTLY_VERSION=dev20250131
6161

6262
# The pip repository that hosts nightly torch packages. cpu by default.
6363
# If cuda is available, based on presence of nvidia-smi, install the pytorch nightly

Diff for: torchchat/utils/scripts/build_native.sh

+3
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,9 @@ if [[ "$TARGET" == "et" ]]; then
8686
EXECUTORCH_LIBRARIES="${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libexecutorch_no_prim_ops.a;${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libextension_threadpool.a;${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libcpuinfo.a;${TORCHCHAT_ROOT}/${ET_BUILD_DIR}/install/lib/libpthreadpool.a"
8787
install_torchao_executorch_ops
8888
fi
89+
elif [[ "$LINK_TORCHAO_OPS" == "ON" ]]; then
90+
# Install OMP when using AOTI with linked torchao ops
91+
brew install libomp
8992
fi
9093
popd
9194

Diff for: torchchat/utils/scripts/install_utils.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,10 @@ install_executorch_python_libs() {
8888
echo "Building and installing python libraries"
8989
if [ "${ENABLE_ET_PYBIND}" = false ]; then
9090
echo "Not installing pybind"
91-
bash ./install_requirements.sh --pybind off
91+
bash ./install_executorch.sh --pybind off
9292
else
9393
echo "Installing pybind"
94-
bash ./install_requirements.sh --pybind xnnpack
94+
bash ./install_executorch.sh --pybind xnnpack
9595
fi
9696

9797
# TODO: figure out the root cause of 'AttributeError: module 'evaluate'

0 commit comments

Comments
 (0)