Skip to content

Commit 68a6157

Browse files
digantdesaifacebook-github-bot
authored andcommitted
Expand fbcode buck test coverage for arm backend (58→162 test targets)
Summary: Expand the arm backend test coverage in fbcode by adding all available test files from ops/, quantizer/, and misc/ directories to targets.bzl. Reviewed By: 3l1 Differential Revision: D96521268
1 parent 36e8ed9 commit 68a6157

2 files changed

Lines changed: 137 additions & 7 deletions

File tree

backends/arm/operators/op_tosa_conv3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ class Conv3dVisitor(Conv2dVisitor):
1515
target = "tosa.CONV3D.default"
1616

1717
def _get_tosa_op(self):
18-
import serializer.tosa_serializer as ts # type: ignore
18+
import tosa_serializer as ts
1919

2020
return ts.Op.CONV3D
2121

backends/arm/test/targets.bzl

Lines changed: 136 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,46 +16,176 @@ def define_arm_tests():
1616

1717
# Operators
1818
test_files += [
19+
"ops/test_abs.py",
1920
"ops/test_add.py",
2021
"ops/test_addmm.py",
22+
"ops/test_amax.py",
23+
"ops/test_amin.py",
2124
"ops/test_avg_pool2d.py",
25+
"ops/test_batch_norm.py",
26+
"ops/test_bitwise.py",
27+
"ops/test_bmm.py",
2228
"ops/test_cat.py",
29+
"ops/test_ceil.py",
30+
"ops/test_clamp.py",
31+
"ops/test_clone.py",
32+
"ops/test_conv1d.py",
2333
"ops/test_conv2d.py",
34+
"ops/test_conv3d.py",
35+
"ops/test_cos.py",
36+
"ops/test_depthwise_conv.py",
37+
# "ops/test_div.py", # 15 failures: NoneType input in bundled_program serialization (pre-existing bug)
38+
"ops/test_elu.py",
39+
"ops/test_embedding.py",
40+
"ops/test_eq.py",
41+
"ops/test_erf.py",
42+
"ops/test_exp.py",
43+
"ops/test_expand.py",
44+
"ops/test_floor.py",
45+
"ops/test_full.py",
46+
"ops/test_ge.py",
47+
"ops/test_group_norm.py",
48+
"ops/test_gt.py",
49+
"ops/test_hardswish.py",
50+
"ops/test_hardtanh.py",
51+
# "ops/test_layer_norm.py", # 1 failure: 16a8w u55 quantization issue
52+
"ops/test_le.py",
53+
"ops/test_leaky_relu.py",
2454
"ops/test_linear.py",
2555
"ops/test_log10.py",
56+
"ops/test_log.py",
57+
"ops/test_logical.py",
58+
"ops/test_lt.py",
59+
# matmul: Vela compilation fails with 'Non-passthrough operation'
60+
# for int16 matmul operations, xfail interacts incorrectly with
61+
# XfailIfNoCorstone.
62+
# "ops/test_matmul.py",
2663
"ops/test_max_pool1d.py",
64+
"ops/test_max_pool.py",
65+
"ops/test_mean_dim.py",
66+
"ops/test_maximum.py",
67+
"ops/test_minimum.py",
68+
"ops/test_mm.py",
2769
"ops/test_mul.py",
70+
"ops/test_ne.py",
71+
"ops/test_neg.py",
72+
"ops/test_ones.py",
2873
"ops/test_permute.py",
74+
"ops/test_pixel_shuffling.py",
75+
"ops/test_pow.py",
76+
"ops/test_reciprocal.py",
77+
"ops/test_relu.py",
78+
"ops/test_remainder.py",
79+
"ops/test_repeat.py",
80+
"ops/test_round.py",
81+
# rshift: U55 FVP output dtype mismatch for rshift operations,
82+
# xfail interacts incorrectly with XfailIfNoCorstone.
83+
# "ops/test_rshift.py",
2984
"ops/test_rsqrt.py",
30-
"ops/test_slice.py",
85+
"ops/test_rsub.py",
86+
"ops/test_scalar_tensor.py",
87+
"ops/test_scalars.py",
88+
"ops/test_sdpa.py",
89+
"ops/test_select.py",
90+
"ops/test_select_scatter.py",
3191
"ops/test_sigmoid.py",
92+
"ops/test_sigmoid_32bit.py",
93+
"ops/test_sign.py",
94+
# silu: U55 numerical mismatch for inplace SiLU, xfail interacts
95+
# incorrectly with XfailIfNoCorstone.
96+
# "ops/test_silu.py",
97+
"ops/test_sin.py",
98+
"ops/test_sinh.py",
99+
"ops/test_slice.py",
100+
# slice_scatter: U55/U85 FVP failures for int8 and end_none cases,
101+
# xfail interacts incorrectly with XfailIfNoCorstone.
102+
# "ops/test_slice_scatter.py",
103+
"ops/test_softmax.py",
104+
"ops/test_split.py",
105+
"ops/test_sqrt.py",
106+
"ops/test_squeeze.py",
107+
"ops/test_stack.py",
32108
"ops/test_sub.py",
109+
# sum: xfail markers interact incorrectly with XfailIfNoCorstone
110+
# when test inputs contain None (NoneType not supported in
111+
# bundled_program serialization).
112+
# "ops/test_sum.py",
113+
"ops/test_t_copy.py",
114+
"ops/test_tan.py",
33115
"ops/test_tanh.py",
34-
"ops/test_view.py",
35-
"ops/test_cos.py",
36116
"ops/test_to_copy.py",
117+
# transpose_conv2d: xfail markers for per-channel quantization
118+
# interact incorrectly with XfailIfNoCorstone when tests fail
119+
# during quantization (before reaching FVP execution).
120+
# "ops/test_transpose_conv2d.py",
121+
"ops/test_transpose_copy.py",
122+
"ops/test_tril.py",
123+
# "ops/test_unary_combos.py", # 1 failure: NegAdd u55_INT
124+
"ops/test_unbind.py",
125+
"ops/test_unflatten.py",
126+
"ops/test_unfold_copy.py",
127+
"ops/test_unsqueeze.py",
128+
"ops/test_upsample_bilinear2d.py",
129+
"ops/test_upsample_nearest2d.py",
130+
"ops/test_var.py",
131+
"ops/test_view.py",
132+
"ops/test_where.py",
133+
"ops/test_while.py",
134+
"ops/test_zeros.py",
37135
]
38136

39137
# Quantization
40138
test_files += [
139+
"quantizer/test_conv_relu_fusing.py",
41140
"quantizer/test_generic_annotater.py",
141+
"quantizer/test_partial_quantization.py",
142+
# "quantizer/test_preserve_kwargs.py", # needs executorch.backends.test.harness.stages (no BUCK target)
143+
# "quantizer/test_selective_quantization.py", # needs torchvision (not in deps)
144+
"quantizer/test_set_module_name.py",
145+
"quantizer/test_tosa_quantizer_validate.py",
42146
]
43147

44148
# Misc tests
45149
test_files += [
46-
"misc/test_compile_spec.py",
47-
"misc/test_pass_pipeline_config.py",
48-
"misc/test_tosa_spec.py",
49150
"misc/test_bn_relu_folding_qat.py",
151+
"misc/test_call_operator_submodule.py",
152+
"misc/test_compile_spec.py",
153+
"misc/test_const_shape.py",
154+
"misc/test_conv_relu_residual_add.py",
155+
"misc/test_count_tosa_ops.py",
50156
"misc/test_custom_partition.py",
157+
"misc/test_debug_feats.py",
51158
"misc/test_debug_hook.py",
52159
"misc/test_post_quant_device_switch.py",
53160
# "misc/test_dim_order.py", (TODO - T238390249)
54161
]
55162

56163
# Deprecation tests
57164
test_files += [
165+
"misc/test_dw_convs_with_shared_weights.py",
166+
"misc/test_extract_io_params_tosa.py",
167+
# "misc/test_int64.py", # 5 failures: int64 overflow/chain handling issues
168+
# "misc/test_lifted_tensor.py", # needs executorch.backends.test.harness.stages (no BUCK target)
169+
"misc/test_mixed_fp_bf16_partition.py",
170+
"misc/test_mixed_type_lowering.py",
171+
# "misc/test_model_evaluator.py", # needs executorch.backends.arm.util (no BUCK target)
172+
"misc/test_multiple_delegates.py",
173+
"misc/test_multiple_outputs.py",
174+
"misc/test_non_persistent_buffers.py",
58175
"deprecation/test_arm_compile_spec_deprecation.py",
176+
"misc/test_partition_decomposed_quantized_ops.py",
177+
"misc/test_pass_pipeline_config.py",
178+
"misc/test_pass_required_order.py",
179+
"misc/test_qat_training_loop.py",
180+
"misc/test_quant_custom_meta.py",
181+
# "misc/test_rescale_range.py", # 3 failures: zero-point and rescale range validation
182+
# "misc/test_runner_utils.py", # name collides with runner_utils library in BUCK
183+
"misc/test_save_exported_model.py",
184+
# "misc/test_shared_qspecs.py", # needs executorch.backends.cortex_m.test.tester (no BUCK target)
185+
"misc/test_tosa_dialect_conv2d.py",
186+
"misc/test_tosa_dialect_dw_conv2d.py",
187+
"misc/test_tosa_dialect_shape_ops.py",
188+
"misc/test_tosa_spec.py",
59189
]
60190

61191
TESTS = {}

0 commit comments

Comments
 (0)