giuseros commented on a change in pull request #7785:
URL: https://github.com/apache/tvm/pull/7785#discussion_r612602136



##########
File path: src/target/source/codegen_c_host.cc
##########
@@ -40,13 +40,16 @@ namespace codegen {
 
 CodeGenCHost::CodeGenCHost() { module_name_ = 
GetUniqueName("__tvm_module_ctx"); }
 
-void CodeGenCHost::Init(bool output_ssa, bool emit_asserts, std::string 
target_str) {
+void CodeGenCHost::Init(bool output_ssa, bool emit_asserts, bool 
is_aot_executor,
+                        std::string target_str) {

Review comment:
       > it might be harder for us to handle device functions that does not 
directly corresponds to a symbol
   
   Could you give an example for such function? 
   
   > we should clarify and document what is the CRT standard so that the new 
code generator can refer to
   
   So, about this, for me the "runtime" of the graph is a triplet of:
   * Calling convention (registry, dynamic or plain)
   * Backend functions (platform specific vs defined in TVM)
   * Graph execution (aot vs graph)
   
   As of now, CRT (i.e., `--runtime=c`)  means: 
`{registry_calling_convention,platform_specific_backend_API, graph_executor}`. 
On the other hand, AOT (i.e., `--runtime=c --executor=aot`)  for now means: 
`{plain_calling_convention, platform_specific_backend, aot_executor}`. I agree 
it would be nice to allow all sort of combinations, but for instance:
   
   * The `registry_calling_convention` is a requirement of the `graph_executor`
   * The `dynamic_calling_convention` might be quite hard to implement in AOT 
   * The `graph_executor` is required (for now) for things like `rpc`
   
   So, I am not sure we can come up in day1 with a full general aot 
integration. I would say :
   
   * Let's stick with the current AOT definition for now (which is for sure 
more general that we had in mind at the beginning :) )
   * I will remove the `is_aot` from the codegen, but I will use a more generic 
`use_plain_calling_convention`
   * Let's document the exact definition of CRT and AOT and let's try to 
generalize later
   
   What do you guys think? Also adding @manupa-arm and @mbaret into the 
discussion




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


Reply via email to