Skip to content

Commit

Permalink
Remove MemoryPlan from VM passes (apache#7361)
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Brookhart authored and electriclilies committed Feb 18, 2021
1 parent 02cf229 commit 45231ed
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/relay/backend/vm/compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,11 @@ transform::Sequential MemoryOpt(tvm::Target host_target, TargetsMap targets) {
// Fuse the shape functions.
pass_seqs.push_back(transform::FuseOps());

// Perform memory planning in order to coalesce/reduce allocations.
pass_seqs.push_back(transform::MemoryPlan());
// TODO(mbrookhart, jroesch, masahi): this pass is very slow, and is
// incomplete to provide memory resuse optimizations. Disable it until we can
// rewrite it in C++ and complete it.
// // Perform memory planning in order to coalesce/reduce allocations.
// pass_seqs.push_back(transform::MemoryPlan());

// Compute away constant computation introduced by coalescing allocations.
pass_seqs.push_back(transform::FoldConstant());
Expand Down
1 change: 0 additions & 1 deletion src/relay/backend/vm/lambda_lift.cc
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,6 @@ class LambdaLifter : public ExprMutator {
global = module_->GetGlobalVar(name);
} else {
// Add the lifted function to the module.
std::cout << AsText(lifted_func) << std::endl;
module_->Add(global, lifted_func);
}

Expand Down

0 comments on commit 45231ed

Please sign in to comment.