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



##########
File path: src/target/source/source_module.cc
##########
@@ -191,17 +192,35 @@ class CSourceCrtMetadataModuleNode : public 
runtime::ModuleNode {
           << "}\n";
   }
 
+  void GenerateAOTDescriptor() {
+    code_ << "#include <tvm_executor.h>\n";
+    code_ << "#ifdef __cplusplus\n";
+    code_ << "extern \"C\"\n";
+    code_ << "#endif\n";
+    code_ << "TVM_DLL int32_t " << ::tvm::runtime::symbol::tvm_run_func_prefix;
+    code_ << "(void* args, void* type_code, int num_args, void* out_value, 
void* "
+             "out_type_code, void* resource_handle);\n";
+    code_ << "const tvm_model_t network = {\n"

Review comment:
       This applies to all global symbols though (operators, lookup_param, 
etc...) and indeed I have a PR ready to add "name mangling" into the picture. 
Basically the idea is to let the user specify a prefix and append that prefix 
to all the global functions defined by the compiler. I didn't submit it yet 
because I wanted to have an easier code review :) 




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