Skip to content

Commit b0c6dfc

Browse files
Merge branch 'main' into dev/refactor_unittests
2 parents 595e99a + fedb035 commit b0c6dfc

File tree

74 files changed

+1039
-2244
lines changed

Some content is hidden

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

74 files changed

+1039
-2244
lines changed

.ci/scripts/utils.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ retry () {
1717
}
1818

1919
clean_executorch_install_folders() {
20-
./install_requirements.sh --clean
20+
./install_executorch.sh --clean
2121
}
2222

2323
install_executorch() {
2424
which pip
2525
# Install executorch, this assumes that Executorch is checked out in the
2626
# current directory.
2727
if [[ "${1:-}" == "use-pt-pinned-commit" ]]; then
28-
./install_requirements.sh --pybind xnnpack --use-pt-pinned-commit
28+
./install_executorch.sh --pybind xnnpack --use-pt-pinned-commit
2929
else
30-
./install_requirements.sh --pybind xnnpack
30+
./install_executorch.sh --pybind xnnpack
3131
fi
3232
# Just print out the list of packages for debugging
3333
pip list

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
paths:
1010
- .ci/scripts/setup-ios.sh
1111
- .github/workflows/apple.yml
12-
- install_requirements.sh
12+
- install_executorch.sh
1313
- backends/apple/**
1414
- build/build_apple_frameworks.sh
1515
- build/build_apple_llm_demo.sh

.github/workflows/pull.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,7 @@ jobs:
200200
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
201201
202202
# install pybind
203-
bash install_requirements.sh --pybind xnnpack
203+
bash install_executorch.sh --pybind xnnpack
204204
205205
# install Llava requirements
206206
bash examples/models/llama/install_requirements.sh
@@ -333,6 +333,9 @@ jobs:
333333

334334
unittest-arm:
335335
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
336+
permissions:
337+
id-token: write
338+
contents: read
336339
with:
337340
runner: linux.2xlarge
338341
docker-image: executorch-ubuntu-22.04-arm-sdk
@@ -433,7 +436,7 @@ jobs:
433436
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
434437
435438
# install pybind
436-
bash install_requirements.sh --pybind xnnpack
439+
bash install_executorch.sh --pybind xnnpack
437440
438441
# install phi-3-mini requirements
439442
bash examples/models/phi-3-mini/install_requirements.sh
@@ -460,7 +463,7 @@ jobs:
460463
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
461464
462465
# install pybind
463-
bash install_requirements.sh --pybind xnnpack
466+
bash install_executorch.sh --pybind xnnpack
464467
465468
# install llama requirements
466469
bash examples/models/llama/install_requirements.sh
@@ -487,7 +490,7 @@ jobs:
487490
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
488491
489492
# install pybind
490-
bash install_requirements.sh --pybind xnnpack
493+
bash install_executorch.sh --pybind xnnpack
491494
492495
# install llama requirements
493496
bash examples/models/llama/install_requirements.sh
@@ -514,7 +517,7 @@ jobs:
514517
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-linux.sh "cmake"
515518
516519
# install pybind
517-
bash install_requirements.sh --pybind xnnpack
520+
bash install_executorch.sh --pybind xnnpack
518521
519522
# install llama requirements
520523
bash examples/models/llama/install_requirements.sh

.github/workflows/trunk.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,9 @@ jobs:
132132
test-arm-backend-delegation:
133133
name: test-arm-backend-delegation
134134
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
135+
permissions:
136+
id-token: write
137+
contents: read
135138
with:
136139
runner: linux.2xlarge
137140
docker-image: executorch-ubuntu-22.04-arm-sdk
@@ -159,6 +162,9 @@ jobs:
159162
test-arm-reference-delegation:
160163
name: test-arm-reference-delegation
161164
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
165+
permissions:
166+
id-token: write
167+
contents: read
162168
with:
163169
runner: linux.2xlarge
164170
docker-image: executorch-ubuntu-22.04-arm-sdk

backends/apple/mps/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ I 00:00:00.122615 executorch:mps_executor_runner.mm:501] Model verified successf
9797
### [Optional] Run the generated model directly using pybind
9898
1. Make sure `pybind` MPS support was installed:
9999
```bash
100-
./install_requirements.sh --pybind mps
100+
./install_executorch.sh --pybind mps
101101
```
102102
2. Run the `mps_example` script to trace the model and run it directly from python:
103103
```bash

backends/cadence/build_cadence_fusionG3.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ unset XTENSA_CORE
1212
export XTENSA_CORE=FCV_FG3GP
1313
git submodule sync
1414
git submodule update --init
15-
./install_requirements.sh
15+
./install_executorch.sh
1616

1717
rm -rf cmake-out
1818

backends/cadence/build_cadence_hifi4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ unset XTENSA_CORE
1212
export XTENSA_CORE=nxp_rt600_RI23_11_newlib
1313
git submodule sync
1414
git submodule update --init
15-
./install_requirements.sh
15+
./install_executorch.sh
1616

1717
rm -rf cmake-out
1818

backends/cadence/fusion_g3/operators/op_dequantize.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ void check_dequantize_per_tensor_args(
6767

6868
ET_CHECK_MSG(
6969
input.scalar_type() == dtype,
70-
"input.scalar_type() %" PRId8 " is not matching dtype argumenta:",
71-
static_cast<int8_t>(input.scalar_type()));
70+
"input.scalar_type() %s is not matching dtype arguments:",
71+
::executorch::runtime::toString(input.scalar_type()));
7272

7373
if (out_dtype.has_value()) {
7474
ET_CHECK_MSG(
@@ -561,11 +561,12 @@ Tensor& dequantize_per_tensor_out(
561561
const Tensor& input,
562562
double scale,
563563
int64_t zero_point,
564-
int64_t quant_min,
565-
int64_t quant_max,
564+
__ET_UNUSED int64_t quant_min,
565+
__ET_UNUSED int64_t quant_max,
566566
ScalarType dtype,
567-
::executorch::aten::optional<ScalarType> out_dtype,
568567
Tensor& out) {
568+
constexpr ScalarType out_dtype = ScalarType::Float;
569+
569570
#ifdef OP_ARG_CHECK
570571
torch::executor::Error err = resize_tensor(out, input.sizes());
571572
ET_CHECK_MSG(

backends/cadence/reference/operators/quantized_conv_out.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ __attribute__((noinline)) void conv2d_nchw_core_generic(
119119
if (((_h + d0 * _wh - p0) >= 0) &&
120120
((_h + d0 * _wh - p0) < h) &&
121121
((_w + d1 * _ww - p1) >= 0) &&
122-
((_w + d1 * _ww - p1 < w))) {
122+
((_w + d1 * _ww - p1) < w)) {
123123
int ioff =
124124
(_h + d0 * _wh - p0) * w + (_w + d1 * _ww - p1);
125125
int woff = _wh * ww + _ww;

backends/qualcomm/_passes/insert_requantize.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,15 +89,9 @@ def _single_output_annotation(
8989
requantize_dict = n.meta.pop(QCOM_REQUANTIZE)
9090
# {quant_attr: user_node_name_list}
9191
group_quant_attr_dict = self._invert_dict(requantize_dict)
92-
# TODO: If users of the node contain output node,
93-
# we replace the node with to_copy op. However, it would
94-
# be problem when the node has multiple to_copy ops
95-
add_output = len(group_quant_attr_dict) == 1
9692

9793
for hashable_quant_attr, user_nodes in group_quant_attr_dict.items():
9894
user_nodes_copy = user_nodes.copy()
99-
if add_output:
100-
user_nodes_copy.append("output")
10195
self._insert_to_copy(gm, n, dict(hashable_quant_attr), user_nodes_copy)
10296

10397
def _insert(self, graph_module: torch.fx.GraphModule) -> torch.fx.GraphModule:

0 commit comments

Comments
 (0)