Skip to content

Commit 741f9a2

Browse files
committed
Debugging
1 parent 231d0c0 commit 741f9a2

File tree

6 files changed

+144
-145
lines changed

6 files changed

+144
-145
lines changed

.ci/scripts/setup-qnn-deps.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ set -ex
1010
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
1111

1212
setup_libcpp 12
13+
setup_android_ndk
1314
install_qnn

.ci/scripts/test_backend_linux.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ if [[ "$FLOW" == *qnn* ]]; then
2929
# Setup QNN sdk and deps - note that this is a bit hacky due to the nature of the
3030
# Qualcomm build. TODO (gjcomer) Clean this up once the QNN pybinding integration is
3131
# cleaned up.
32-
echo "---------------wk----------"
3332
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool cmake
3433
PYTHON_EXECUTABLE=python source .ci/scripts/build-qnn-sdk.sh
3534
QNN_X86_LIB_DIR=`realpath build-x86/lib/`

.ci/scripts/test_qnn_static_llama.sh

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/qnn_confi
1414
# Download QNN_SDK. If already downloaded, export environment path
1515
source "$(dirname "${BASH_SOURCE[0]}")/../../backends/qualcomm/scripts/install_qnn_sdk.sh"
1616

17-
export QNN_SDK_ROOT="/tmp/qnn/2.37.0.250724"
1817
export EXECUTORCH_ROOT="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." && pwd)"
1918
export LD_LIBRARY_PATH="${QNN_SDK_ROOT}/lib/x86_64-linux-clang"
2019
export PYTHONPATH=".."

.github/workflows/pull.yml

Lines changed: 50 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -82,58 +82,58 @@ jobs:
8282
# Build and test ExecuTorch
8383
PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
8484
85-
# test-models-linux:
86-
# name: test-models-linux
87-
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
88-
# permissions:
89-
# id-token: write
90-
# contents: read
91-
# strategy:
92-
# matrix:
93-
# model: [linear, add, add_mul, ic3, mv2, resnet18, resnet50, mobilebert, emformer_transcribe]
94-
# backend: [portable, xnnpack-quantization-delegation]
95-
# runner: [linux.2xlarge]
96-
# include:
97-
# - model: ic4
98-
# backend: portable
99-
# runner: linux.4xlarge.memory
100-
# - model: ic4
101-
# backend: xnnpack-quantization-delegation
102-
# runner: linux.4xlarge.memory
103-
# - model: emformer_join
104-
# backend: portable
105-
# runner: linux.4xlarge.memory
106-
# - model: emformer_join
107-
# backend: xnnpack-quantization-delegation
108-
# runner: linux.4xlarge.memory
109-
# - model: phi_4_mini
110-
# backend: portable
111-
# runner: linux.4xlarge.memory
112-
# - model: llama3_2_vision_encoder
113-
# backend: portable
114-
# runner: linux.4xlarge.memory
115-
# - model: w2l
116-
# backend: portable
117-
# runner: linux.4xlarge.memory
118-
# fail-fast: false
119-
# with:
120-
# runner: ${{ matrix.runner }}
121-
# docker-image: ci-image:executorch-ubuntu-22.04-clang12
122-
# submodules: 'recursive'
123-
# ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
124-
# timeout: 90
125-
# script: |
126-
# # The generic Linux job chooses to use base env, not the one setup by the image
127-
# CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
128-
# conda activate "${CONDA_ENV}"
85+
test-models-linux:
86+
name: test-models-linux
87+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
88+
permissions:
89+
id-token: write
90+
contents: read
91+
strategy:
92+
matrix:
93+
model: [linear, add, add_mul, ic3, mv2, resnet18, resnet50, mobilebert, emformer_transcribe]
94+
backend: [portable, xnnpack-quantization-delegation]
95+
runner: [linux.2xlarge]
96+
include:
97+
- model: ic4
98+
backend: portable
99+
runner: linux.4xlarge.memory
100+
- model: ic4
101+
backend: xnnpack-quantization-delegation
102+
runner: linux.4xlarge.memory
103+
- model: emformer_join
104+
backend: portable
105+
runner: linux.4xlarge.memory
106+
- model: emformer_join
107+
backend: xnnpack-quantization-delegation
108+
runner: linux.4xlarge.memory
109+
- model: phi_4_mini
110+
backend: portable
111+
runner: linux.4xlarge.memory
112+
- model: llama3_2_vision_encoder
113+
backend: portable
114+
runner: linux.4xlarge.memory
115+
- model: w2l
116+
backend: portable
117+
runner: linux.4xlarge.memory
118+
fail-fast: false
119+
with:
120+
runner: ${{ matrix.runner }}
121+
docker-image: ci-image:executorch-ubuntu-22.04-clang12
122+
submodules: 'recursive'
123+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
124+
timeout: 90
125+
script: |
126+
# The generic Linux job chooses to use base env, not the one setup by the image
127+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
128+
conda activate "${CONDA_ENV}"
129129
130-
# MODEL_NAME=${{ matrix.model }}
131-
# BUILD_TOOL=cmake
132-
# BACKEND=${{ matrix.backend }}
130+
MODEL_NAME=${{ matrix.model }}
131+
BUILD_TOOL=cmake
132+
BACKEND=${{ matrix.backend }}
133133
134-
# PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "${BUILD_TOOL}"
135-
# # Build and test ExecuTorch
136-
# PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
134+
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh --build-tool "${BUILD_TOOL}"
135+
# Build and test ExecuTorch
136+
PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
137137
138138
test-llama-runner-linux:
139139
# Test Both linux x86 and linux aarch64

.github/workflows/trunk.yml

Lines changed: 92 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -273,47 +273,47 @@ jobs:
273273
# Test selective build
274274
PYTHON_EXECUTABLE=python bash examples/portable/scripts/test_demo_backend_delegation.sh "${BUILD_TOOL}"
275275
276-
# test-arm-backend:
277-
# name: test-arm-backend
278-
# uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
279-
# permissions:
280-
# id-token: write
281-
# contents: read
282-
# strategy:
283-
# matrix:
284-
# include:
285-
# - test_arm_baremetal: test_pytest_ops_ethosu_fvp
286-
# - test_arm_baremetal: test_pytest_models_ethosu_fvp
287-
# - test_arm_baremetal: test_run_ethosu_fvp
288-
# - test_arm_baremetal: test_models_tosa
289-
# - test_arm_baremetal: test_models_ethos-u55
290-
# - test_arm_baremetal: test_models_ethos-u85
291-
# - test_arm_baremetal: test_smaller_stories_llama
292-
# fail-fast: false
293-
# with:
294-
# runner: linux.2xlarge.memory
295-
# docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
296-
# submodules: 'recursive'
297-
# ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
298-
# timeout: 120
299-
# script: |
300-
# # The generic Linux job chooses to use base env, not the one setup by the image
301-
# CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
302-
# conda activate "${CONDA_ENV}"
276+
test-arm-backend:
277+
name: test-arm-backend
278+
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
279+
permissions:
280+
id-token: write
281+
contents: read
282+
strategy:
283+
matrix:
284+
include:
285+
- test_arm_baremetal: test_pytest_ops_ethosu_fvp
286+
- test_arm_baremetal: test_pytest_models_ethosu_fvp
287+
- test_arm_baremetal: test_run_ethosu_fvp
288+
- test_arm_baremetal: test_models_tosa
289+
- test_arm_baremetal: test_models_ethos-u55
290+
- test_arm_baremetal: test_models_ethos-u85
291+
- test_arm_baremetal: test_smaller_stories_llama
292+
fail-fast: false
293+
with:
294+
runner: linux.2xlarge.memory
295+
docker-image: ci-image:executorch-ubuntu-22.04-arm-sdk
296+
submodules: 'recursive'
297+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
298+
timeout: 120
299+
script: |
300+
# The generic Linux job chooses to use base env, not the one setup by the image
301+
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
302+
conda activate "${CONDA_ENV}"
303303
304-
# source .ci/scripts/utils.sh
305-
# install_executorch "--use-pt-pinned-commit"
304+
source .ci/scripts/utils.sh
305+
install_executorch "--use-pt-pinned-commit"
306306
307-
# .ci/scripts/setup-arm-baremetal-tools.sh
307+
.ci/scripts/setup-arm-baremetal-tools.sh
308308
309-
# # Increase number of files user can monitor to bypass buck failures.
310-
# # Hopefully this is high enough for this setup.
311-
# sudo sysctl fs.inotify.max_user_watches=1048576 # 1024 * 1024
309+
# Increase number of files user can monitor to bypass buck failures.
310+
# Hopefully this is high enough for this setup.
311+
sudo sysctl fs.inotify.max_user_watches=1048576 # 1024 * 1024
312312
313-
# ARM_TEST=${{ matrix.test_arm_baremetal }}
313+
ARM_TEST=${{ matrix.test_arm_baremetal }}
314314
315-
# # Test test_arm_baremetal.sh with test
316-
# backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
315+
# Test test_arm_baremetal.sh with test
316+
backends/arm/test/test_arm_baremetal.sh "${ARM_TEST}"
317317
318318
test-arm-cortex-m-size-test:
319319
name: test-arm-cortex-m-size-test
@@ -666,71 +666,71 @@ jobs:
666666
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
667667
PYTHON_EXECUTABLE=python bash .ci/scripts/test_model.sh ${{ matrix.model }} "cmake" "qnn"
668668
669-
# test-models-macos-coreml:
670-
# name: test-models-macos-coreml
671-
# uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
672-
# strategy:
673-
# matrix:
674-
# model: [dl3, edsr, efficient_sam, emformer_join, emformer_transcribe, ic3, ic4, mobilebert, mv2, mv3, resnet50, vit, w2l]
675-
# fail-fast: false
676-
# with:
677-
# runner: macos-m1-stable
678-
# python-version: '3.11'
679-
# submodules: 'recursive'
680-
# ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
681-
# timeout: 90
682-
# script: |
683-
# MODEL_NAME=${{ matrix.model }}
684-
# BUILD_TOOL=cmake
685-
# BACKEND="coreml-pybind"
669+
test-models-macos-coreml:
670+
name: test-models-macos-coreml
671+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
672+
strategy:
673+
matrix:
674+
model: [dl3, edsr, efficient_sam, emformer_join, emformer_transcribe, ic3, ic4, mobilebert, mv2, mv3, resnet50, vit, w2l]
675+
fail-fast: false
676+
with:
677+
runner: macos-m1-stable
678+
python-version: '3.11'
679+
submodules: 'recursive'
680+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
681+
timeout: 90
682+
script: |
683+
MODEL_NAME=${{ matrix.model }}
684+
BUILD_TOOL=cmake
685+
BACKEND="coreml-pybind"
686686
687687
688-
# # Set model specific overrides
689-
# if [[ "${MODEL_NAME}" == "mobilebert" ]]; then
690-
# # See https://github.com/pytorch/executorch/issues/12907
691-
# # mobilebert has nan output on FP16, and high MSE on fp32, so we disable runtime test now
692-
# BACKEND="coreml"
693-
# fi
688+
# Set model specific overrides
689+
if [[ "${MODEL_NAME}" == "mobilebert" ]]; then
690+
# See https://github.com/pytorch/executorch/issues/12907
691+
# mobilebert has nan output on FP16, and high MSE on fp32, so we disable runtime test now
692+
BACKEND="coreml"
693+
fi
694694
695-
# if [[ "${MODEL_NAME}" == "efficient_sam" ]]; then
696-
# # See https://github.com/pytorch/executorch/issues/12906
697-
# # efficient_sam fails to run on CoreML
698-
# BACKEND="coreml"
699-
# fi
695+
if [[ "${MODEL_NAME}" == "efficient_sam" ]]; then
696+
# See https://github.com/pytorch/executorch/issues/12906
697+
# efficient_sam fails to run on CoreML
698+
BACKEND="coreml"
699+
fi
700700
701-
# bash .ci/scripts/setup-conda.sh
701+
bash .ci/scripts/setup-conda.sh
702702
703-
# # Setup MacOS dependencies as there is no Docker support on MacOS atm
704-
# PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
705-
# PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/coreml/scripts/install_requirements.sh
706-
# echo "Finishing installing coreml."
703+
# Setup MacOS dependencies as there is no Docker support on MacOS atm
704+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
705+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash backends/apple/coreml/scripts/install_requirements.sh
706+
echo "Finishing installing coreml."
707707
708-
# PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
708+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "${BACKEND}"
709709
710-
# test-models-macos-mps:
711-
# name: test-models-macos-mps
712-
# uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
713-
# strategy:
714-
# fail-fast: false
715-
# with:
716-
# runner: macos-m1-stable
717-
# python-version: '3.11'
718-
# submodules: 'recursive'
719-
# ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
720-
# timeout: 90
721-
# script: |
722-
# BUILD_TOOL=cmake
723-
# bash .ci/scripts/setup-conda.sh
710+
test-models-macos-mps:
711+
name: test-models-macos-mps
712+
uses: pytorch/test-infra/.github/workflows/macos_job.yml@main
713+
strategy:
714+
fail-fast: false
715+
with:
716+
runner: macos-m1-stable
717+
python-version: '3.11'
718+
submodules: 'recursive'
719+
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
720+
timeout: 90
721+
script: |
722+
BUILD_TOOL=cmake
723+
bash .ci/scripts/setup-conda.sh
724724
725-
# # Setup MacOS dependencies as there is no Docker support on MacOS atm
726-
# PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
725+
# Setup MacOS dependencies as there is no Docker support on MacOS atm
726+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/setup-macos.sh --build-tool "${BUILD_TOOL}"
727727
728-
# # Build and test mps model
729-
# for MODEL_NAME in mv3 ic4 resnet50 edsr mobilebert w2l; do
730-
# echo "::group::Exporting mps model: $MODEL_NAME"
731-
# PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "mps"
732-
# echo "::endgroup::"
733-
# done
728+
# Build and test mps model
729+
for MODEL_NAME in mv3 ic4 resnet50 edsr mobilebert w2l; do
730+
echo "::group::Exporting mps model: $MODEL_NAME"
731+
PYTHON_EXECUTABLE=python ${CONDA_RUN} bash .ci/scripts/test_model.sh "${MODEL_NAME}" "${BUILD_TOOL}" "mps"
732+
echo "::endgroup::"
733+
done
734734
735735
test-huggingface-transformers-xnnpack:
736736
# NB: Don't run this on fork PRs because they won't have access to the secret and would fail anyway

backends/qualcomm/scripts/install_qnn_sdk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,4 +152,4 @@ setup_libcpp() {
152152
export LIBRARY_PATH="${INSTALL_DIR}/lib:${LIBRARY_PATH:-}"
153153

154154
echo "libc++ installed to ${INSTALL_DIR}"
155-
}
155+
}

0 commit comments

Comments
 (0)