zhiics commented on a change in pull request #5288: [BYOC] Refine DNNL Codegen
URL: https://github.com/apache/incubator-tvm/pull/5288#discussion_r406524552
 
 

 ##########
 File path: src/relay/backend/vm/compiler.cc
 ##########
 @@ -924,19 +924,20 @@ IRModule VMCompiler::OptimizeModule(const IRModule& mod, 
const TargetsMap& targe
   pass_seqs.push_back(transform::LambdaLift());
   pass_seqs.push_back(transform::InlinePrimitives());
 
+  // Manifest the allocations.
+  pass_seqs.push_back(transform::ManifestAlloc(this->target_host_));
+  // Compute away possibly introduced constant computation.
+  pass_seqs.push_back(transform::FoldConstant());
+  // Fuse the shape functions.
+  pass_seqs.push_back(transform::FuseOps());
+
 
 Review comment:
   yeah, if batch_norm is encapsulated in an external function, it will be 
lifted out and therefore invisible by simplifyinference. Later on, if we inline 
it and run fusion, fusion pass will see this op and complain that on OpPattern 
is registered for this op...

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to