Skip to content

Commit 3648e27

Browse files
committed
Update on "[ET-VK] Adding all tensor packing support for repeat op."
This diff updates Executorch Vulkan backend's `repeat` operation to support width, height and channel packed tensors. It also updates the op_registry.py file to indicate `repeat` operation supports all packing. Differential Revision: [D71477633](https://our.internmc.facebook.com/intern/diff/D71477633/) [ghstack-poisoned]
2 parents a164c58 + 2bfed5e commit 3648e27

File tree

82 files changed

+2149
-1150
lines changed

Some content is hidden

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

82 files changed

+2149
-1150
lines changed

.ci/scripts/test_qnn_static_llama.sh

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# This source code is licensed under the BSD-style license found in the
66
# LICENSE file in the root directory of this source tree.
77

8-
set -exu
8+
set -euxo pipefail
99

1010
source "$(dirname "${BASH_SOURCE[0]}")/utils.sh"
1111

@@ -56,4 +56,3 @@ if [ $exit_code1 -ne 0 ] || [ $exit_code2 -ne 0 ]; then
5656
else
5757
exit 0
5858
fi
59-
set -e

.ci/scripts/utils.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ install_executorch() {
3232
which pip
3333
# Install executorch, this assumes that Executorch is checked out in the
3434
# current directory.
35-
./install_executorch.sh --pybind xnnpack "$@"
35+
./install_executorch.sh "$@"
3636
# Just print out the list of packages for debugging
3737
pip list
3838
}

.github/workflows/apple.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
id: set_version
3838
shell: bash
3939
run: |
40-
VERSION="0.5.0.$(TZ='PST8PDT' date +%Y%m%d)"
40+
VERSION="0.7.0.$(TZ='PST8PDT' date +%Y%m%d)"
4141
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
4242
4343
build-demo-ios:

.github/workflows/pull.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,6 @@ jobs:
573573
574574
BUILD_TOOL="cmake"
575575
576-
./install_requirements.sh --use-pt-pinned-commit
577576
PYTHON_EXECUTABLE=python bash .ci/scripts/setup-qnn-deps.sh
578577
PYTHON_EXECUTABLE=python bash .ci/scripts/build-qnn-sdk.sh
579578

backends/arm/ethosu_backend.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
# debug functionality
2525
logger = logging.getLogger(__name__)
26-
logger.setLevel(logging.WARNING)
2726

2827

2928
@final

backends/arm/process_node.py

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,7 @@
1414
from executorch.backends.arm.operators.node_visitor import NodeVisitor
1515
from executorch.backends.arm.tosa_mapping import TosaArg
1616
from executorch.backends.arm.tosa_specification import TosaSpecification
17-
from executorch.backends.arm.tosa_utils import (
18-
get_node_debug_info,
19-
getNodeArgs,
20-
tosa_shape,
21-
)
17+
from executorch.backends.arm.tosa_utils import getNodeArgs, tosa_shape
2218
from torch.export.exported_program import ExportedProgram
2319

2420

@@ -36,7 +32,7 @@ def process_call_function(
3632
output = TosaArg(node)
3733
except ValueError as e:
3834
raise ValueError(
39-
f"Failed processing call_function:\n{get_node_debug_info(node)}"
35+
f"Failed processing call_function: {node.name}. "
4036
"Is the original torch function supported?"
4137
) from e
4238
tosa_graph.currRegion.currBasicBlock.addTensor(
@@ -74,7 +70,7 @@ def process_inputs(
7470
tosa_arg = TosaArg(node)
7571
except ValueError as e:
7672
raise ValueError(
77-
f"Failed processing input placeholder:\n{get_node_debug_info(node)}"
73+
f"Failed processing input placeholder: {node.name}. "
7874
"Is the original torch function supported?"
7975
) from e
8076
input_shape = tosa_arg.shape
@@ -100,7 +96,7 @@ def process_inputs_to_parameters(
10096
tosa_arg = TosaArg(node)
10197
except ValueError as e:
10298
raise ValueError(
103-
f"Failed processing parameter placeholder:\n{get_node_debug_info(node)}"
99+
f"Failed processing parameter placeholder: {node.name}. "
104100
"Is the original torch function supported?"
105101
) from e
106102
parameter_name = edge_program.graph_signature.inputs_to_parameters[tosa_arg.name]
@@ -129,7 +125,7 @@ def process_inputs_to_buffers(
129125
tosa_arg = TosaArg(node)
130126
except ValueError as e:
131127
raise ValueError(
132-
f"Failed processing buffer placeholder:\n{get_node_debug_info(node)}"
128+
f"Failed processing buffer placeholder: {node.name}. "
133129
"Is the original torch function supported?"
134130
) from e
135131
buffer_name = edge_program.graph_signature.inputs_to_buffers[node.name]
@@ -157,7 +153,7 @@ def process_inputs_to_lifted_tensor_constants(
157153
tosa_arg = TosaArg(node)
158154
except ValueError as e:
159155
raise ValueError(
160-
f"Failed processing lifted tensor constant placeholder:\n{get_node_debug_info(node)}"
156+
f"Failed processing lifted tensor constant placeholder: {node.name}. "
161157
"Is the original torch function supported?"
162158
) from e
163159
tensor_name = edge_program.graph_signature.inputs_to_lifted_tensor_constants[

backends/arm/test/ops/test_any.py

Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
from typing import List, Tuple
88

9+
import pytest
910
import torch
1011
from executorch.backends.arm.test import common
1112
from executorch.backends.arm.test.tester.test_pipeline import (
@@ -117,25 +118,6 @@ def forward(self, x: torch.Tensor):
117118
}
118119

119120

120-
fvp_xfails = {
121-
"any_rank1": "MLETORCH-706 Support ScalarType::Bool in EthosUBackend.",
122-
"any_rank1_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
123-
"any_rank2": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
124-
"any_rank2_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
125-
"any_rank2_dims": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
126-
"any_rank2_dims_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
127-
"any_rank3_dims_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
128-
"any_rank4": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
129-
"any_rank4_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
130-
"any_rank4_dims": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
131-
"any_rank4_dims_squeeze": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
132-
"any_rank1_reduce_all": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
133-
"any_rank2_reduce_all": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
134-
"any_rank3_reduce_all": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
135-
"any_rank4_reduce_all": "MLETORCH-706: Support ScalarType::Bool in EthosUBackend.",
136-
}
137-
138-
139121
@common.parametrize("test_data", test_data)
140122
def test_any_tosa_MI(test_data: input_t1):
141123
op, test_input = test_data
@@ -147,13 +129,13 @@ def test_any_tosa_MI(test_data: input_t1):
147129
def test_any_tosa_BI(test_data: input_t1):
148130
op, test_input = test_data
149131
pipeline = TosaPipelineBI[input_t1](op, test_input, op.aten_op, op.exir_op)
150-
pipeline.pop_stage(pipeline.find_pos("quantize") + 1)
151132
pipeline.pop_stage("quantize")
133+
pipeline.pop_stage("check.quant_nodes")
152134
pipeline.run()
153135

154136

155137
@common.parametrize("test_data", test_data)
156-
def test_logical_u55_BI(test_data: input_t1):
138+
def test_any_u55_BI(test_data: input_t1):
157139
# Tests that we don't delegate these ops since they are not supported on U55.
158140
op, test_input = test_data
159141
pipeline = OpNotSupportedPipeline[input_t1](
@@ -163,23 +145,13 @@ def test_logical_u55_BI(test_data: input_t1):
163145

164146

165147
@common.parametrize("test_data", test_data)
166-
def test_floor_u85_BI(test_data: input_t1):
167-
op, test_input = test_data
168-
pipeline = EthosU85PipelineBI[input_t1](
169-
op, test_input, op.aten_op, op.exir_op, run_on_fvp=False
170-
)
171-
pipeline.pop_stage(pipeline.find_pos("quantize") + 1)
172-
pipeline.pop_stage("quantize")
173-
pipeline.run()
174-
175-
176-
@common.parametrize("test_data", test_data, fvp_xfails)
177-
@common.SkipIfNoCorstone320
178-
def test_floor_u85_BI_on_fvp(test_data: input_t1):
148+
@pytest.mark.xfail(reason="MLETORCH-706: Support ScalarType::Bool in EthosUBackend.")
149+
@common.XfailIfNoCorstone320
150+
def test_any_u85_BI(test_data: input_t1):
179151
op, test_input = test_data
180152
pipeline = EthosU85PipelineBI[input_t1](
181153
op, test_input, op.aten_op, op.exir_op, run_on_fvp=True
182154
)
183-
pipeline.pop_stage(pipeline.find_pos("quantize") + 1)
184155
pipeline.pop_stage("quantize")
156+
pipeline.pop_stage("check.quant_nodes")
185157
pipeline.run()

0 commit comments

Comments
 (0)