Skip to content

Commit d79f870

Browse files
committed
up
1 parent d2cc25a commit d79f870

File tree

5 files changed

+21
-8
lines changed

5 files changed

+21
-8
lines changed

.github/workflows/pull.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1154,10 +1154,10 @@ jobs:
11541154
./install/install_requirements.sh
11551155
pip3 list
11561156
python3 -c 'import torch;print(f"torch: {torch.__version__, torch.version.git_version}")'
1157-
- name: Install torchao-ops
1158-
id: install-torchao-ops
1157+
- name: Clone torchao
1158+
id: clone-torchao
11591159
run: |
1160-
bash torchchat/utils/scripts/build_torchao_ops.sh
1160+
bash torchchat/utils/scripts/clone_torchao.sh
11611161
- name: Install runner
11621162
run: |
11631163
echo "Installing runner"
@@ -1209,10 +1209,10 @@ jobs:
12091209
echo "Installing ExecuTorch"
12101210
export TORCHCHAT_ROOT=${PWD}
12111211
bash torchchat/utils/scripts/install_et.sh
1212-
- name: Install torchao-ops
1213-
id: install-torchao-ops
1212+
- name: Clone torchao
1213+
id: clone-torchao
12141214
run: |
1215-
bash torchchat/utils/scripts/build_torchao_ops.sh
1215+
bash torchchat/utils/scripts/clone_torchao.sh
12161216
- name: Install runner
12171217
run: |
12181218
echo "Installing runner"
@@ -1256,6 +1256,7 @@ jobs:
12561256
- name: Install torchao-ops-mps
12571257
id: install-torchao-ops-mps
12581258
run: |
1259+
bash torchchat/utils/scripts/clone_torchao.sh
12591260
bash torchchat/utils/scripts/build_torchao_ops.sh mps
12601261
- name: Run inference
12611262
run: |

torchchat/utils/scripts/build_native.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ if [[ "$TARGET" == "et" ]]; then
8888
elif [[ "$LINK_TORCHAO_OPS" == "ON" ]]; then
8989
# Install OMP when using AOTI with linked torchao ops
9090
brew install libomp
91+
install_torchao_aten_ops cpu
9192
fi
9293
popd
9394

torchchat/utils/scripts/build_torchao_ops.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,5 @@ source "$(dirname "${BASH_SOURCE[0]}")/install_utils.sh"
1616

1717
pushd ${TORCHCHAT_ROOT}
1818
find_cmake_prefix_path
19-
clone_torchao
2019
install_torchao_aten_ops "$device"
2120
popd
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#!/bin/bash
2+
# Copyright (c) Meta Platforms, Inc. and affiliates.
3+
# All rights reserved.
4+
#
5+
# This source code is licensed under the BSD-style license found in the
6+
# LICENSE file in the root directory of this source tree.
7+
8+
source "$(dirname "${BASH_SOURCE[0]}")/install_utils.sh"
9+
10+
pushd ${TORCHCHAT_ROOT}
11+
clone_torchao
12+
popd

torchchat/utils/scripts/install_utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ install_torchao_aten_ops() {
204204
-DCMAKE_INSTALL_PREFIX=${CMAKE_OUT_DIR} \
205205
-DTORCHAO_BUILD_CPU_AARCH64=ON \
206206
-DTORCHAO_PARALLEL_BACKEND=OPENMP \
207-
-DOpenMP_ROOT="/opt/homebrew/opt/libomp" \
207+
-DOpenMP_ROOT="$(brew --prefix)/opt/libomp" \
208208
-DCMAKE_BUILD_TYPE="Release" \
209209
-S . \
210210
-B ${CMAKE_OUT_DIR} -G Ninja

0 commit comments

Comments
 (0)