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.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/apache/tvm-rfcs/pull/10#issuecomment-913669106

Reply via email to