Skip to content

Commit 1054c5e

Browse files
Tester: rename inputs to example_inputs
Rename inputs to example_inputs to differentiate between what's used as test data and what's used as example/calibration data. Signed-off-by: Oscar Andersson <[email protected]> Change-Id: Ibe6e65fd3f6ec14a8f27fe2270595a3835b1e038
1 parent 13ba3a7 commit 1054c5e

16 files changed

+74
-56
lines changed

backends/arm/test/misc/test_debug_feats.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def _tosa_MI_pipeline(self, module: torch.nn.Module, dump_file=None):
4545
(
4646
ArmTester(
4747
module,
48-
inputs=module.get_inputs(),
48+
example_inputs=module.get_inputs(),
4949
compile_spec=common.get_tosa_compile_spec(),
5050
)
5151
.export()
@@ -59,7 +59,7 @@ def _tosa_BI_pipeline(self, module: torch.nn.Module, dump_file=None):
5959
(
6060
ArmTester(
6161
module,
62-
inputs=module.get_inputs(),
62+
example_inputs=module.get_inputs(),
6363
compile_spec=common.get_tosa_compile_spec(),
6464
)
6565
.quantize()
@@ -101,7 +101,7 @@ def test_numerical_diff_prints(self):
101101
tester = (
102102
ArmTester(
103103
model,
104-
inputs=model.get_inputs(),
104+
example_inputs=model.get_inputs(),
105105
compile_spec=common.get_tosa_compile_spec(),
106106
)
107107
.quantize()

backends/arm/test/models/test_mobilenet_v2_arm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def test_mv2_tosa_MI(self):
5252
tester = (
5353
ArmTester(
5454
self.mv2,
55-
inputs=self.model_inputs,
55+
example_inputs=self.model_inputs,
5656
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
5757
)
5858
.export()
@@ -72,7 +72,7 @@ def test_mv2_tosa_BI(self):
7272
tester = (
7373
ArmTester(
7474
self.mv2,
75-
inputs=self.model_inputs,
75+
example_inputs=self.model_inputs,
7676
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
7777
)
7878
.quantize()
@@ -102,7 +102,7 @@ def test_mv2_u55_BI(self):
102102
(
103103
ArmTester(
104104
self.mv2,
105-
inputs=self.model_inputs,
105+
example_inputs=self.model_inputs,
106106
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
107107
)
108108
.quantize()

backends/arm/test/ops/test_add.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def _test_add_tosa_MI_pipeline(
6161
tester = (
6262
ArmTester(
6363
module,
64-
inputs=test_data,
64+
example_inputs=test_data,
6565
compile_spec=common.get_tosa_compile_spec(),
6666
)
6767
.export()
@@ -85,7 +85,7 @@ def _test_add_tosa_BI_pipeline(
8585
tester = (
8686
ArmTester(
8787
module,
88-
inputs=test_data,
88+
example_inputs=test_data,
8989
compile_spec=common.get_tosa_compile_spec(),
9090
)
9191
.quantize()
@@ -111,7 +111,7 @@ def _test_add_u55_BI_pipeline(
111111
(
112112
ArmTester(
113113
module,
114-
inputs=test_data,
114+
example_inputs=test_data,
115115
compile_spec=common.get_u55_compile_spec(),
116116
)
117117
.quantize()

backends/arm/test/ops/test_avg_pool.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _test_avgpool2d_tosa_MI_pipeline(
4949
tester = (
5050
ArmTester(
5151
module,
52-
inputs=test_data,
52+
example_inputs=test_data,
5353
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
5454
)
5555
.export()
@@ -74,7 +74,7 @@ def _test_avgpool2d_tosa_BI_pipeline(
7474
tester = (
7575
ArmTester(
7676
module,
77-
inputs=test_data,
77+
example_inputs=test_data,
7878
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
7979
)
8080
.quantize()
@@ -100,7 +100,7 @@ def _test_avgpool2d_tosa_u55_BI_pipeline(
100100
(
101101
ArmTester(
102102
module,
103-
inputs=test_data,
103+
example_inputs=test_data,
104104
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
105105
)
106106
.quantize()

backends/arm/test/ops/test_batch_norm.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -530,7 +530,7 @@ def _test_batchnorm2d_tosa_MI_pipeline(
530530
tester = (
531531
ArmTester(
532532
module,
533-
inputs=test_data,
533+
example_inputs=test_data,
534534
compile_spec=common.get_tosa_compile_spec(),
535535
)
536536
.export()
@@ -566,7 +566,7 @@ def _test_batchnorm2d_no_stats_tosa_MI_pipeline(
566566
tester = (
567567
ArmTester(
568568
module,
569-
inputs=test_data,
569+
example_example_inputs=test_data,
570570
compile_spec=common.get_tosa_compile_spec(),
571571
)
572572
.export()
@@ -600,7 +600,7 @@ def _test_batchnorm2d_tosa_BI_pipeline(
600600
tester = (
601601
ArmTester(
602602
module,
603-
inputs=test_data,
603+
example_inputs=test_data,
604604
compile_spec=common.get_tosa_compile_spec(),
605605
)
606606
.quantize()
@@ -638,7 +638,7 @@ def _test_batchnorm2d_u55_BI_pipeline(
638638
(
639639
ArmTester(
640640
module,
641-
inputs=test_data,
641+
example_inputs=test_data,
642642
compile_spec=common.get_u55_compile_spec(),
643643
)
644644
.quantize()

backends/arm/test/ops/test_clone.py

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ def _test_clone_tosa_MI_pipeline(
3737
):
3838
tester = (
3939
ArmTester(
40-
module, inputs=test_data, compile_spec=common.get_tosa_compile_spec()
40+
module,
41+
example_inputs=test_data,
42+
compile_spec=common.get_tosa_compile_spec(),
4143
)
4244
.export()
4345
.check_count({"torch.ops.aten.clone.default": 1})
@@ -59,7 +61,9 @@ def _test_clone_tosa_BI_pipeline(
5961
):
6062
tester = (
6163
ArmTester(
62-
module, inputs=test_data, compile_spec=common.get_tosa_compile_spec()
64+
module,
65+
example_inputs=test_data,
66+
compile_spec=common.get_tosa_compile_spec(),
6367
)
6468
.quantize()
6569
.export()
@@ -82,7 +86,9 @@ def _test_clone_tosa_u55_pipeline(
8286
):
8387
(
8488
ArmTester(
85-
module, inputs=test_data, compile_spec=common.get_u55_compile_spec()
89+
module,
90+
example_inputs=test_data,
91+
compile_spec=common.get_u55_compile_spec(),
8692
)
8793
.quantize()
8894
.export()

backends/arm/test/ops/test_conv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ def _test_conv2d_tosa_MI_pipeline(
247247
tester = (
248248
ArmTester(
249249
module,
250-
inputs=test_data,
250+
example_inputs=test_data,
251251
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
252252
)
253253
.export()
@@ -272,7 +272,7 @@ def _test_conv2d_tosa_BI_pipeline(
272272
tester = (
273273
ArmTester(
274274
module,
275-
inputs=test_data,
275+
example_inputs=test_data,
276276
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
277277
)
278278
.quantize()
@@ -296,7 +296,7 @@ def _test_conv2d_u55_BI_pipeline(
296296
(
297297
ArmTester(
298298
module,
299-
inputs=test_data,
299+
example_inputs=test_data,
300300
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
301301
)
302302
.quantize()

backends/arm/test/ops/test_conv_combos.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def _test_conv_combo_tosa_MI_pipeline(
160160
tester = (
161161
ArmTester(
162162
module,
163-
inputs=test_data,
163+
example_inputs=test_data,
164164
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
165165
)
166166
.export()
@@ -187,7 +187,7 @@ def _test_conv_combo_tosa_BI_pipeline(
187187
tester = (
188188
ArmTester(
189189
module,
190-
inputs=test_data,
190+
example_inputs=test_data,
191191
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
192192
)
193193
.quantize()
@@ -211,7 +211,7 @@ def _test_conv_combo_u55_BI_pipeline(
211211
(
212212
ArmTester(
213213
module,
214-
inputs=test_data,
214+
example_inputs=test_data,
215215
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
216216
)
217217
.quantize()

backends/arm/test/ops/test_depthwise_conv.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ def _test_dw_conv2d_tosa_MI_pipeline(
133133
tester = (
134134
ArmTester(
135135
module,
136-
inputs=test_data,
136+
example_inputs=test_data,
137137
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
138138
)
139139
.export()
@@ -156,7 +156,7 @@ def _test_dw_conv2d_tosa_BI_pipeline(
156156
tester = (
157157
ArmTester(
158158
module,
159-
inputs=test_data,
159+
example_inputs=test_data,
160160
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
161161
)
162162
.quantize()
@@ -180,7 +180,7 @@ def _test_dw_conv2d_u55_BI_pipeline(
180180
(
181181
ArmTester(
182182
module,
183-
inputs=test_data,
183+
example_inputs=test_data,
184184
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
185185
)
186186
.quantize()

backends/arm/test/ops/test_div.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ def _test_div_tosa_MI_pipeline(
107107
tester = (
108108
ArmTester(
109109
module,
110-
inputs=test_data,
110+
example_inputs=test_data,
111111
compile_spec=common.get_tosa_compile_spec(),
112112
)
113113
.export()
@@ -131,7 +131,7 @@ def _test_div_tosa_BI_pipeline(
131131
tester = (
132132
ArmTester(
133133
module,
134-
inputs=test_data,
134+
example_inputs=test_data,
135135
compile_spec=common.get_tosa_compile_spec(),
136136
)
137137
.quantize()
@@ -156,7 +156,7 @@ def _test_div_u55_BI_pipeline(
156156
(
157157
ArmTester(
158158
module,
159-
inputs=test_data,
159+
example_inputs=test_data,
160160
compile_spec=common.get_u55_compile_spec(),
161161
)
162162
.quantize()

backends/arm/test/ops/test_linear.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _test_linear_tosa_MI_pipeline(
119119
tester = (
120120
ArmTester(
121121
module,
122-
inputs=test_data,
122+
example_inputs=test_data,
123123
compile_spec=common.get_tosa_compile_spec(),
124124
)
125125
.export()
@@ -143,7 +143,7 @@ def _test_linear_tosa_BI_pipeline(
143143
tester = (
144144
ArmTester(
145145
module,
146-
inputs=test_data,
146+
example_inputs=test_data,
147147
compile_spec=common.get_tosa_compile_spec(),
148148
)
149149
.quantize()
@@ -168,7 +168,7 @@ def _test_linear_tosa_u55_BI_pipeline(
168168
(
169169
ArmTester(
170170
module,
171-
inputs=test_data,
171+
example_inputs=test_data,
172172
compile_spec=common.get_u55_compile_spec(),
173173
)
174174
.quantize()

backends/arm/test/ops/test_mean_dim.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def _test_meandim_tosa_MI_pipeline(
5454
tester = (
5555
ArmTester(
5656
module,
57-
inputs=test_data,
57+
example_inputs=test_data,
5858
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
5959
)
6060
.export()
@@ -79,7 +79,7 @@ def _test_meandim_tosa_BI_pipeline(
7979
tester = (
8080
ArmTester(
8181
module,
82-
inputs=test_data,
82+
example_inputs=test_data,
8383
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
8484
)
8585
.quantize()
@@ -105,7 +105,7 @@ def _test_meandim_tosa_u55_BI_pipeline(
105105
(
106106
ArmTester(
107107
module,
108-
inputs=test_data,
108+
example_inputs=test_data,
109109
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
110110
)
111111
.quantize()

backends/arm/test/ops/test_softmax.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def _test_softmax_tosa_MI_pipeline(
4242
tester = (
4343
ArmTester(
4444
module,
45-
inputs=test_data,
45+
example_inputs=test_data,
4646
compile_spec=common.get_tosa_compile_spec(),
4747
)
4848
.export()
@@ -66,7 +66,9 @@ def _test_softmax_tosa_BI_pipeline(
6666
):
6767
tester = (
6868
ArmTester(
69-
module, inputs=test_data, compile_spec=common.get_tosa_compile_spec()
69+
module,
70+
example_inputs=test_data,
71+
compile_spec=common.get_tosa_compile_spec(),
7072
)
7173
.quantize()
7274
.export()
@@ -91,7 +93,7 @@ def _test_softmax_tosa_u55_BI_pipeline(
9193
(
9294
ArmTester(
9395
module,
94-
inputs=test_data,
96+
example_inputs=test_data,
9597
compile_spec=common.get_u55_compile_spec(),
9698
)
9799
.quantize()

0 commit comments

Comments
 (0)