Skip to content

Commit 8c70a50

Browse files
Tester: rename inputs to example_inputs (#3800)
Summary: Rename inputs to example_inputs to differentiate between what's used as test data and what's used as example/calibration data. Change-Id: Ibe6e65fd3f6ec14a8f27fe2270595a3835b1e038 Pull Request resolved: #3800 Reviewed By: kirklandsign Differential Revision: D58137948 Pulled By: digantdesai fbshipit-source-id: 5be9ce447966a495eee2bf019b5b44360c231ae6
1 parent 9d58de1 commit 8c70a50

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
(
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()
@@ -67,7 +67,7 @@ def test_mv2_tosa_BI(self):
6767
(
6868
ArmTester(
6969
self.mv2,
70-
inputs=self.model_inputs,
70+
example_inputs=self.model_inputs,
7171
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
7272
)
7373
.quantize()
@@ -86,7 +86,7 @@ def test_mv2_u55_BI(self):
8686
(
8787
ArmTester(
8888
self.mv2,
89-
inputs=self.model_inputs,
89+
example_inputs=self.model_inputs,
9090
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
9191
)
9292
.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
(
6262
ArmTester(
6363
module,
64-
inputs=test_data,
64+
example_inputs=test_data,
6565
compile_spec=common.get_tosa_compile_spec(),
6666
)
6767
.export()
@@ -80,7 +80,7 @@ def _test_add_tosa_BI_pipeline(
8080
(
8181
ArmTester(
8282
module,
83-
inputs=test_data,
83+
example_inputs=test_data,
8484
compile_spec=common.get_tosa_compile_spec(),
8585
)
8686
.quantize()
@@ -100,7 +100,7 @@ def _test_add_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(),
105105
)
106106
.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
(
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()
@@ -69,7 +69,7 @@ def _test_avgpool2d_tosa_BI_pipeline(
6969
(
7070
ArmTester(
7171
module,
72-
inputs=test_data,
72+
example_inputs=test_data,
7373
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
7474
)
7575
.quantize()
@@ -90,7 +90,7 @@ def _test_avgpool2d_tosa_u55_BI_pipeline(
9090
(
9191
ArmTester(
9292
module,
93-
inputs=test_data,
93+
example_inputs=test_data,
9494
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
9595
)
9696
.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
(
531531
ArmTester(
532532
module,
533-
inputs=test_data,
533+
example_inputs=test_data,
534534
compile_spec=common.get_tosa_compile_spec(),
535535
)
536536
.export()
@@ -561,7 +561,7 @@ def _test_batchnorm2d_no_stats_tosa_MI_pipeline(
561561
(
562562
ArmTester(
563563
module,
564-
inputs=test_data,
564+
example_example_inputs=test_data,
565565
compile_spec=common.get_tosa_compile_spec(),
566566
)
567567
.export()
@@ -590,7 +590,7 @@ def _test_batchnorm2d_tosa_BI_pipeline(
590590
(
591591
ArmTester(
592592
module,
593-
inputs=test_data,
593+
example_inputs=test_data,
594594
compile_spec=common.get_tosa_compile_spec(),
595595
)
596596
.quantize()
@@ -622,7 +622,7 @@ def _test_batchnorm2d_u55_BI_pipeline(
622622
(
623623
ArmTester(
624624
module,
625-
inputs=test_data,
625+
example_inputs=test_data,
626626
compile_spec=common.get_u55_compile_spec(),
627627
)
628628
.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
(
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})
@@ -53,7 +55,9 @@ def _test_clone_tosa_BI_pipeline(
5355
):
5456
(
5557
ArmTester(
56-
module, inputs=test_data, compile_spec=common.get_tosa_compile_spec()
58+
module,
59+
example_inputs=test_data,
60+
compile_spec=common.get_tosa_compile_spec(),
5761
)
5862
.quantize()
5963
.export()
@@ -70,7 +74,9 @@ def _test_clone_tosa_u55_pipeline(
7074
):
7175
(
7276
ArmTester(
73-
module, inputs=test_data, compile_spec=common.get_u55_compile_spec()
77+
module,
78+
example_inputs=test_data,
79+
compile_spec=common.get_u55_compile_spec(),
7480
)
7581
.quantize()
7682
.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
(
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()
@@ -267,7 +267,7 @@ def _test_conv2d_tosa_BI_pipeline(
267267
(
268268
ArmTester(
269269
module,
270-
inputs=test_data,
270+
example_inputs=test_data,
271271
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
272272
)
273273
.quantize()
@@ -286,7 +286,7 @@ def _test_conv2d_u55_BI_pipeline(
286286
(
287287
ArmTester(
288288
module,
289-
inputs=test_data,
289+
example_inputs=test_data,
290290
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
291291
)
292292
.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
(
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()
@@ -182,7 +182,7 @@ def _test_conv_combo_tosa_BI_pipeline(
182182
(
183183
ArmTester(
184184
module,
185-
inputs=test_data,
185+
example_inputs=test_data,
186186
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
187187
)
188188
.quantize()
@@ -201,7 +201,7 @@ def _test_conv_combo_u55_BI_pipeline(
201201
(
202202
ArmTester(
203203
module,
204-
inputs=test_data,
204+
example_inputs=test_data,
205205
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
206206
)
207207
.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
(
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()
@@ -151,7 +151,7 @@ def _test_dw_conv2d_tosa_BI_pipeline(
151151
(
152152
ArmTester(
153153
module,
154-
inputs=test_data,
154+
example_inputs=test_data,
155155
compile_spec=common.get_tosa_compile_spec(permute_memory_to_nhwc=True),
156156
)
157157
.quantize()
@@ -170,7 +170,7 @@ def _test_dw_conv2d_u55_BI_pipeline(
170170
(
171171
ArmTester(
172172
module,
173-
inputs=test_data,
173+
example_inputs=test_data,
174174
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
175175
)
176176
.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
(
108108
ArmTester(
109109
module,
110-
inputs=test_data,
110+
example_inputs=test_data,
111111
compile_spec=common.get_tosa_compile_spec(),
112112
)
113113
.export()
@@ -126,7 +126,7 @@ def _test_div_tosa_BI_pipeline(
126126
(
127127
ArmTester(
128128
module,
129-
inputs=test_data,
129+
example_inputs=test_data,
130130
compile_spec=common.get_tosa_compile_spec(),
131131
)
132132
.quantize()
@@ -146,7 +146,7 @@ def _test_div_u55_BI_pipeline(
146146
(
147147
ArmTester(
148148
module,
149-
inputs=test_data,
149+
example_inputs=test_data,
150150
compile_spec=common.get_u55_compile_spec(),
151151
)
152152
.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
(
120120
ArmTester(
121121
module,
122-
inputs=test_data,
122+
example_inputs=test_data,
123123
compile_spec=common.get_tosa_compile_spec(),
124124
)
125125
.export()
@@ -138,7 +138,7 @@ def _test_linear_tosa_BI_pipeline(
138138
(
139139
ArmTester(
140140
module,
141-
inputs=test_data,
141+
example_inputs=test_data,
142142
compile_spec=common.get_tosa_compile_spec(),
143143
)
144144
.quantize()
@@ -158,7 +158,7 @@ def _test_linear_tosa_u55_BI_pipeline(
158158
(
159159
ArmTester(
160160
module,
161-
inputs=test_data,
161+
example_inputs=test_data,
162162
compile_spec=common.get_u55_compile_spec(),
163163
)
164164
.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
(
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()
@@ -74,7 +74,7 @@ def _test_meandim_tosa_BI_pipeline(
7474
(
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()
@@ -95,7 +95,7 @@ def _test_meandim_tosa_u55_BI_pipeline(
9595
(
9696
ArmTester(
9797
module,
98-
inputs=test_data,
98+
example_inputs=test_data,
9999
compile_spec=common.get_u55_compile_spec(permute_memory_to_nhwc=True),
100100
)
101101
.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
(
4343
ArmTester(
4444
module,
45-
inputs=test_data,
45+
example_inputs=test_data,
4646
compile_spec=common.get_tosa_compile_spec(),
4747
)
4848
.export()
@@ -61,7 +61,9 @@ def _test_softmax_tosa_BI_pipeline(
6161
):
6262
(
6363
ArmTester(
64-
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(),
6567
)
6668
.quantize()
6769
.export()
@@ -81,7 +83,7 @@ def _test_softmax_tosa_u55_BI_pipeline(
8183
(
8284
ArmTester(
8385
module,
84-
inputs=test_data,
86+
example_inputs=test_data,
8587
compile_spec=common.get_u55_compile_spec(),
8688
)
8789
.quantize()

0 commit comments

Comments
 (0)