File tree 1 file changed +5
-0
lines changed
1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 2
2
#include " torch/csrc/jit/passes/dead_code_elimination.h"
3
3
#include " torch/csrc/jit/passes/fuse_linear.h"
4
4
#include " torch/csrc/jit/passes/freeze_module.h"
5
+ #include " torch/csrc/jit/passes/create_functional_graphs.h"
5
6
#include " torch/csrc/jit/passes/guard_elimination.h"
6
7
#include " torch/csrc/jit/passes/loop_unrolling.h"
7
8
#include " torch/csrc/jit/passes/lower_graph.h"
@@ -24,6 +25,10 @@ void LowerBlock(torch::jit::Block* b) {
24
25
25
26
void LowerGraph (std::shared_ptr<torch::jit::Graph>& g) {
26
27
torch::jit::EliminateRedundantGuards (g);
28
+ torch::jit::RemoveListMutation (g);
29
+ torch::jit::RemoveTensorMutation (g);
30
+ torch::jit::CreateFunctionalGraphs (g);
31
+ torch::jit::InlineFunctionalGraphs (g);
27
32
torch::jit::PeepholeOptimize (g, false );
28
33
passes::EliminateExceptionOrPassPattern (g);
29
34
torch::jit::FuseLinear (g);
You can’t perform that action at this time.
0 commit comments