Skip to content

Commit f63bf0a

Browse files
guangy10facebook-github-bot
authored andcommitted
Prohibit customize export config
Differential Revision: D49258936
1 parent e697d21 commit f63bf0a

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

examples/export/utils.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,13 @@
2727
def _to_core_aten(
2828
model: torch.fx.GraphModule,
2929
example_inputs: Tuple[Value, ...],
30-
capture_config=_CAPTURE_CONFIG,
3130
) -> ExirExportedProgram:
3231
# post autograd export. eventually this will become .to_core_aten
3332
if not isinstance(model, torch.fx.GraphModule):
3433
raise ValueError(
3534
f"Expected passed in model to be an instance of fx.GraphModule, got {type(model)}"
3635
)
37-
core_aten_exir_ep = exir.capture(model, example_inputs, capture_config)
36+
core_aten_exir_ep = exir.capture(model, example_inputs, _CAPTURE_CONFIG)
3837
logging.info(f"Core ATen graph:\n{core_aten_exir_ep.exported_program.graph}")
3938
return core_aten_exir_ep
4039

@@ -51,17 +50,15 @@ def _core_aten_to_edge(
5150
def export_to_edge(
5251
model: torch.fx.GraphModule,
5352
example_inputs: Tuple[Value, ...],
54-
capture_config=_CAPTURE_CONFIG,
5553
edge_compile_config=_EDGE_COMPILE_CONFIG,
5654
) -> ExirExportedProgram:
57-
core_aten_exir_ep = _to_core_aten(model, example_inputs, capture_config)
55+
core_aten_exir_ep = _to_core_aten(model, example_inputs)
5856
return _core_aten_to_edge(core_aten_exir_ep, edge_compile_config)
5957

6058

6159
def export_to_exec_prog(
6260
model,
6361
example_inputs,
64-
capture_config=_CAPTURE_CONFIG,
6562
edge_compile_config=_EDGE_COMPILE_CONFIG,
6663
backend_config=None,
6764
):

0 commit comments

Comments
 (0)