Skip to content

Commit 8abb05f

Browse files
mcr229facebook-github-bot
authored andcommitted
unified partitioner for qs8 mv3 (#309)
Summary: Pull Request resolved: #309 Using Unified partitioner for qs8 mv3 Reviewed By: manuelcandales Differential Revision: D49116826 fbshipit-source-id: 554c7a1c67cede592472010b4bf0c0363808bdba
1 parent 4923faf commit 8abb05f

File tree

1 file changed

+3
-15
lines changed

1 file changed

+3
-15
lines changed

backends/xnnpack/test/models/mobilenet_v3.py

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +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
15-
from executorch.exir import CaptureConfig
11+
from executorch.backends.xnnpack.test.tester import Tester
1612

1713

1814
class TestMobileNetV3(unittest.TestCase):
@@ -53,23 +49,15 @@ def test_qs8_mv3(self):
5349
ops_after_quantization = self.all_operators - {
5450
"executorch_exir_dialects_edge__ops_aten__native_batch_norm_legit_no_training_default",
5551
}
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
6553

6654
(
6755
Tester(self.mv3, self.model_inputs)
6856
.quantize()
6957
.export()
7058
.to_edge()
7159
.check(list(ops_after_quantization))
72-
.partition(Partition(partitioner=XnnpackQuantizedPartitioner))
60+
.partition()
7361
.check(["torch.ops.executorch_call_delegate"])
7462
.check_not(list(ops_after_lowering))
7563
.to_executorch()

0 commit comments

Comments
 (0)