monklof commented on a change in pull request #7361:
URL: https://github.com/apache/tvm/pull/7361#discussion_r581701493



##########
File path: src/relay/backend/vm/compiler.cc
##########
@@ -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());

Review comment:
       @icemelon9 Great to see you working on Bert. I've recently been trying 
to optimize bert with TVM, especially dynamic-batched case. I found that the 
Relay VM solution introduced a lot of small pieces of PackedFunc related to 
alloc_storage's size calculation, and it makes vm slower. Do you have any 
relevant experience or idea to share on this? Thanks. More detailed discussion: 
https://discuss.tvm.apache.org/t/guideline-relay-aot/5977/17?u=monklof




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to