Skip to content

Commit 1ab2ca0

Browse files
mcr229facebook-github-bot
authored andcommitted
Make Default Testing Config Canonical Config
Differential Revision: D49214927 fbshipit-source-id: 98d914e23ebdfac0483f99e3623c0813124cbc89
1 parent 6652248 commit 1ab2ca0

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

backends/xnnpack/test/models/mobilenet_v2.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test_fp32_mv2(self):
3535

3636
(
3737
Tester(self.mv2, self.model_inputs)
38-
.export(Export(CaptureConfig(enable_aot=True)))
38+
.export()
3939
.to_edge()
4040
.check(list(self.all_operators))
4141
.partition()
@@ -56,7 +56,7 @@ def test_qs8_mv2(self):
5656
(
5757
Tester(self.mv2, self.model_inputs)
5858
.quantize()
59-
.export(Export(CaptureConfig(enable_aot=True)))
59+
.export()
6060
.to_edge()
6161
.check(list(ops_after_quantization))
6262
.partition(Partition(partitioner=XnnpackQuantizedPartitioner))

backends/xnnpack/test/models/mobilenet_v3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class TestMobileNetV3(unittest.TestCase):
3737
def test_fp32_mv3(self):
3838
(
3939
Tester(self.mv3, self.model_inputs)
40-
.export(Export(CaptureConfig(enable_aot=True)))
40+
.export()
4141
.to_edge()
4242
.check(list(self.all_operators))
4343
.partition()
@@ -66,7 +66,7 @@ def test_qs8_mv3(self):
6666
(
6767
Tester(self.mv3, self.model_inputs)
6868
.quantize()
69-
.export(Export(CaptureConfig(enable_aot=True)))
69+
.export()
7070
.to_edge()
7171
.check(list(ops_after_quantization))
7272
.partition(Partition(partitioner=XnnpackQuantizedPartitioner))

backends/xnnpack/test/tester/tester.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
from executorch import exir
1515
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
1616
from executorch.backends.xnnpack.passes import XNNPACKPassManager
17-
from executorch.backends.xnnpack.utils.configs import (
18-
get_xnnpack_capture_config,
19-
get_xnnpack_edge_compile_config,
20-
)
17+
from executorch.backends.xnnpack.utils.configs import get_xnnpack_edge_compile_config
2118
from executorch.exir import (
2219
CaptureConfig,
2320
EdgeCompileConfig,
@@ -124,7 +121,7 @@ def graph_module(self) -> str:
124121
@register_stage
125122
class Export(Stage):
126123
def __init__(self, capture_config: Optional[CaptureConfig] = None):
127-
self.capture_conf = capture_config or get_xnnpack_capture_config()
124+
self.capture_conf = capture_config or CaptureConfig(enable_aot=True)
128125
self.exir_exported_program = None
129126

130127
def run(self, artifact: torch.nn.Module, inputs) -> None:

0 commit comments

Comments
 (0)