File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 2929
3030from executorch .extension .export_util .utils import export_to_edge , save_pte_program
3131from executorch .extension .llm .tokenizer .utils import get_tokenizer
32- from torch ._export import capture_pre_autograd_graph
3332from torch .ao .quantization .quantize_pt2e import convert_pt2e , prepare_pt2e
3433from torch .ao .quantization .quantizer import Quantizer
3534from torch .ao .quantization .quantizer .composable_quantizer import ComposableQuantizer
35+ from torch .export import export_for_training
3636from torch .nn .attention import SDPBackend
3737
3838FORMAT = "[%(levelname)s %(asctime)s %(filename)s:%(lineno)s] %(message)s"
@@ -193,12 +193,12 @@ def capture_pre_autograd_graph(self) -> "LLMEdgeManager":
193193 strict = True ,
194194 ).module ()
195195 else :
196- self .pre_autograd_graph_module = capture_pre_autograd_graph (
196+ self .pre_autograd_graph_module = export_for_training (
197197 self .model ,
198198 self .example_inputs ,
199199 kwargs = self .example_kwarg_inputs ,
200200 dynamic_shapes = dynamic_shape ,
201- )
201+ ). module ()
202202
203203 return self
204204
You can’t perform that action at this time.
0 commit comments