|
8 | 8 |
|
9 | 9 | import torch
|
10 | 10 | import torchvision.models as models
|
11 |
| -from executorch.backends.xnnpack.partition.xnnpack_partitioner import ( |
12 |
| - XnnpackQuantizedPartitioner, |
13 |
| -) |
14 |
| -from executorch.backends.xnnpack.test.tester import Export, Partition, Tester |
15 |
| -from executorch.exir import CaptureConfig |
| 11 | +from executorch.backends.xnnpack.test.tester import Tester |
16 | 12 |
|
17 | 13 |
|
18 | 14 | class TestMobileNetV3(unittest.TestCase):
|
@@ -53,23 +49,15 @@ def test_qs8_mv3(self):
|
53 | 49 | ops_after_quantization = self.all_operators - {
|
54 | 50 | "executorch_exir_dialects_edge__ops_aten__native_batch_norm_legit_no_training_default",
|
55 | 51 | }
|
56 |
| - ops_after_lowering = self.all_operators - { |
57 |
| - # TODO: unified partitioner since hardswish/hardsigmoid decomposed operators are not quantized |
58 |
| - # They will not be partitioned by quantized partitioner |
59 |
| - "executorch_exir_dialects_edge__ops_aten_add_Tensor", |
60 |
| - "executorch_exir_dialects_edge__ops_aten_mul_Tensor", |
61 |
| - "executorch_exir_dialects_edge__ops_aten_div_Tensor", |
62 |
| - "executorch_exir_dialects_edge__ops_aten_clamp_default", |
63 |
| - "executorch_exir_dialects_edge__ops_aten__to_copy_default", |
64 |
| - } |
| 52 | + ops_after_lowering = self.all_operators |
65 | 53 |
|
66 | 54 | (
|
67 | 55 | Tester(self.mv3, self.model_inputs)
|
68 | 56 | .quantize()
|
69 | 57 | .export()
|
70 | 58 | .to_edge()
|
71 | 59 | .check(list(ops_after_quantization))
|
72 |
| - .partition(Partition(partitioner=XnnpackQuantizedPartitioner)) |
| 60 | + .partition() |
73 | 61 | .check(["torch.ops.executorch_call_delegate"])
|
74 | 62 | .check_not(list(ops_after_lowering))
|
75 | 63 | .to_executorch()
|
|
0 commit comments