Mousius commented on pull request #10:
URL: https://github.com/apache/tvm-rfcs/pull/10#issuecomment-913669106


   Hi @mbs-octoml, sorry I missed a few replies! 
   
   The reason I hoisted it outside of the `LowerTE` pass is that it effectively 
bypasses it anyway, `LowerExternalFunctions` in `te_compiler.cc` is a massive 
bypass which starts there and goes around most of TVM before it ends up as a 
`runtime::Module` right at the very end. Effectively what's happening is the 
"default" `relay_to_tir` is `LowerTE` and then `Target`s register their own 
variants. I think where @jroesch was going with the `(IRModule, Function) -> 
(IRModule, GlobalVar)` is that you will want to produce many `PrimFunc`s to 
implement one `Function` and thus you need the entire module, by just 
introducing this as a `Pass` we won't have to introduce a new signature 
specifically for this hook.


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

To unsubscribe, e-mail: [email protected]

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


Reply via email to