Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion backends/arm/_passes/decompose_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ def call(self, graph_module: torch.fx.GraphModule):
input_node, dim, index = node.args

rank = len(input_node.meta["val"].size())
shape = input_node.meta["val"].shape
dim = dim % rank if dim < 0 else dim
index = index % rank if index < 0 else index
index = index % shape[dim] if index < 0 else index

with graph_module.graph.inserting_before(node):
slice_node = create_node(
Expand Down
1 change: 0 additions & 1 deletion backends/arm/test/ops/test_cat.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ def _test_cat_ethosu_BI_pipeline(
.check(["torch.ops.quantized_decomposed"])
.to_edge()
.partition()
.dump_artifact()
.check_not(["executorch_exir_dialects_edge__ops_aten_cat_default"])
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_select.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
test_data_suite: list[tuple[test_data_t]] = [
# (test_data, dim, index)
((torch.zeros(5, 3, 20), -1, 0),),
((torch.zeros(5, 3, 20), 0, -1),),
((torch.rand(5, 3, 20), 0, -1),),
((torch.zeros(5, 3, 20), 0, 4),),
((torch.ones(10, 10, 10), 0, 2),),
((torch.rand(5, 3, 20, 2), 0, 2),),
Expand Down Expand Up @@ -61,9 +61,7 @@ def _test_select_tosa_MI_pipeline(
.check([export_target])
.check_not(["torch.ops.quantized_decomposed"])
.to_edge()
.dump_artifact()
.partition()
.dump_artifact()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
.run_method_and_compare_outputs(inputs=test_data)
Expand Down
4 changes: 1 addition & 3 deletions backends/arm/test/ops/test_to_copy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 2024 Arm Limited and/or its affiliates.
# Copyright 2024-2025 Arm Limited and/or its affiliates.
# All rights reserved.
#
# This source code is licensed under the BSD-style license found in the
Expand Down Expand Up @@ -55,9 +55,7 @@ def _test_to_copy_tosa_MI_pipeline(
compile_spec=common.get_tosa_compile_spec("TOSA-0.80+MI"),
)
.export()
.dump_artifact()
.to_edge()
.dump_artifact()
.partition()
.check_count({"torch.ops.higher_order.executorch_call_delegate": 1})
.to_executorch()
Expand Down
2 changes: 1 addition & 1 deletion examples/arm/aot_arm_compiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ def forward(self, x):
return z

example_input = (torch.ones(2, 2),)
can_delegate = False
can_delegate = True
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) That was easy!



class MultipleOutputsModule(torch.nn.Module):
Expand Down
Loading