2121import executorch .extension .pytree as pytree
2222import torch
2323
24- from executorch .exir import (
25- CaptureConfig ,
26- EdgeCompileConfig ,
27- ExecutorchBackendConfig ,
28- memory ,
29- )
24+ from executorch .exir import EdgeCompileConfig , ExecutorchBackendConfig , memory
3025from executorch .exir .dynamic_shape import DynamicMemoryPlanningMode
3126from executorch .exir .emit import emit_program
3227from executorch .exir .pass_manager import PassManager
@@ -471,7 +466,6 @@ def maketest(
471466 allow_non_contiguous_tensor : bool = False ,
472467 method : str = "forward" ,
473468 dynamic_memory_planning_mode : DynamicMemoryPlanningMode = DynamicMemoryPlanningMode .UPPER_BOUND ,
474- capture_config = None ,
475469 verify_graph : Optional [Callable ] = None ,
476470) -> Callable [[unittest .TestCase ], None ]:
477471 r"""Returns a TestCase method to test the provided module class and method.
@@ -507,7 +501,6 @@ def wrapper(self: unittest.TestCase) -> None:
507501 methods = (method ,),
508502 ignore_to_out_var_failure = ignore_to_out_var_failure ,
509503 dynamic_memory_planning_mode = dynamic_memory_planning_mode ,
510- capture_config = capture_config ,
511504 )
512505 if verify_graph :
513506 verify_graph (self , module .exported_program .graph_module )
@@ -599,9 +592,6 @@ def test_ops_return_multi(self):
599592 def test_mem_planning_toy_model (self ):
600593 maketest (
601594 ToyModelForMemPlanning ,
602- capture_config = exir .CaptureConfig (
603- enable_dynamic_shape = True ,
604- ),
605595 )(self )
606596
607597 # TODO: add ops implementations and turn on 'run_executor'
@@ -621,9 +611,6 @@ def test_containers(self):
621611 maketest (
622612 ModuleContainers ,
623613 do_tree_flatten = True ,
624- capture_config = exir .CaptureConfig (
625- enable_dynamic_shape = True ,
626- ),
627614 )(self )
628615
629616 # can not run the graph module since the out variance with tensor list out
@@ -675,9 +662,6 @@ def test_intermediate_dynamic_shape(self):
675662 ModuleIntermediateDynamicShape ,
676663 run_graph_module = False ,
677664 allow_non_contiguous_tensor = True ,
678- capture_config = exir .CaptureConfig (
679- enable_dynamic_shape = True ,
680- ),
681665 )(self )
682666
683667 # TODO(shunting): some non constant tensors for transformer are non-contiguous.
@@ -697,10 +681,6 @@ def test_transformer_encode(self):
697681 def test_ft_cond_basic (self ):
698682 maketest (
699683 FTCondBasic ,
700- capture_config = exir .CaptureConfig (
701- enable_dynamic_shape = True ,
702- enable_functionalization = False , # TODO enable functionalization
703- ),
704684 )(self )
705685
706686 def test_ft_map_basic (self ):
@@ -746,10 +726,6 @@ def test_ft_map_basic(self):
746726 def test_ft_cond_dynshape (self ):
747727 maketest (
748728 FTCondDynShape ,
749- capture_config = exir .CaptureConfig (
750- enable_dynamic_shape = True ,
751- enable_functionalization = False , # TODO enable functionalization
752- ),
753729 )(self )
754730
755731 def test_ft_map_dynshape (self ):
@@ -802,9 +778,6 @@ def test_ft_map_dynshape(self):
802778 def test_batch_norm (self ):
803779 maketest (
804780 BatchNormModel ,
805- capture_config = exir .CaptureConfig (
806- enable_dynamic_shape = True ,
807- ),
808781 verify_graph = BatchNormModel .verify_graph ,
809782 # TODO: lean mode does not have native_batch_norm.out implemented
810783 # run this on aten mode.
0 commit comments