Skip to content

Commit 0ab4d1f

Browse files
mcr229facebook-github-bot
authored andcommitted
unified partitioner for qs8 mv3
Differential Revision: https://internalfb.com/D49116826 fbshipit-source-id: 909be7ae197727a305912133caed3a42c553e09a
1 parent 8a940db commit 0ab4d1f

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

backends/xnnpack/test/models/mobilenet_v3.py

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@
88

99
import torch
1010
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
11+
from executorch.backends.xnnpack.test.tester import Export, Tester
1512
from executorch.exir import CaptureConfig
1613

1714

@@ -53,23 +50,15 @@ def test_qs8_mv3(self):
5350
ops_after_quantization = self.all_operators - {
5451
"executorch_exir_dialects_edge__ops_aten__native_batch_norm_legit_no_training_default",
5552
}
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-
}
53+
ops_after_lowering = self.all_operators
6554

6655
(
6756
Tester(self.mv3, self.model_inputs)
6857
.quantize()
6958
.export(Export(CaptureConfig(enable_aot=True)))
7059
.to_edge()
7160
.check(list(ops_after_quantization))
72-
.partition(Partition(partitioner=XnnpackQuantizedPartitioner))
61+
.partition()
7362
.check(["torch.ops.executorch_call_delegate"])
7463
.check_not(list(ops_after_lowering))
7564
.to_executorch()

0 commit comments

Comments
 (0)