mbaret commented on a change in pull request #4996: [relay][external codegen] 
outline and inline lifted functions for external codegen
URL: https://github.com/apache/incubator-tvm/pull/4996#discussion_r388794460
 
 

 ##########
 File path: src/relay/backend/vm/inline_primitives.cc
 ##########
 @@ -122,6 +122,7 @@ struct PrimitiveInliner : ExprMutator {
       auto global = pair.first;
       auto base_func = pair.second;
       if (auto* n = base_func.as<FunctionNode>()) {
+        if (!n->UseDefaultCompiler()) continue;
 
 Review comment:
   Presumably all future passes which operate at the module level will also 
need to include a similar line to this. Would it be meaningful to mark some 
global functions as 'do not touch'? That might be more explicit than having to 
know that you shouldn't edit functions that don't use the default compiler.

----------------------------------------------------------------
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]


With regards,
Apache Git Services

Reply via email to