File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 22#include " torch/csrc/jit/passes/dead_code_elimination.h"
33#include " torch/csrc/jit/passes/fuse_linear.h"
44#include " torch/csrc/jit/passes/freeze_module.h"
5+ #include " torch/csrc/jit/passes/create_functional_graphs.h"
56#include " torch/csrc/jit/passes/guard_elimination.h"
67#include " torch/csrc/jit/passes/loop_unrolling.h"
78#include " torch/csrc/jit/passes/lower_graph.h"
@@ -24,6 +25,10 @@ void LowerBlock(torch::jit::Block* b) {
2425
2526void LowerGraph (std::shared_ptr<torch::jit::Graph>& g) {
2627 torch::jit::EliminateRedundantGuards (g);
28+ torch::jit::RemoveListMutation (g);
29+ torch::jit::RemoveTensorMutation (g);
30+ torch::jit::CreateFunctionalGraphs (g);
31+ torch::jit::InlineFunctionalGraphs (g);
2732 torch::jit::PeepholeOptimize (g, false );
2833 passes::EliminateExceptionOrPassPattern (g);
2934 torch::jit::FuseLinear (g);
You can’t perform that action at this time.
0 commit comments