Skip to content

Commit 831ebe0

Browse files
JakeStevensfacebook-github-bot
authored andcommitted
Remove _use_edge_ops=True (#20516)
Summary: In preparation of removing _use_edge_ops (see TODO in _config.py for EdgeCompileConfig), removing all explicit usages where =True, since this is already the case by default. Differential Revision: D109702323
1 parent a0a730a commit 831ebe0

7 files changed

Lines changed: 9 additions & 28 deletions

File tree

exir/backend/test/hta_partitioner_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def forward(self, x, y):
8181
pattern_sub = (
8282
to_edge(
8383
export(SubModule(), (input_x, input_h), strict=True),
84-
compile_config=exir.EdgeCompileConfig(_use_edge_ops=True),
84+
compile_config=exir.EdgeCompileConfig(),
8585
)
8686
.exported_program()
8787
.graph_module

exir/backend/test/test_backends_lifted.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -627,9 +627,7 @@ def forward(self, x_raw, h, c):
627627

628628
traced = to_edge(
629629
export(composite_m, inputs, strict=True),
630-
compile_config=exir.EdgeCompileConfig(
631-
_check_ir_validity=False, _use_edge_ops=True
632-
),
630+
compile_config=exir.EdgeCompileConfig(_check_ir_validity=False),
633631
)
634632

635633
program_without_delegates = to_edge(
@@ -748,9 +746,7 @@ def forward(self, x_raw, h, c):
748746

749747
traced = to_edge(
750748
export(composite_m, inputs, strict=True),
751-
compile_config=exir.EdgeCompileConfig(
752-
_check_ir_validity=False, _use_edge_ops=True
753-
),
749+
compile_config=exir.EdgeCompileConfig(_check_ir_validity=False),
754750
)
755751

756752
program_without_delegates = to_edge(

exir/backend/test/test_debug_handle_map.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,7 @@ def test_lowered_the_whole_model(self):
6666
models.ModelWithUnusedArg(),
6767
]
6868

69-
edge_compile_config = exir.EdgeCompileConfig(
70-
_check_ir_validity=False, _use_edge_ops=True
71-
)
69+
edge_compile_config = exir.EdgeCompileConfig(_check_ir_validity=False)
7270

7371
for model in module_list:
7472
model_inputs = model.get_random_inputs()

exir/backend/test/test_lowered_backend_module.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ def forward(self, x):
7878
expected_res = sin_module(*model_inputs)
7979
edgeir_m = to_edge(
8080
export(sin_module, model_inputs, strict=True),
81-
compile_config=exir.EdgeCompileConfig(
82-
_check_ir_validity=False, _use_edge_ops=True
83-
),
81+
compile_config=exir.EdgeCompileConfig(_check_ir_validity=False),
8482
)
8583
max_value = model_inputs[0].shape[0]
8684
compile_specs = [CompileSpec("max_value", bytes([max_value]))]
@@ -117,9 +115,7 @@ def test_emit_lowered_backend_module(self):
117115
models.ModelWithUnusedArg(),
118116
]
119117

120-
edge_compile_config = exir.EdgeCompileConfig(
121-
_check_ir_validity=False, _use_edge_ops=True
122-
)
118+
edge_compile_config = exir.EdgeCompileConfig(_check_ir_validity=False)
123119

124120
for model in module_list:
125121
model_inputs = model.get_random_inputs()
@@ -170,9 +166,7 @@ def test_emit_nested_lowered_backend_module(self):
170166
models.ModelWithUnusedArg(),
171167
]
172168

173-
edge_compile_config = exir.EdgeCompileConfig(
174-
_check_ir_validity=False, _use_edge_ops=True
175-
)
169+
edge_compile_config = exir.EdgeCompileConfig(_check_ir_validity=False)
176170

177171
for model in module_list:
178172
model_inputs = model.get_random_inputs()

exir/emit/test/test_emit.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2176,9 +2176,7 @@ def forward(self, x):
21762176

21772177
edge_program_manager = exir.to_edge(
21782178
{"forward1": ep1, "forward2": ep2},
2179-
compile_config=exir.EdgeCompileConfig(
2180-
_check_ir_validity=False, _use_edge_ops=True
2181-
),
2179+
compile_config=exir.EdgeCompileConfig(_check_ir_validity=False),
21822180
)
21832181

21842182
edge_program_manager = edge_program_manager.to_backend(

exir/tests/test_passes.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1758,9 +1758,7 @@ def forward(self, query, key, value):
17581758
# lower to edge dialect
17591759
edge_prog = to_edge(
17601760
aten_prog,
1761-
compile_config=EdgeCompileConfig(
1762-
_check_ir_validity=False, _use_edge_ops=True
1763-
),
1761+
compile_config=EdgeCompileConfig(_check_ir_validity=False),
17641762
)
17651763
edge_prog = edge_prog.to_backend(XnnpackPartitioner())
17661764

exir/tests/test_quant_fusion_pass.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,6 @@ def forward(self, indices):
300300
m = _convert_to_reference_decomposed_fx(m)
301301
compile_config = EdgeCompileConfig(
302302
_check_ir_validity=False,
303-
_use_edge_ops=True,
304303
)
305304
m = to_edge(
306305
export(m, example_inputs, strict=True), compile_config=compile_config
@@ -358,7 +357,6 @@ def forward(self, indices):
358357
m = _convert_to_reference_decomposed_fx(m)
359358
compile_config = EdgeCompileConfig(
360359
_check_ir_validity=False,
361-
_use_edge_ops=True,
362360
)
363361
m = to_edge(
364362
export(m, example_inputs, strict=True), compile_config=compile_config
@@ -431,7 +429,6 @@ def _test_embedding_torchao(
431429

432430
compile_config = EdgeCompileConfig(
433431
_check_ir_validity=False,
434-
_use_edge_ops=True,
435432
)
436433
m = to_edge(
437434
export(model, example_inputs, strict=True), compile_config=compile_config

0 commit comments

Comments
 (0)