Skip to content

Commit 1c2d63b

Browse files
committed
Update base for Update on "Add preprocess to ci"
1. Run `test_preprocess.py` in ci. 2. Refactor `test_preprocess.py` by creating the model artifacts (eager, exported, et) once and re-use them on different inputs (previously, create model artifacts for each test). Test Plan: ``` pytest -c /dev/null -v -n auto examples/models/llama3_2_vision/preprocess/ ``` [ghstack-poisoned]
2 parents dbddd11 + 0691ae1 commit 1c2d63b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+809
-241
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
bd5482c7c3e1197e10c46ff739027f917d9c1fcc
1+
e47e8794499a4a0130ff4efb8713ff93f4b40c36

.ci/docker/common/install_clang.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ install_ubuntu() {
1313
apt-get install -y --no-install-recommends clang-"$CLANG_VERSION"
1414
apt-get install -y --no-install-recommends llvm-"$CLANG_VERSION"
1515
# Also require LLD linker from llvm and libomp to build PyTorch from source
16-
apt-get install -y lld "libomp-${CLANG_VERSION}-dev"
16+
apt-get install -y lld "libomp-${CLANG_VERSION}-dev" "libc++-${CLANG_VERSION}-dev"
1717

1818
# Use update-alternatives to make this version the default
1919
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-"$CLANG_VERSION" 50

.ci/docker/requirements-ci.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
mpmath==1.3.0
2-
numpy==1.22.0; python_version == '3.10'
2+
numpy==1.21.3; python_version == '3.10'
33
numpy==1.23.2; python_version == '3.11'
44
numpy; python_version >= '3.12'
55
PyYAML==6.0.1

.ci/scripts/setup-linux.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ else
1919
fi
2020

2121
# As Linux job is running inside a Docker container, all of its dependencies
22-
# have already been installed
23-
install_executorch
22+
# have already been installed, so we use PyTorch build from source here instead
23+
# of nightly. This allows CI to test against latest commits from PyTorch
24+
install_executorch "use-pt-pinned-commit"
2425
build_executorch_runner "${BUILD_TOOL}"

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ install_qnn() {
3131
}
3232

3333
setup_libc++() {
34+
clang_version=$1
3435
sudo apt-get update
35-
pkgs_to_check=('libc++-dev')
36+
pkgs_to_check=("libc++-${clang_version}-dev")
3637
j=0
3738
while [ $j -lt ${#pkgs_to_check[*]} ]; do
3839
install_status=$(verify_pkg_installed ${pkgs_to_check[$j]})
@@ -47,5 +48,6 @@ setup_libc++() {
4748
done
4849
}
4950

50-
setup_libc++
51+
# This needs to match with the clang version from the Docker image
52+
setup_libc++ 12
5153
install_qnn

.ci/scripts/utils.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ install_executorch() {
2020
which pip
2121
# Install executorch, this assumes that Executorch is checked out in the
2222
# current directory.
23-
# TODO(T199538337): clean up install scripts to use install_requirements.sh
24-
./install_requirements.sh --pybind xnnpack
23+
if [[ "${1:-}" == "use-pt-pinned-commit" ]]; then
24+
./install_requirements.sh --pybind xnnpack --use-pt-pinned-commit
25+
else
26+
./install_requirements.sh --pybind xnnpack
27+
fi
2528
# Just print out the list of packages for debugging
2629
pip list
2730
}

.github/pull_request_template.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
### Summary
2+
[PLEASE REMOVE] See [CONTRIBUTING.md's Pull Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests) for ExecuTorch PR guidelines.
3+
4+
[PLEASE REMOVE] If this PR closes an issue, please add a `Fixes #<issue-id>` line.
5+
6+
[PLEASE REMOVE] If this PR introduces a fix or feature that should be the upcoming release notes, please add a "Release notes: <area>" label. For a list of available release notes labels, check out [CONTRIBUTING.md's Pull Requests](https://github.com/pytorch/executorch/blob/main/CONTRIBUTING.md#pull-requests).
7+
8+
### Test plan
9+
[PLEASE REMOVE] How did you test this PR? Please write down any manual commands you used and note down tests that you have written if applicable.

.github/workflows/trunk.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ jobs:
137137
docker-image: executorch-ubuntu-22.04-arm-sdk
138138
submodules: 'true'
139139
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
140+
timeout: 90
140141
script: |
141142
# The generic Linux job chooses to use base env, not the one setup by the image
142143
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")
@@ -162,6 +163,7 @@ jobs:
162163
docker-image: executorch-ubuntu-22.04-arm-sdk
163164
submodules: 'true'
164165
ref: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.sha || github.sha }}
166+
timeout: 90
165167
script: |
166168
# The generic Linux job chooses to use base env, not the one setup by the image
167169
CONDA_ENV=$(conda env list --json | jq -r ".envs | .[-1]")

CONTRIBUTING.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -242,14 +242,27 @@ for basics.
242242
- Give the PR a clear and thorough description. Don't just describe what the PR
243243
does: the diff will do that. Explain *why* you are making this change, in a
244244
way that will make sense to someone years from now.
245-
- Add the line `Test Plan:` (with that spelling, capitalization, and trailing
246-
colon character), followed by lines containing repeatable instructions for
245+
- Explain how you have tested your changes by including repeatable instructions for
247246
testing the PR.
248247
- If you added tests, this can be as simple as the command you used to run the
249248
tests.
250249
- If you tested the PR manually, include the steps and the outputs. Help a
251250
future editor understand how to test the code that you're modifying
252251
today.
252+
- If your PR contains or is representative of a feature/bug fix that should be
253+
called out in the release notes, please add a label for "Release notes: \<area\>",
254+
where \<area\> describes which part of ExecuTorch the change pertains to, e.g.
255+
"Release notes: runtime". Here are all of the categories:
256+
- `Release notes: runtime`: changes related to the core runtime which loads the program methods, initializes delegates, and runs the lowered graph.
257+
- `Release notes: exir`: changes to any internal representations, such as any edge-related dialects. Also any changes to passes that may modify the exir, such as memory planning.
258+
- `Release notes: quantization`: changes to quantization.
259+
- `Release notes: ops & kernels`: changes to the opset and any new / changed kernel implementations.
260+
- `Release notes: api`: changes to public facing apis (any interfaces, pybinded runtime methods, etc.).
261+
- `Release notes: backends`: changes to any of the backend delegates.
262+
- `Release notes: build`: changes related to the build system, including major dependency upgrades, notable build flags, optimizations, etc.
263+
- `Release notes: devtools`: changes to any of ExecuTorch's developer tools, for example the debugger & profiler.
264+
- `Release notes: examples`: changes to any code under `examples/`.
265+
- `Release notes: misc`: anything notable that doesn't belong in the above categories.
253266
- See https://github.com/pytorch/executorch/pull/3612 for an example PR that
254267
follows this advice.
255268
1. Before asking for a review, ensure that all [CI (continuous integration)

backends/qualcomm/runtime/backends/QnnProfiler.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,9 @@ QnnProfile::QnnProfile(
2323
QnnProfile_Level_t qnnProfileLevel = 0;
2424
if (profile_level == QnnExecuTorchProfileLevel::kProfileBasic) {
2525
qnnProfileLevel = QNN_PROFILE_LEVEL_BASIC;
26-
} else if (profile_level == QnnExecuTorchProfileLevel::kProfileDetailed
27-
|| profile_level == QnnExecuTorchProfileLevel::kProfileOptrace) {
26+
} else if (
27+
profile_level == QnnExecuTorchProfileLevel::kProfileDetailed ||
28+
profile_level == QnnExecuTorchProfileLevel::kProfileOptrace) {
2829
qnnProfileLevel = QNN_PROFILE_LEVEL_DETAILED;
2930
} else {
3031
QNN_EXECUTORCH_LOG_WARN("Invalid profile level");
@@ -46,15 +47,17 @@ QnnProfile::QnnProfile(
4647

4748
if (profile_level == QnnExecuTorchProfileLevel::kProfileOptrace) {
4849
if (handle_ == nullptr) {
49-
QNN_EXECUTORCH_LOG_WARN("Prfoile handle is null, cannot enable optrace");
50+
QNN_EXECUTORCH_LOG_WARN(
51+
"Prfoile handle is null, cannot enable optrace");
5052
return;
5153
}
5254

5355
QnnProfile_Config_t qnnProfileConfig = QNN_PROFILE_CONFIG_INIT;
5456
qnnProfileConfig.option = QNN_PROFILE_CONFIG_OPTION_ENABLE_OPTRACE;
5557
std::array<const QnnProfile_Config_t*, 2> profileConfigs = {
5658
&qnnProfileConfig, nullptr};
57-
error = qnn_interface.qnn_profile_set_config(handle_, profileConfigs.data());
59+
error =
60+
qnn_interface.qnn_profile_set_config(handle_, profileConfigs.data());
5861

5962
if (error != QNN_SUCCESS) {
6063
QNN_EXECUTORCH_LOG_WARN(

0 commit comments

Comments
 (0)