You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2019/12/04 06:45:44 UTC

[GitHub] [incubator-tvm] zhiics edited a comment on issue #4258: [WIP][TVM] Bring Your Own Codegen to TVM

zhiics edited a comment on issue #4258: [WIP][TVM] Bring Your Own Codegen to TVM
URL: https://github.com/apache/incubator-tvm/pull/4258#issuecomment-561502307
 
 
   > ## Codegen Logic
   > Ideally, we want something like IRModule->Codegen -> RuntimeModule, or a collection of them. Where IRModule could contain functions with an explicit compiler annotation, so and a specific compiler is invoked. I can imagine us handling this in the compile_engine, so that the caller do not have to worry about the extern vs non-extern.
   > 
   > This is something that we might be able to separate out as another PR
   
   Thanks for pointing this out. This is also something we were trying to achieve and the external codegen (xxCodegen.cc) exactly looks like that. I agree that putting the codegen logic in GraphRuntimeCodegen is not clean. But it seems that compile_engine does not really need to do much (or even anything) for external functions. I was thinking that we can probably just have a packed function, `CompileExternalFuncs` (could be in compile_engine), and pass all collected external functions to it to generate runtime modules. We only need to collect these functions from GraphRuntimeCodegen and VMCompiler when traversing the AST. Does this sound good to you?
   
   > ## Graph Partition and Annotation
   > The graph partition and annotation should be a pass that takes IRModule->IRModule, which then makes use of the data.
   
   Yes, they are IRModule->IRModule.

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


With regards,
Apache Git Services