Skip to content

Commit 1f69eae

Browse files
Arm backend: Rename build_reshape_tosa_1_0 to build_reshape_tosa (#16095)
Signed-off-by: Sebastian Larsson <[email protected]>
1 parent b789cbb commit 1f69eae

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

backends/arm/operators/op_index_select.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
)
2020
from executorch.backends.arm.tosa.mapping import TosaArg
2121

22-
from executorch.backends.arm.tosa.utils import build_reshape_tosa_1_0
22+
from executorch.backends.arm.tosa.utils import build_reshape_tosa
2323
from torch.fx import Node
2424

2525

@@ -67,7 +67,7 @@ def define_node(
6767
weights_new_shape,
6868
weights.dtype,
6969
)
70-
build_reshape_tosa_1_0(
70+
build_reshape_tosa(
7171
tosa_graph, weights.name, weights_new_shape, weights_reshaped.name
7272
)
7373

@@ -89,7 +89,7 @@ def define_node(
8989
indices_new_shape,
9090
indices.dtype,
9191
)
92-
build_reshape_tosa_1_0(
92+
build_reshape_tosa(
9393
tosa_graph, indices.name, indices_new_shape, indices_reshaped.name
9494
)
9595

@@ -106,6 +106,4 @@ def define_node(
106106

107107
if len(weights.shape) == 2:
108108
output_real_shape = [output.shape[0], output.shape[1]]
109-
build_reshape_tosa_1_0(
110-
tosa_graph, output_name, output_real_shape, output.name
111-
)
109+
build_reshape_tosa(tosa_graph, output_name, output_real_shape, output.name)

backends/arm/operators/op_index_tensor.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def define_node(
180180
gather_idx_shape,
181181
index_dtype,
182182
)
183-
tutils.build_reshape_tosa_1_0(
183+
tutils.build_reshape_tosa(
184184
tosa_graph,
185185
stride_shifted_indices.name,
186186
gather_idx_shape,
@@ -212,7 +212,7 @@ def define_node(
212212
gather_vals_shape = [N, K, C]
213213
reshaped_input = tosa_graph.addIntermediate(gather_vals_shape, values.dtype)
214214

215-
tutils.build_reshape_tosa_1_0(
215+
tutils.build_reshape_tosa(
216216
tosa_graph,
217217
values.name,
218218
gather_vals_shape,
@@ -238,7 +238,7 @@ def define_node(
238238

239239
output_shape = tutils.tosa_shape(output.shape, output.dim_order)
240240

241-
tutils.build_reshape_tosa_1_0(
241+
tutils.build_reshape_tosa(
242242
tosa_graph,
243243
gather_out.name,
244244
list(output_shape),

backends/arm/tosa/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def broadcast_tensors(
110110
tens_dtype,
111111
)
112112

113-
build_reshape_tosa_1_0(tosa_fb, node.name, new_shape, reshaped.name)
113+
build_reshape_tosa(tosa_fb, node.name, new_shape, reshaped.name)
114114

115115
tiled = tosa_fb.addIntermediate(common_shape, tens_dtype)
116116
multipliers = [
@@ -137,7 +137,7 @@ def broadcast_tensors(
137137
return broadcast_tensors
138138

139139

140-
def build_reshape_tosa_1_0(
140+
def build_reshape_tosa(
141141
tosa_graph, input_name, new_shape, output_name, shape_name_override=""
142142
):
143143
"""Insert a TOSA reshape operator using the v1.0 semantics.

0 commit comments

Comments
 (0)