From b91de741ddb73abf2332af419216ad5f2e0e7c43 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:35:34 -0800 Subject: [PATCH 1/5] Add evaluation, multimodal, native tests to run-readme-pr-mps.yml Add evaluation, multimodal, native tests to run-readme-pr-mps.yml --- .github/workflows/run-readme-pr-mps.yml | 81 +++++++++++++++++++++++++ 1 file changed, 81 insertions(+) diff --git a/.github/workflows/run-readme-pr-mps.yml b/.github/workflows/run-readme-pr-mps.yml index 3e90265f5..e9eede09b 100644 --- a/.github/workflows/run-readme-pr-mps.yml +++ b/.github/workflows/run-readme-pr-mps.yml @@ -113,3 +113,84 @@ jobs: echo "tests complete" echo "*******************************************" echo "::endgroup::" + + test-evaluation-mps-macos: + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + with: + runner: macos-m1-14 # neeps MPS, was macos-m1-stable + script: | + set -x + conda create -y -n test-evaluation-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 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-mps-macos: + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + with: + runner: macos-m1-14 # neeps MPS, was macos-m1-stable + script: | + set -x + conda create -y -n test-multimodal-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 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-mps-macos: + uses: pytorch/test-infra/.github/workflows/macos_job.yml@main + with: + runner: macos-m1-14 # neeps MPS, was macos-m1-stable + script: | + set -x + conda create -y -n test-native-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 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 50023311a352e3b0ee7b0a50795036494eea745f Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:37:42 -0800 Subject: [PATCH 2/5] Update run-readme-pr-mps.yml Typos --- .github/workflows/run-readme-pr-mps.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/run-readme-pr-mps.yml b/.github/workflows/run-readme-pr-mps.yml index e9eede09b..3897e194c 100644 --- a/.github/workflows/run-readme-pr-mps.yml +++ b/.github/workflows/run-readme-pr-mps.yml @@ -63,7 +63,7 @@ jobs: test-gguf-mps-macos: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - runner: macos-m1-14 # neeps MPS, was macos-m1-stable + runner: macos-m1-14 # needs MPS, was macos-m1-stable script: | set -x conda create -y -n test-quantization-mps-macos python=3.10.11 @@ -90,7 +90,7 @@ jobs: test-advanced-mps-macos: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - runner: macos-m1-14 # neeps MPS, was macos-m1-stable + runner: macos-m1-14 # needs MPS, was macos-m1-stable script: | set -x conda create -y -n test-quantization-mps-macos python=3.10.11 @@ -117,11 +117,11 @@ jobs: test-evaluation-mps-macos: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - runner: macos-m1-14 # neeps MPS, was macos-m1-stable + runner: macos-m1-14 # needs MPS, was macos-m1-stable script: | set -x conda create -y -n test-evaluation-mps-macos python=3.10.11 - conda activate test-quantization-mps-macos + conda activate test-evaluation-mps-macos # NS: Remove previous installation of torch first # as this script does not isntall anything into conda env # but rather system dep @@ -144,11 +144,11 @@ jobs: test-multimodal-mps-macos: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - runner: macos-m1-14 # neeps MPS, was macos-m1-stable + runner: macos-m1-14 # needs MPS, was macos-m1-stable script: | set -x conda create -y -n test-multimodal-mps-macos python=3.10.11 - conda activate test-quantization-mps-macos + conda activate test-multimodal-mps-macos # NS: Remove previous installation of torch first # as this script does not isntall anything into conda env # but rather system dep @@ -171,11 +171,11 @@ jobs: test-native-mps-macos: uses: pytorch/test-infra/.github/workflows/macos_job.yml@main with: - runner: macos-m1-14 # neeps MPS, was macos-m1-stable + runner: macos-m1-14 # needs MPS, was macos-m1-stable script: | set -x conda create -y -n test-native-mps-macos python=3.10.11 - conda activate test-quantization-mps-macos + conda activate test-native-mps-macos # NS: Remove previous installation of torch first # as this script does not isntall anything into conda env # but rather system dep From cb4d62a2bfec1a1d87a87cdb8df7011f3e60a897 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Tue, 10 Dec 2024 18:38:20 -0800 Subject: [PATCH 3/5] 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 3897e194c..97f44c660 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 7fc05c9bb90c0e35732078ee8932e292b8d1bdd1 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Tue, 10 Dec 2024 19:45:06 -0800 Subject: [PATCH 4/5] Update run-readme-pr-mps.yml Extend timeout for test-readme-mps to avoid test failing from timeout. --- .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 97f44c660..ac7e3b6e4 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: 50 + timeout: 120 script: | conda create -y -n test-readme-mps-macos python=3.10.11 llvm-openmp conda activate test-readme-mps-macos From 7fa57827df8bc270c9bfee365a6a47b713176e52 Mon Sep 17 00:00:00 2001 From: Michael Gschwind <61328285+mikekgfb@users.noreply.github.com> Date: Sat, 28 Dec 2024 23:18:03 -0800 Subject: [PATCH 5/5] 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