From 8fe6e37bb90b8c685deb85465b867780a4fc00dd Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:32:31 -0800 Subject: [PATCH 1/4] Add evaluation, multimodal, native tests to run-readme-pr-macos.yml Add evaluation, multimodal, native tests to run-readme-pr-macos.yml --- .github/workflows/run-readme-pr-macos.yml | 103 ++++++++++++++++++++++ 1 file changed, 103 insertions(+) diff --git a/.github/workflows/run-readme-pr-macos.yml b/.github/workflows/run-readme-pr-macos.yml index 64afe2247..b3bdb9440 100644 --- a/.github/workflows/run-readme-pr-macos.yml +++ b/.github/workflows/run-readme-pr-macos.yml @@ -143,3 +143,106 @@ jobs: echo "tests complete" echo "*******************************************" echo "::endgroup::" + + test-advanced-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::" + + .ci/scripts/run-docs evaluation + + echo "::group::Completion" + echo "tests complete" + echo "*******************************************" + echo "::endgroup::" + + test-multimodal-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::" + + .ci/scripts/run-docs multimodal + + echo "::group::Completion" + echo "tests complete" + echo "*******************************************" + echo "::endgroup::" + + test-native-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::" + + .ci/scripts/run-docs native + + echo "::group::Completion" + echo "tests complete" + echo "*******************************************" + echo "::endgroup::" + From 4c7dcbf52aacab0fc4c9ee1f6c232e7425fdd872 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:36:54 -0800 Subject: [PATCH 2/4] Update run-readme-pr-mps.yml --- .github/workflows/run-readme-pr-mps.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-readme-pr-mps.yml b/.github/workflows/run-readme-pr-mps.yml index 3e90265f5..70c820764 100644 --- a/.github/workflows/run-readme-pr-mps.yml +++ b/.github/workflows/run-readme-pr-mps.yml @@ -10,7 +10,7 @@ jobs: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: runner: macos-m1-14 - timeout-minutes: 50 + timeout: 50 script: | conda create -y -n test-readme-mps-macos python=3.10.11 llvm-openmp conda activate test-readme-mps-macos From d98c138794eb2b0ff81f3687dd3a0901e3fb4c49 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Sat, 28 Dec 2024 23:19:09 -0800 Subject: [PATCH 3/4] Update build_native.sh Update to C++11 ABI for AOTI, similar to ET --- torchchat/utils/scripts/build_native.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchchat/utils/scripts/build_native.sh b/torchchat/utils/scripts/build_native.sh index 3c2c1c846..a935fa74c 100755 --- a/torchchat/utils/scripts/build_native.sh +++ b/torchchat/utils/scripts/build_native.sh @@ -93,7 +93,7 @@ popd if [[ "$TARGET" == "et" ]]; then cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DLINK_TORCHAO_OPS="${LINK_TORCHAO_OPS}" -DET_USE_ADAPTIVE_THREADS=ON -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" -G Ninja else - cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DLINK_TORCHAO_OPS="${LINK_TORCHAO_OPS}" -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" -G Ninja + cmake -S . -B ./cmake-out -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DLINK_TORCHAO_OPS="${LINK_TORCHAO_OPS}" -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=1" -G Ninja fi cmake --build ./cmake-out --target "${TARGET}"_run From 2382d2aa93c19314720a68955f6dd7332af7d6a1 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Fri, 17 Jan 2025 21:41:32 -0800 Subject: [PATCH 4/4] Update run-readme-pr-macos.yml fix typo --- .github/workflows/run-readme-pr-macos.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-readme-pr-macos.yml b/.github/workflows/run-readme-pr-macos.yml index b3bdb9440..c6f3d99f6 100644 --- a/.github/workflows/run-readme-pr-macos.yml +++ b/.github/workflows/run-readme-pr-macos.yml @@ -144,7 +144,7 @@ jobs: echo "*******************************************" echo "::endgroup::" - test-advanced-macos: + test-eval-macos: runs-on: macos-14-xlarge steps: - name: Checkout code