Skip to content

Commit 31ba494

Browse files
guangy10facebook-github-bot
authored andcommitted
Fix export config in tests
Summary: It doesn't look correct that want to export models with one config but test the export with a different one. This diff is to ensure using canonical config for both export and tests. TODO: Rerun the existing tests failed with msg about missing required positional arguments. It's likely related to the params lifting and unlifting. Will figure it out. Differential Revision: D48018569 fbshipit-source-id: 1685533affdd83c0ac00af1150e20cb15715ba4f
1 parent 03f9b9c commit 31ba494

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

examples/export/test/test_export.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
import torch
1010

11-
from executorch.examples.export.utils import _EDGE_COMPILE_CONFIG
11+
from executorch.examples.export.utils import _CAPTURE_CONFIG, _EDGE_COMPILE_CONFIG
1212
from executorch.examples.models import MODEL_NAME_TO_MODEL
1313

1414

@@ -18,8 +18,7 @@ def _assert_eager_lowered_same_result(
1818
):
1919
import executorch.exir as exir
2020

21-
capture_config = exir.CaptureConfig(enable_dynamic_shape=False)
22-
edge_model = exir.capture(eager_model, example_inputs, capture_config).to_edge(
21+
edge_model = exir.capture(eager_model, example_inputs, _CAPTURE_CONFIG).to_edge(
2322
_EDGE_COMPILE_CONFIG
2423
)
2524

0 commit comments

Comments
 (0)