File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 12
12
13
13
import torch
14
14
from executorch .exir .capture ._config import EdgeCompileConfig , ExecutorchBackendConfig
15
+ from executorch .exir .passes .sym_shape_eval_pass import ConstraintBasedSymShapeEvalPass
15
16
16
17
from ...portable .utils import export_to_edge , save_pte_program
17
18
@@ -54,7 +55,14 @@ def main() -> None:
54
55
)
55
56
56
57
export_program = edge_manager .to_executorch (
57
- ExecutorchBackendConfig (extract_constant_segment = True )
58
+ ExecutorchBackendConfig (
59
+ extract_constant_segment = True ,
60
+ sym_shape_eval_pass = ConstraintBasedSymShapeEvalPass (),
61
+ )
62
+ )
63
+ print (
64
+ "Required memory for activation in bytes: " ,
65
+ export_program ._emitter_output .program .execution_plan [0 ].non_const_buffer_sizes ,
58
66
)
59
67
save_pte_program (export_program .buffer , "llama2" , args .output_dir )
60
68
# model.forward(input)
You can’t perform that action at this time.
0 commit comments