Skip to content

Commit

Permalink
feat(//core/lowering): Add functionalization pass to replace implace
Browse files Browse the repository at this point in the history
operators

Closes: #30

Signed-off-by: Naren Dasan <[email protected]>
Signed-off-by: Naren Dasan <[email protected]>
  • Loading branch information
narendasan committed Sep 4, 2020
1 parent 2299351 commit 90a9ed6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions core/lowering/lowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#include "torch/csrc/jit/passes/dead_code_elimination.h"
#include "torch/csrc/jit/passes/fuse_linear.h"
#include "torch/csrc/jit/passes/freeze_module.h"
#include "torch/csrc/jit/passes/create_functional_graphs.h"
#include "torch/csrc/jit/passes/guard_elimination.h"
#include "torch/csrc/jit/passes/loop_unrolling.h"
#include "torch/csrc/jit/passes/lower_graph.h"
Expand All @@ -24,6 +25,10 @@ void LowerBlock(torch::jit::Block* b) {

void LowerGraph(std::shared_ptr<torch::jit::Graph>& g) {
torch::jit::EliminateRedundantGuards(g);
torch::jit::RemoveListMutation(g);
torch::jit::RemoveTensorMutation(g);
torch::jit::CreateFunctionalGraphs(g);
torch::jit::InlineFunctionalGraphs(g);
torch::jit::PeepholeOptimize(g, false);
passes::EliminateExceptionOrPassPattern(g);
torch::jit::FuseLinear(g);
Expand Down

0 comments on commit 90a9ed6

Please sign in to comment.