Skip to content

Commit b118627

Browse files
mcr229facebook-github-bot
authored andcommitted
Make Default Testing Config Canonical Config (#303)
Summary: Pull Request resolved: #303 For Tester and our long term testing, we should be using the canonical capture config, so we are testing the right way Reviewed By: digantdesai, kirklandsign Differential Revision: D49214927 fbshipit-source-id: 811d195fd4e6e570e9cb23c2cda8e6404d2e76c2
1 parent 7705f51 commit b118627

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
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: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def graph_module(self) -> str:
124124
@register_stage
125125
class Export(Stage):
126126
def __init__(self, capture_config: Optional[CaptureConfig] = None):
127-
self.capture_conf = capture_config or get_xnnpack_capture_config()
127+
self.capture_conf = capture_config or CaptureConfig(enable_aot=True)
128128
self.exir_exported_program = None
129129

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

0 commit comments

Comments
 (0)