@@ -118,8 +118,9 @@ void AddEngineToGraph(
118
118
}
119
119
120
120
bool CheckMethodOperatorSupport (const torch::jit::script::Module& mod, std::string method_name) {
121
- // Go through Lowering to simplify graph and extract weight parameters
122
- auto graph_and_parameters = lowering::Lower (mod, method_name, false );
121
+ // Go through Lowering to simplify graph
122
+ CompileSpec cfg ({});
123
+ auto graph_and_parameters = lowering::Lower (mod, method_name, cfg.lower_info );
123
124
124
125
auto g = graph_and_parameters.first ;
125
126
LOG_DEBUG (*g << " (CheckMethodOperatorSupport)\n " );
@@ -129,7 +130,7 @@ bool CheckMethodOperatorSupport(const torch::jit::script::Module& mod, std::stri
129
130
130
131
std::string ConvertGraphToTRTEngine (const torch::jit::script::Module& mod, std::string method_name, CompileSpec cfg) {
131
132
// Go through Lowering to simplify graph and extract weight parameters
132
- auto graph_and_parameters = lowering::Lower (mod, method_name, cfg.lower_info . unfreeze_module );
133
+ auto graph_and_parameters = lowering::Lower (mod, method_name, cfg.lower_info );
133
134
134
135
auto convert_cfg = std::move (cfg.convert_info );
135
136
auto g = graph_and_parameters.first ;
@@ -187,7 +188,7 @@ torch::jit::script::Module CompileGraphWithFallback(const torch::jit::script::Mo
187
188
// Compile only forward methods. forward method contains the entire graph.
188
189
if (method.name ().compare (" forward" ) == 0 ) {
189
190
auto new_g = std::make_shared<torch::jit::Graph>();
190
- auto graph_and_parameters = lowering::Lower (mod, method.name (), cfg.lower_info . unfreeze_module );
191
+ auto graph_and_parameters = lowering::Lower (mod, method.name (), cfg.lower_info );
191
192
192
193
auto g = graph_and_parameters.first ;
193
194
auto params = graph_and_parameters.second ;
0 commit comments